mirror of
https://github.com/Bodmer/TFT_eSPI.git
synced 2025-08-07 14:44:43 +02:00
@@ -15,6 +15,7 @@
|
||||
#define INITR_GREENTAB2 0x3 // Use if you get random pixels on two edges of green tab display
|
||||
#define INITR_GREENTAB3 0x4 // Use if you get random pixels on edge(s) of 128x128 screen
|
||||
#define INITR_GREENTAB128 0x5 // Use if you only get part of 128x128 screen in rotation 0 & 1
|
||||
#define INITR_GREENTAB160x80 0x6 // Use if you only get part of 128x128 screen in rotation 0 & 1
|
||||
#define INITB 0xB
|
||||
|
||||
|
||||
@@ -38,6 +39,10 @@
|
||||
#define TAB_COLOUR INITR_GREENTAB128
|
||||
#define CGRAM_OFFSET
|
||||
|
||||
#elif defined (ST7735_GREENTAB160x80)
|
||||
#define TAB_COLOUR INITR_GREENTAB160x80
|
||||
#define CGRAM_OFFSET
|
||||
|
||||
#elif defined (ST7735_REDTAB)
|
||||
#define TAB_COLOUR INITR_REDTAB
|
||||
|
||||
|
@@ -173,6 +173,13 @@
|
||||
colstart = 0;
|
||||
rowstart = 32;
|
||||
}
|
||||
else if (tabcolor == INITR_GREENTAB160x80)
|
||||
{
|
||||
commandList(Rcmd2green);
|
||||
writecommand(TFT_INVON);
|
||||
colstart = 26;
|
||||
rowstart = 1;
|
||||
}
|
||||
else if (tabcolor == INITR_REDTAB)
|
||||
{
|
||||
commandList(Rcmd2red);
|
||||
|
@@ -20,6 +20,10 @@
|
||||
writedata(TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_MH | TFT_MAD_BGR);
|
||||
colstart = 0;
|
||||
rowstart = 32;
|
||||
} else if(tabcolor == INITR_GREENTAB160x80) {
|
||||
writedata(TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_MH | TFT_MAD_BGR);
|
||||
colstart = 26;
|
||||
rowstart = 1;
|
||||
} else if(tabcolor == INITB) {
|
||||
writedata(TFT_MAD_MX | TFT_MAD_RGB);
|
||||
} else {
|
||||
@@ -43,6 +47,10 @@
|
||||
writedata(TFT_MAD_MV | TFT_MAD_MY | TFT_MAD_BGR);
|
||||
colstart = 32;
|
||||
rowstart = 0;
|
||||
} else if(tabcolor == INITR_GREENTAB160x80) {
|
||||
writedata(TFT_MAD_MV | TFT_MAD_MY | TFT_MAD_BGR);
|
||||
colstart = 1;
|
||||
rowstart = 26;
|
||||
} else if(tabcolor == INITB) {
|
||||
writedata(TFT_MAD_MV | TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_RGB);
|
||||
} else {
|
||||
@@ -66,6 +74,10 @@
|
||||
writedata(TFT_MAD_BGR);
|
||||
colstart = 0;
|
||||
rowstart = 0;
|
||||
} else if(tabcolor == INITR_GREENTAB160x80) {
|
||||
writedata(TFT_MAD_BGR);
|
||||
colstart = 0;
|
||||
rowstart = 0;
|
||||
} else if(tabcolor == INITB) {
|
||||
writedata(TFT_MAD_MY | TFT_MAD_RGB);
|
||||
} else {
|
||||
@@ -89,6 +101,10 @@
|
||||
writedata(TFT_MAD_MX | TFT_MAD_MV | TFT_MAD_BGR);
|
||||
colstart = 0;
|
||||
rowstart = 0;
|
||||
} else if(tabcolor == INITR_GREENTAB160x80) {
|
||||
writedata(TFT_MAD_MX | TFT_MAD_MV | TFT_MAD_BGR);
|
||||
colstart = 1;
|
||||
rowstart = 26;
|
||||
} else if(tabcolor == INITB) {
|
||||
writedata(TFT_MAD_MV | TFT_MAD_RGB);
|
||||
} else {
|
||||
|
18
User_Setup.h
18
User_Setup.h
@@ -30,8 +30,9 @@
|
||||
//#define M5STACK
|
||||
|
||||
// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation
|
||||
//#define TFT_WIDTH 128
|
||||
//#define TFT_HEIGHT 160
|
||||
// #define TFT_WIDTH 80
|
||||
// #define TFT_WIDTH 128
|
||||
// #define TFT_HEIGHT 160
|
||||
//#define TFT_HEIGHT 128
|
||||
|
||||
// For ST7735 ONLY, define the type of display, originally this was based on the
|
||||
@@ -41,12 +42,13 @@
|
||||
// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this
|
||||
// this User_Setup file, then rebuild and upload the sketch to the board again:
|
||||
|
||||
//#define ST7735_INITB
|
||||
//#define ST7735_GREENTAB
|
||||
//#define ST7735_GREENTAB2
|
||||
//#define ST7735_GREENTAB3
|
||||
//#define ST7735_GREENTAB128 // For 128 x 128 display
|
||||
//#define ST7735_REDTAB
|
||||
// #define ST7735_INITB
|
||||
// #define ST7735_GREENTAB
|
||||
// #define ST7735_GREENTAB2
|
||||
// #define ST7735_GREENTAB3
|
||||
// #define ST7735_GREENTAB128 // For 128 x 128 display
|
||||
// #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
|
||||
// #define ST7735_REDTAB
|
||||
//#define ST7735_BLACKTAB
|
||||
|
||||
// ##################################################################################
|
||||
|
@@ -24,6 +24,7 @@
|
||||
//#define M5STACK
|
||||
|
||||
// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation
|
||||
//#define TFT_WIDTH 80
|
||||
//#define TFT_WIDTH 128
|
||||
//#define TFT_HEIGHT 160
|
||||
//#define TFT_HEIGHT 128
|
||||
@@ -40,6 +41,7 @@
|
||||
//#define ST7735_GREENTAB2
|
||||
//#define ST7735_GREENTAB3
|
||||
//#define ST7735_GREENTAB128 // For 128 x 128 display
|
||||
//#define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
|
||||
//#define ST7735_REDTAB
|
||||
//#define ST7735_BLACKTAB
|
||||
|
||||
|
Reference in New Issue
Block a user