Add led pin for TFT, no control yet, just init at start

This commit is contained in:
Luc 2019-08-11 16:59:20 +02:00
parent 044ca00247
commit f57807cce9
2 changed files with 5 additions and 0 deletions

View File

@ -67,6 +67,7 @@
#define DISPLAY_FLIP_VERTICALY 1 //comment to disable #define DISPLAY_FLIP_VERTICALY 1 //comment to disable
#if (DISPLAY_DEVICE == TFT_SPI_ILI9341_320X240) || (DISPLAY_DEVICE == TFT_SPI_ILI9488_480X320) #if (DISPLAY_DEVICE == TFT_SPI_ILI9341_320X240) || (DISPLAY_DEVICE == TFT_SPI_ILI9488_480X320)
#define DISPLAY_TOUCH_DRIVER XPT2046_SPI #define DISPLAY_TOUCH_DRIVER XPT2046_SPI
#define DISPLAY_LED_PIN 33 //-1 if none
#endif //(DISPLAY_DEVICE == TFT_SPI_ILI9341_320X240) || (DISPLAY_DEVICE == TFT_SPI_ILI9488_480X320) #endif //(DISPLAY_DEVICE == TFT_SPI_ILI9341_320X240) || (DISPLAY_DEVICE == TFT_SPI_ILI9488_480X320)
#endif //DISPLAY_DEVICE #endif //DISPLAY_DEVICE

View File

@ -498,6 +498,10 @@ bool Display::begin()
#endif #endif
#endif //DISPLAY_DEVICE == OLED_I2C_SSD1306 || DISPLAY_DEVICE == OLED_I2C_SSDSH1106 #endif //DISPLAY_DEVICE == OLED_I2C_SSD1306 || DISPLAY_DEVICE == OLED_I2C_SSDSH1106
#if (DISPLAY_DEVICE == TFT_SPI_ILI9341_320X240) || (DISPLAY_DEVICE == TFT_SPI_ILI9488_480X320) #if (DISPLAY_DEVICE == TFT_SPI_ILI9341_320X240) || (DISPLAY_DEVICE == TFT_SPI_ILI9488_480X320)
#if defined (DISPLAY_LED_PIN) && (DISPLAY_LED_PIN!=-1)
pinMode(DISPLAY_LED_PIN, OUTPUT); // sets the digital pin 13 as output
digitalWrite(DISPLAY_LED_PIN, HIGH);
#endif //DISPLAY_LED_PIN
esp3d_screen.begin(); // Initialise the display esp3d_screen.begin(); // Initialise the display
#if defined(DISPLAY_FLIP_VERTICALY) #if defined(DISPLAY_FLIP_VERTICALY)
esp3d_screen.setRotation(3); esp3d_screen.setRotation(3);