diff --git a/examples/board_qc/board_qc.ino b/examples/board_qc/board_qc.ino index 573c3ce0..12d70c6c 100644 --- a/examples/board_qc/board_qc.ino +++ b/examples/board_qc/board_qc.ino @@ -60,6 +60,9 @@ void setup() { uint8_t sample_rd = 0; uint8_t gpinpol_copy = Usb.regRd(rGPINPOL); for(uint8_t i = 0; i < 16; i++) { +#ifdef ESP8266 + yield(); // needed in order to reset the watchdog timer on the ESP8266 +#endif for(uint16_t j = 0; j < 65535; j++) { Usb.regWr(rGPINPOL, sample_wr); sample_rd = Usb.regRd(rGPINPOL); @@ -206,7 +209,11 @@ void loop() { print_hex(buf.bNumConfigurations, 8); /**/ E_Notify(PSTR("\r\n\nAll tests passed. Press RESET to restart test"), 0x80); - while(1); + while(1) { +#ifdef ESP8266 + yield(); // needed in order to reset the watchdog timer on the ESP8266 +#endif + } } break; case( USB_STATE_ERROR): @@ -228,6 +235,9 @@ void halt55() { while(1) { Usb.regWr(0x55, 0x55); +#ifdef ESP8266 + yield(); // needed in order to reset the watchdog timer on the ESP8266 +#endif } } @@ -253,7 +263,11 @@ void print_hex(int v, int num_places) { /* prints "Press any key" and returns when key is pressed */ void press_any_key() { E_Notify(PSTR("\r\nPress any key to continue..."), 0x80); - while(Serial.available() <= 0); //wait for input + while(Serial.available() <= 0) { // wait for input +#ifdef ESP8266 + yield(); // needed in order to reset the watchdog timer on the ESP8266 +#endif + } Serial.read(); //empty input buffer return; }