mirror of
https://github.com/Bodmer/TFT_eSPI.git
synced 2025-08-04 13:14:46 +02:00
Allow generic driver to use a custom SPI port
I have a SeeedStudio Wio Terminal. I'm using this lib in VS Code with PlatformIO but the lib don't use the `SPICOM` variable when it's a generic device. Steps to reproduce (using a Wio Terminal): * Create a project using PlatformIO * Add the TFT_eSPI lib to the project * Add in the build flags these lines ``` build_flags = -DUSER_SETUP_LOADED=1 -DILI9341_DRIVER=1 -DHASSPI=1 -DSPICOM=LCD_SPI -DTFT_CS=LCD_SS_PIN -DTFT_DC=LCD_DC -DTFT_RST=LCD_RESET -DTFT_BL=LCD_BACKLIGHT -DTFT_BACKLIGHT_ON=HIGH -DTFT_BACKLINGT_V=2000 ``` * Compile and transfer to the device => only backlight works
This commit is contained in:
@@ -7,7 +7,11 @@
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Select the SPI port to use
|
||||
#ifndef SPICOM
|
||||
SPIClass& spi = SPI;
|
||||
#else
|
||||
SPIClass& spi = SPICOM;
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
#if defined (TFT_SDA_READ) && !defined (TFT_PARALLEL_8_BIT)
|
||||
|
Reference in New Issue
Block a user