fix(eth): Fix ETH.stop() with IDF SPI (#9693)

This commit is contained in:
Me No Dev 2024-05-27 15:30:01 +03:00 committed by GitHub
parent 097f2ab903
commit 4717585421
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -553,7 +553,7 @@ bool ETHClass::beginSPI(
buscfg.data7_io_num = -1;
buscfg.max_transfer_sz = -1;
ret = spi_bus_initialize(spi_host, &buscfg, SPI_DMA_CH_AUTO);
if (ret != ESP_OK) {
if (ret != ESP_OK && ret != ESP_ERR_INVALID_STATE) {
log_e("SPI bus initialize failed: %d", ret);
return false;
}