Skip to content

Commit bf98c83

Browse files
committed
perf(firmware): poll the XInput IN endpoint at 1 ms
Lower the IN-endpoint bInterval from 4 (4 ms / 250 Hz) to 1 (1 ms / 1000 Hz) so the host can pick up new controller state up to ~3 ms sooner. The report is still produced only on change, so advertising the faster poll rate adds no device-side load. Dual-board firmware build is clean.
1 parent 9655e74 commit bf98c83

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

pico-bridge/src/usb_descriptors.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,14 @@ static const uint8_t desc_configuration_xinput[] = {
143143
0x00,
144144

145145
// Endpoint 0x81 IN, interrupt, 20-byte report. At full speed bInterval is
146-
// counted in 1 ms frames, so bInterval=4 polls every 4 ms (250 Hz) -- the
147-
// same rate the real wired Xbox 360 pad reports.
146+
// counted in 1 ms frames, so bInterval=1 requests a 1 ms (1000 Hz) poll for
147+
// the lowest input latency. (The real wired Xbox 360 pad asks for 4 ms /
148+
// 250 Hz; advertising the faster rate only lets the host poll more often --
149+
// the report itself is still produced on change, so there is no extra load.)
148150
7, TUSB_DESC_ENDPOINT, XINPUT_IN_EP_ADDR,
149151
0x03, // bmAttributes = Interrupt
150152
U16_TO_U8S_LE(20),
151-
4, // bInterval = 4 ms (250 Hz) at full speed
153+
1, // bInterval = 1 ms (1000 Hz) at full speed
152154

153155
// Endpoint 0x02 OUT, interrupt, 32 bytes, 8 ms (rumble + LED ring writes from the host)
154156
7, TUSB_DESC_ENDPOINT, XINPUT_OUT_EP_ADDR,

0 commit comments

Comments
 (0)