Merge 9cad339bc7 into 167dcd5373
This commit is contained in:
commit
c44a5d79f4
|
|
@ -198,9 +198,16 @@ void TFT_eSPI::init(void)
|
||||||
SPI.setFrequency(SPI_FREQUENCY);
|
SPI.setFrequency(SPI_FREQUENCY);
|
||||||
|
|
||||||
#ifdef ESP32 // Unlock the SPI hal mutex and set the lock management flags
|
#ifdef ESP32 // Unlock the SPI hal mutex and set the lock management flags
|
||||||
|
#ifdef SUPPORT_TRANSACTIONS
|
||||||
SPI.beginTransaction(SPISettings(SPI_FREQUENCY, MSBFIRST, SPI_MODE0));
|
SPI.beginTransaction(SPISettings(SPI_FREQUENCY, MSBFIRST, SPI_MODE0));
|
||||||
inTransaction = true; // Flag to stop intermediate spi_end calls
|
inTransaction = true; // Flag to stop intermediate spi_end calls
|
||||||
locked = false; // Flag to stop repeat beginTransaction calls
|
locked = false; // Flag to stop repeat beginTransaction calls
|
||||||
|
#else
|
||||||
|
SPI.begin(TFT_SCLK,TFT_MISO,TFT_MOSI);
|
||||||
|
SPI.setFrequency(SPI_FREQUENCY);
|
||||||
|
SPI.setBitOrder(MSBFIRST);
|
||||||
|
SPI.setDataMode(SPI_MODE0);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue