Update for WROVER to address #232

The library supported 240x240 ST7789 displays only which require an 80
pixel offset in rotation 2 and 3
The library now also supports the 240x320 display which has a different
RGB colour order.
This commit is contained in:
Bodmer
2018-11-06 00:41:14 +00:00
parent 8d29c396e3
commit cbc2e66dfd
7 changed files with 112 additions and 45 deletions
+8 -1
View File
@@ -14,7 +14,12 @@
//------------------------------display and color format setting--------------------------------//
writecommand(ST7789_MADCTL);
writedata(0x00);
writedata(0x48);
#ifdef CGRAM_OFFSET
writedata(0x48); // BGR colour order for 240 x 240 TFT
#else
writedata(0x40); // RGB colour order for 240 x 320 TFT (Issue #232)
#endif
// JLX240 display datasheet
writecommand(0xB6);
@@ -114,7 +119,9 @@
writecommand(ST7789_DISPON); //Display on
#ifdef TFT_BL
// Turn on the back-light LED
digitalWrite(TFT_BL, HIGH);
pinMode(TFT_BL, OUTPUT);
#endif
}