Skip to content

Commit

Permalink
Reduce transfer timeout to 1000ms
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDeadman committed Jan 21, 2024
1 parent 3ef3f6d commit eada2fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/UsbCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ typedef MAX3421e<P20, P19> MAX3421E; // Balanduino
#define USB_ERROR_FailGetConfDescr 0xE3
#define USB_ERROR_TRANSFER_TIMEOUT 0xFF

#define USB_XFER_TIMEOUT 10000 //30000 // (5000) USB transfer timeout in milliseconds, per section 9.2.6.1 of USB 2.0 spec
//#define USB_NAK_LIMIT 32000 //NAK limit for a transfer. 0 means NAKs are not counted
#define USB_RETRY_LIMIT 3 // 3 retry limit for a transfer
#define USB_SETTLE_DELAY 200 //settle delay in milliseconds
#define USB_XFER_TIMEOUT 1000 // USB transfer timeout in milliseconds, per section 9.2.6.1 of USB 2.0 spec
//#define USB_NAK_LIMIT 32000 // NAK limit for a transfer. 0 means NAKs are not counted
#define USB_RETRY_LIMIT 3 // retry limit for a transfer
#define USB_SETTLE_DELAY 200 // settle delay in milliseconds

#define USB_NUMDEVICES 16 //number of USB devices
#define USB_NUMDEVICES 16 // number of USB devices
//#define HUB_MAX_HUBS 7 // maximum number of hubs that can be attached to the host controller
#define HUB_PORT_RESET_DELAY 20 // hub port reset delay 10 ms recomended, can be up to 20 ms

Expand Down
4 changes: 2 additions & 2 deletions src/hidboot.h
Original file line number Diff line number Diff line change
Expand Up @@ -431,15 +431,15 @@ uint32_t HIDBoot<BOOT_PROTOCOL>::Init(uint32_t parent, uint32_t port, uint32_t l
//USBTRACE2("setEpInfoEntry returned ", rcode);
USBTRACE2("Cnf:", bConfNum);

delay(1000);
delay(200); // Give time for address change

// Set Configuration Value
rcode = pUsb->setConf(bAddress, 0, bConfNum);

if(rcode)
goto FailSetConfDescr;

delay(1000);
delay(200); // let things settle

USBTRACE2("bIfaceNum:", bIfaceNum);
USBTRACE2("bNumIface:", bNumIface);
Expand Down

0 comments on commit eada2fe

Please sign in to comment.