Skip to content

Commit 70b3f82

Browse files
committed
fix(eth): Fix ETH.stop() with IDF SPI
1 parent 097f2ab commit 70b3f82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libraries/Ethernet/src/ETH.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ bool ETHClass::beginSPI(
553553
buscfg.data7_io_num = -1;
554554
buscfg.max_transfer_sz = -1;
555555
ret = spi_bus_initialize(spi_host, &buscfg, SPI_DMA_CH_AUTO);
556-
if (ret != ESP_OK) {
556+
if (ret != ESP_OK && ret != ESP_ERR_INVALID_STATE) {
557557
log_e("SPI bus initialize failed: %d", ret);
558558
return false;
559559
}

0 commit comments

Comments
 (0)