Skip to content

Commit a37d350

Browse files
committed
Remove feed_watchdog check
1 parent 162049a commit a37d350

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

src/utility/server_drv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ void ServerDrv::startClient(const char* host, uint8_t host_len, uint32_t ipAddre
130130

131131
SpiDrv::spiSlaveDeselect();
132132
//Wait the reply elaboration
133-
SpiDrv::waitForSlaveReady(/* feed_watchdog = */ (protMode == TLS_BEARSSL_MODE));
133+
SpiDrv::waitForSlaveReady();
134134
SpiDrv::spiSlaveSelect();
135135

136136
// Wait for reply

src/utility/spi_drv.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,16 +215,14 @@ void SpiDrv::waitForSlaveSign()
215215
while (!waitSlaveSign());
216216
}
217217

218-
void SpiDrv::waitForSlaveReady(bool const feed_watchdog)
218+
void SpiDrv::waitForSlaveReady()
219219
{
220-
unsigned long trigger_time = millis() + 10000;
220+
unsigned long trigger_time = millis();
221221
while (!waitSlaveReady())
222222
{
223-
if (feed_watchdog) {
224-
if (static_cast<int32_t>(trigger_time - millis()) <=0) {
225-
WiFi.feedWatchdog();
226-
trigger_time = millis() + 10000;
227-
}
223+
if (static_cast<int32_t>(trigger_time - millis()) <=0) {
224+
WiFi.feedWatchdog();
225+
trigger_time = millis() + 10000;
228226
}
229227
}
230228
}

src/utility/spi_drv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class SpiDrv
5959

6060
static char spiTransfer(volatile char data);
6161

62-
static void waitForSlaveReady(bool const feed_watchdog = false);
62+
static void waitForSlaveReady();
6363

6464
//static int waitSpiChar(char waitChar, char* readChar);
6565

0 commit comments

Comments
 (0)