Skip to content

Commit 1cfa067

Browse files
committed
Add a delay in case of WiFi shield use
Wait wifi shield initialization. Should be better to do in SpiDrv::begin() of WiFi library but it seems there is no more update on this library as shield is retired. Signed-off-by: Frederic.Pillon <[email protected]>
1 parent fa8391a commit 1cfa067

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: libraries/SPI/SPI.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ void SPIClass::begin(uint8_t _pin)
6161

6262
spi_init(&_spi, spiSettings[_pin].clk, spiSettings[_pin].dMode, spiSettings[_pin].msb);
6363
g_active_id = _pin;
64+
#if __has_include("WiFi.h")
65+
// Wait wifi shield initialization.
66+
// Should be better to do in SpiDrv::begin() of WiFi library but it seems
67+
// there is no more update on this library as shield is retired.
68+
delay(2000);
69+
#endif
70+
6471
}
6572

6673
void SPIClass::usingInterrupt(uint8_t interruptNumber)

0 commit comments

Comments
 (0)