mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Fix ESP RTOS WDT corner case, add W32
This commit is contained in:
parent
9546dcb722
commit
84b186152b
1 changed files with 2 additions and 2 deletions
4
Usb.cpp
4
Usb.cpp
|
@ -382,7 +382,7 @@ uint8_t USB::dispatchPkt(uint8_t token, uint8_t ep, uint16_t nak_limit) {
|
||||||
uint16_t nak_count = 0;
|
uint16_t nak_count = 0;
|
||||||
|
|
||||||
while((int32_t)((uint32_t)millis() - timeout) < 0L) {
|
while((int32_t)((uint32_t)millis() - timeout) < 0L) {
|
||||||
#ifdef ESP8266
|
#if defined(ESP8266) || defined(ESP32)
|
||||||
yield(); // needed in order to reset the watchdog timer on the ESP8266
|
yield(); // needed in order to reset the watchdog timer on the ESP8266
|
||||||
#endif
|
#endif
|
||||||
regWr(rHXFR, (token | ep)); //launch the transfer
|
regWr(rHXFR, (token | ep)); //launch the transfer
|
||||||
|
@ -390,7 +390,7 @@ uint8_t USB::dispatchPkt(uint8_t token, uint8_t ep, uint16_t nak_limit) {
|
||||||
|
|
||||||
while((int32_t)((uint32_t)millis() - timeout) < 0L) //wait for transfer completion
|
while((int32_t)((uint32_t)millis() - timeout) < 0L) //wait for transfer completion
|
||||||
{
|
{
|
||||||
#ifdef ESP8266
|
#if defined(ESP8266) || defined(ESP32)
|
||||||
yield(); // needed in order to reset the watchdog timer on the ESP8266
|
yield(); // needed in order to reset the watchdog timer on the ESP8266
|
||||||
#endif
|
#endif
|
||||||
tmpdata = regRd(rHIRQ);
|
tmpdata = regRd(rHIRQ);
|
||||||
|
|
Loading…
Reference in a new issue