Commit d4ff3c8d authored by Gavin Smalley's avatar Gavin Smalley

Add support for red-tabbed 80x160 screen.

parent cbc2e66d
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#define INITR_GREENTAB3 0x4 // Use if you get random pixels on edge(s) of 128x128 screen #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_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 INITR_GREENTAB160x80 0x6 // Use if you only get part of 128x128 screen in rotation 0 & 1
#define INITR_REDTAB160x80 0x7 // Added for https://www.aliexpress.com/item/ShengYang-1pcs-IPS-0-96-inch-7P-SPI-HD-65K-Full-Color-OLED-Module-ST7735-Drive/32918394604.html
#define INITB 0xB #define INITB 0xB
...@@ -42,6 +43,10 @@ ...@@ -42,6 +43,10 @@
#elif defined (ST7735_GREENTAB160x80) #elif defined (ST7735_GREENTAB160x80)
#define TAB_COLOUR INITR_GREENTAB160x80 #define TAB_COLOUR INITR_GREENTAB160x80
#define CGRAM_OFFSET #define CGRAM_OFFSET
#elif defined (ST7735_REDTAB160x80)
#define TAB_COLOUR INITR_REDTAB160x80
#define CGRAM_OFFSET
#elif defined (ST7735_REDTAB) #elif defined (ST7735_REDTAB)
#define TAB_COLOUR INITR_REDTAB #define TAB_COLOUR INITR_REDTAB
......
...@@ -180,6 +180,12 @@ ...@@ -180,6 +180,12 @@
colstart = 26; colstart = 26;
rowstart = 1; rowstart = 1;
} }
else if (tabcolor == INITR_REDTAB160x80)
{
commandList(Rcmd2green);
colstart = 24;
rowstart = 0;
}
else if (tabcolor == INITR_REDTAB) else if (tabcolor == INITR_REDTAB)
{ {
commandList(Rcmd2red); commandList(Rcmd2red);
......
...@@ -24,6 +24,10 @@ ...@@ -24,6 +24,10 @@
writedata(TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_MH | TFT_MAD_BGR); writedata(TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_MH | TFT_MAD_BGR);
colstart = 26; colstart = 26;
rowstart = 1; rowstart = 1;
} else if(tabcolor == INITR_REDTAB160x80) {
writedata(TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_MH | TFT_MAD_BGR);
colstart = 24;
rowstart = 0;
} else if(tabcolor == INITB) { } else if(tabcolor == INITB) {
writedata(TFT_MAD_MX | TFT_MAD_RGB); writedata(TFT_MAD_MX | TFT_MAD_RGB);
} else { } else {
...@@ -51,6 +55,10 @@ ...@@ -51,6 +55,10 @@
writedata(TFT_MAD_MV | TFT_MAD_MY | TFT_MAD_BGR); writedata(TFT_MAD_MV | TFT_MAD_MY | TFT_MAD_BGR);
colstart = 1; colstart = 1;
rowstart = 26; rowstart = 26;
} else if(tabcolor == INITR_REDTAB160x80) {
writedata(TFT_MAD_MV | TFT_MAD_MY | TFT_MAD_BGR);
colstart = 0;
rowstart = 24;
} else if(tabcolor == INITB) { } else if(tabcolor == INITB) {
writedata(TFT_MAD_MV | TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_RGB); writedata(TFT_MAD_MV | TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_RGB);
} else { } else {
...@@ -78,6 +86,10 @@ ...@@ -78,6 +86,10 @@
writedata(TFT_MAD_BGR); writedata(TFT_MAD_BGR);
colstart = 0; colstart = 0;
rowstart = 0; rowstart = 0;
} else if(tabcolor == INITR_REDTAB160x80) {
writedata(TFT_MAD_BGR);
colstart = 0;
rowstart = 0;
} else if(tabcolor == INITB) { } else if(tabcolor == INITB) {
writedata(TFT_MAD_MY | TFT_MAD_RGB); writedata(TFT_MAD_MY | TFT_MAD_RGB);
} else { } else {
...@@ -105,6 +117,10 @@ ...@@ -105,6 +117,10 @@
writedata(TFT_MAD_MX | TFT_MAD_MV | TFT_MAD_BGR); writedata(TFT_MAD_MX | TFT_MAD_MV | TFT_MAD_BGR);
colstart = 1; colstart = 1;
rowstart = 26; rowstart = 26;
} else if(tabcolor == INITR_REDTAB160x80) {
writedata(TFT_MAD_MX | TFT_MAD_MV | TFT_MAD_BGR);
colstart = 0;
rowstart = 24;
} else if(tabcolor == INITB) { } else if(tabcolor == INITB) {
writedata(TFT_MAD_MV | TFT_MAD_RGB); writedata(TFT_MAD_MV | TFT_MAD_RGB);
} else { } else {
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
// #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset) // #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
// #define ST7735_REDTAB // #define ST7735_REDTAB
// #define ST7735_BLACKTAB // #define ST7735_BLACKTAB
// #define ST7735_REDTAB160x80 // For 160 x 80 display (24 offset) (https://www.aliexpress.com/item/ShengYang-1pcs-IPS-0-96-inch-7P-SPI-HD-65K-Full-Color-OLED-Module-ST7735-Drive/32918394604.html)
// ################################################################################## // ##################################################################################
// //
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment