use tuh_task_ext()

This commit is contained in:
hathach 2023-10-27 15:30:46 +07:00
parent 9a83b0bda8
commit 2c80ef1f7d
2 changed files with 4 additions and 2 deletions

View file

@ -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.

View file

@ -69,7 +69,7 @@ public:
#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;