File tree Expand file tree Collapse file tree 5 files changed +40
-8
lines changed Expand file tree Collapse file tree 5 files changed +40
-8
lines changed Original file line number Diff line number Diff line change 1515#define INITR_GREENTAB2 0x3 // Use if you get random pixels on two edges of green tab display
1616#define INITR_GREENTAB3 0x4 // Use if you get random pixels on edge(s) of 128x128 screen
1717#define INITR_GREENTAB128 0x5 // Use if you only get part of 128x128 screen in rotation 0 & 1
18+ #define INITR_GREENTAB160x80 0x6 // Use if you only get part of 128x128 screen in rotation 0 & 1
1819#define INITB 0xB
1920
2021
3839 #define TAB_COLOUR INITR_GREENTAB128
3940 #define CGRAM_OFFSET
4041
42+ #elif defined (ST7735_GREENTAB160x80 )
43+ #define TAB_COLOUR INITR_GREENTAB160x80
44+ #define CGRAM_OFFSET
45+
4146#elif defined (ST7735_REDTAB )
4247 #define TAB_COLOUR INITR_REDTAB
4348
Original file line number Diff line number Diff line change 173173 colstart = 0 ;
174174 rowstart = 32 ;
175175 }
176+ else if (tabcolor == INITR_GREENTAB160x80 )
177+ {
178+ commandList (Rcmd2green );
179+ writecommand (TFT_INVON );
180+ colstart = 26 ;
181+ rowstart = 1 ;
182+ }
176183 else if (tabcolor == INITR_REDTAB )
177184 {
178185 commandList (Rcmd2red );
Original file line number Diff line number Diff line change 2020 writedata (TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_MH | TFT_MAD_BGR );
2121 colstart = 0 ;
2222 rowstart = 32 ;
23+ } else if (tabcolor == INITR_GREENTAB160x80 ) {
24+ writedata (TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_MH | TFT_MAD_BGR );
25+ colstart = 26 ;
26+ rowstart = 1 ;
2327 } else if (tabcolor == INITB ) {
2428 writedata (TFT_MAD_MX | TFT_MAD_RGB );
2529 } else {
4347 writedata (TFT_MAD_MV | TFT_MAD_MY | TFT_MAD_BGR );
4448 colstart = 32 ;
4549 rowstart = 0 ;
50+ } else if (tabcolor == INITR_GREENTAB160x80 ) {
51+ writedata (TFT_MAD_MV | TFT_MAD_MY | TFT_MAD_BGR );
52+ colstart = 1 ;
53+ rowstart = 26 ;
4654 } else if (tabcolor == INITB ) {
4755 writedata (TFT_MAD_MV | TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_RGB );
4856 } else {
6674 writedata (TFT_MAD_BGR );
6775 colstart = 0 ;
6876 rowstart = 0 ;
77+ } else if (tabcolor == INITR_GREENTAB160x80 ) {
78+ writedata (TFT_MAD_BGR );
79+ colstart = 0 ;
80+ rowstart = 0 ;
6981 } else if (tabcolor == INITB ) {
7082 writedata (TFT_MAD_MY | TFT_MAD_RGB );
7183 } else {
89101 writedata (TFT_MAD_MX | TFT_MAD_MV | TFT_MAD_BGR );
90102 colstart = 0 ;
91103 rowstart = 0 ;
104+ } else if (tabcolor == INITR_GREENTAB160x80 ) {
105+ writedata (TFT_MAD_MX | TFT_MAD_MV | TFT_MAD_BGR );
106+ colstart = 1 ;
107+ rowstart = 26 ;
92108 } else if (tabcolor == INITB ) {
93109 writedata (TFT_MAD_MV | TFT_MAD_RGB );
94110 } else {
Original file line number Diff line number Diff line change 3030//#define M5STACK
3131
3232// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation
33- //#define TFT_WIDTH 128
34- //#define TFT_HEIGHT 160
33+ // #define TFT_WIDTH 80
34+ // #define TFT_WIDTH 128
35+ // #define TFT_HEIGHT 160
3536//#define TFT_HEIGHT 128
3637
3738// For ST7735 ONLY, define the type of display, originally this was based on the
4142// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this
4243// this User_Setup file, then rebuild and upload the sketch to the board again:
4344
44- //#define ST7735_INITB
45- //#define ST7735_GREENTAB
46- //#define ST7735_GREENTAB2
47- //#define ST7735_GREENTAB3
48- //#define ST7735_GREENTAB128 // For 128 x 128 display
49- //#define ST7735_REDTAB
45+ // #define ST7735_INITB
46+ // #define ST7735_GREENTAB
47+ // #define ST7735_GREENTAB2
48+ // #define ST7735_GREENTAB3
49+ // #define ST7735_GREENTAB128 // For 128 x 128 display
50+ // #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
51+ // #define ST7735_REDTAB
5052//#define ST7735_BLACKTAB
5153
5254// ##################################################################################
Original file line number Diff line number Diff line change 2424//#define M5STACK
2525
2626// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation
27+ //#define TFT_WIDTH 80
2728//#define TFT_WIDTH 128
2829//#define TFT_HEIGHT 160
2930//#define TFT_HEIGHT 128
4041//#define ST7735_GREENTAB2
4142//#define ST7735_GREENTAB3
4243//#define ST7735_GREENTAB128 // For 128 x 128 display
44+ //#define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
4345//#define ST7735_REDTAB
4446//#define ST7735_BLACKTAB
4547
You can’t perform that action at this time.
0 commit comments