Skip to content

Commit 3d1e396

Browse files
committed
Remove USB timeout
This should be handled by the board implementation.
1 parent 1323197 commit 3d1e396

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/XInput.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ int XInputGamepad::send() {
330330
if (!newData) return 0; // TX data hasn't changed
331331
#ifdef USB_XINPUT
332332
newData = false;
333-
return XInputUSB::send(tx, USB_Timeout);
333+
return XInputUSB::send(tx);
334334
#else
335335
#warning "Using debug output for XInput send()"
336336
printDebug();
@@ -346,7 +346,7 @@ int XInputGamepad::receive() {
346346

347347
// Grab packet and store it in rx array
348348
uint8_t rx[8];
349-
int bytesRecv = XInputUSB::recv(rx, USB_Timeout);
349+
int bytesRecv = XInputUSB::recv(rx);
350350

351351
const uint8_t PacketType = rx[0];
352352

src/XInput.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ class XInputGamepad {
131131
void printDebug(Print& output = Serial) const;
132132

133133
private:
134-
static const uint32_t USB_Timeout = 12840; // Packet timeout, in milliseconds
135134
uint8_t tx[20]; // USB transmit data
136135
boolean newData; // Flag for tx data changed
137136

0 commit comments

Comments
 (0)