arduino / ArduinoCore-avr

The Official Arduino AVR core
https://www.arduino.cc
1.25k stars 1.06k forks source link

Hardcoded timeout in USB_Send #478

Open Ryzee119 opened 2 years ago

Ryzee119 commented 2 years ago

Here: u8 timeout = 250

250ms is quite large for my application. Could this be moved to a compile time define?

Perhaps something like this?

#ifndef USB_SEND_TIMEOUT
#define USB_SEND_TIMEOUT 250
#endif
- u8 timeout = 250;      // 250ms timeout on send? TODO
+ u8 timeout = USB_SEND_TIMEOUT; // timeout on send? TODO
Ryzee119 commented 2 years ago

I raised a quick patch for this change https://github.com/arduino/ArduinoCore-avr/pull/479