Skip to content

Commit 2c80ef1

Browse files
committed
use tuh_task_ext()
1 parent 9a83b0b commit 2c80ef1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/arduino/Adafruit_USBH_Host.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ bool Adafruit_USBH_Host::begin(uint8_t rhport) {
121121
return tuh_init(rhport);
122122
}
123123

124-
void Adafruit_USBH_Host::task(void) { tuh_task(); }
124+
void Adafruit_USBH_Host::task(uint32_t timeout_ms, bool in_isr) {
125+
tuh_task_ext(timeout_ms, in_isr);
126+
}
125127

126128
// Invoked when device with hid interface is mounted
127129
// Report descriptor is also available for use.

src/arduino/Adafruit_USBH_Host.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class Adafruit_USBH_Host {
6969
#endif
7070

7171
bool begin(uint8_t rhport);
72-
void task(void);
72+
void task(uint32_t timeout_ms = UINT32_MAX, bool in_isr = false);
7373

7474
//------------- internal usage -------------//
7575
static Adafruit_USBH_Host *_instance;

0 commit comments

Comments
 (0)