mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 19:26:37 +00:00
Fix SPI regression from 9.1
This commit is contained in:
parent
743109d0c8
commit
7be7d96de6
@ -1597,12 +1597,12 @@ void GpioInit(void)
|
|||||||
#ifdef USE_SPI
|
#ifdef USE_SPI
|
||||||
TasmotaGlobal.spi_enabled = (((PinUsed(GPIO_SPI_CS) && (Pin(GPIO_SPI_CS) > 14)) || (Pin(GPIO_SPI_CS) < 12)) || ((PinUsed(GPIO_SPI_DC) && (Pin(GPIO_SPI_DC) > 14)) || (Pin(GPIO_SPI_DC) < 12)));
|
TasmotaGlobal.spi_enabled = (((PinUsed(GPIO_SPI_CS) && (Pin(GPIO_SPI_CS) > 14)) || (Pin(GPIO_SPI_CS) < 12)) || ((PinUsed(GPIO_SPI_DC) && (Pin(GPIO_SPI_DC) > 14)) || (Pin(GPIO_SPI_DC) < 12)));
|
||||||
if (TasmotaGlobal.spi_enabled) {
|
if (TasmotaGlobal.spi_enabled) {
|
||||||
TasmotaGlobal.my_module.io[12] = GPIO_SPI_MISO;
|
TasmotaGlobal.my_module.io[12] = AGPIO(GPIO_SPI_MISO);
|
||||||
SetPin(12, GPIO_SPI_MISO);
|
SetPin(12, AGPIO(GPIO_SPI_MISO));
|
||||||
TasmotaGlobal.my_module.io[13] = GPIO_SPI_MOSI;
|
TasmotaGlobal.my_module.io[13] = AGPIO(GPIO_SPI_MOSI);
|
||||||
SetPin(13, GPIO_SPI_MOSI);
|
SetPin(13, AGPIO(GPIO_SPI_MOSI));
|
||||||
TasmotaGlobal.my_module.io[14] = GPIO_SPI_CLK;
|
TasmotaGlobal.my_module.io[14] = AGPIO(GPIO_SPI_CLK);
|
||||||
SetPin(14, GPIO_SPI_CLK);
|
SetPin(14, AGPIO(GPIO_SPI_CLK));
|
||||||
AddLog_P(LOG_LEVEL_DEBUG, PSTR("SPI: Using GPIO12(MISO), GPIO13(MOSI) and GPIO14(CLK)"));
|
AddLog_P(LOG_LEVEL_DEBUG, PSTR("SPI: Using GPIO12(MISO), GPIO13(MOSI) and GPIO14(CLK)"));
|
||||||
}
|
}
|
||||||
#endif // USE_SPI
|
#endif // USE_SPI
|
||||||
|
Loading…
x
Reference in New Issue
Block a user