Added Second SPI option for Touchpad driver

This commit is contained in:
Hamid Saffari 2020-03-27 16:55:47 +04:30 committed by GitHub
parent 18b743aaec
commit e28afbc3ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -307,6 +307,12 @@ void TFT_eSPI::init(uint8_t tc)
#endif
#endif
#if defined (TOUCH_CS) && defined(SPI2_for_TOUCH_PORT)
//spi_touch.setFrequency(SPI_TOUCH_FREQUENCY);
spi_touch.begin();
spi_touch.beginTransaction(SPISettings(SPI_TOUCH_FREQUENCY, MSBFIRST, SPI_MODE0));
#endif
inTransaction = false;
locked = true;