From 84b186152bbb0800f4a3c2a1df83d7a839434cfa Mon Sep 17 00:00:00 2001 From: "Andrew J. Kroll" Date: Sat, 13 Jan 2018 22:36:35 -0500 Subject: [PATCH] Fix ESP RTOS WDT corner case, add W32 --- Usb.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Usb.cpp b/Usb.cpp index d43d63b6..d599c216 100644 --- a/Usb.cpp +++ b/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; 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 #endif 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 { -#ifdef ESP8266 +#if defined(ESP8266) || defined(ESP32) yield(); // needed in order to reset the watchdog timer on the ESP8266 #endif tmpdata = regRd(rHIRQ);