diff --git a/src/arduino/Adafruit_USBH_Host.cpp b/src/arduino/Adafruit_USBH_Host.cpp index 1a50d527..366f53c3 100644 --- a/src/arduino/Adafruit_USBH_Host.cpp +++ b/src/arduino/Adafruit_USBH_Host.cpp @@ -121,7 +121,9 @@ bool Adafruit_USBH_Host::begin(uint8_t rhport) { return tuh_init(rhport); } -void Adafruit_USBH_Host::task(void) { tuh_task(); } +void Adafruit_USBH_Host::task(uint32_t timeout_ms, bool in_isr) { + tuh_task_ext(timeout_ms, in_isr); +} // Invoked when device with hid interface is mounted // Report descriptor is also available for use. diff --git a/src/arduino/Adafruit_USBH_Host.h b/src/arduino/Adafruit_USBH_Host.h index abeedf52..882b370f 100644 --- a/src/arduino/Adafruit_USBH_Host.h +++ b/src/arduino/Adafruit_USBH_Host.h @@ -69,7 +69,7 @@ class Adafruit_USBH_Host { #endif bool begin(uint8_t rhport); - void task(void); + void task(uint32_t timeout_ms = UINT32_MAX, bool in_isr = false); //------------- internal usage -------------// static Adafruit_USBH_Host *_instance;