Add backlight support
The backlight control pin and ON state can be defined in the setup.h file. Addresses #229, #226, #221 Comments updated and ILI9488 warning added.
This commit is contained in:
1 parent
05359a4dff
commit
4e6736e596
6 files changed
+68
-41
No files matched your search
@@ -327,6 +327,17 @@ void TFT_eSPI::init(uint8_t tc)
|
||||
writecommand(TFT_SWRST); // Software reset
|
||||
#endif
|
||||
|
||||
#if defined (TFT_BL) && defined (TFT_BACKLIGHT_ON)
|
||||
digitalWrite(TFT_BL, TFT_BACKLIGHT_ON);
|
||||
pinMode(TFT_BL, OUTPUT);
|
||||
#else
|
||||
#if defined (TFT_BL) && defined (M5STACK)
|
||||
// Turn on the back-light LED
|
||||
digitalWrite(TFT_BL, HIGH);
|
||||
pinMode(TFT_BL, OUTPUT);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
spi_end();
|
||||
delay(150); // Wait for reset to complete
|
||||
|
||||
|
||||
Reference in new issue
Block a user