Unverified Commit c7735a8b authored by Bodmer's avatar Bodmer Committed by GitHub

Merge pull request #236 from yknivag/master

ICST7735S red-tabbed 80x160 support
parents 21811b17 2aeb09db
...@@ -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 = 24;
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)
// ################################################################################## // ##################################################################################
// //
......
...@@ -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)
// ################################################################################## // ##################################################################################
// //
......
{ {
"name": "TFT_eSPI", "name": "TFT_eSPI",
"version": "1.1.3", "version": "1.1.4",
"keywords": "tft, ePaper, display, ESP8266, NodeMCU, ESP32, M5Stack, ILI9341, ST7735, ILI9163, S6D02A1, ILI9486, ST7789", "keywords": "tft, ePaper, display, ESP8266, NodeMCU, ESP32, M5Stack, ILI9341, ST7735, ILI9163, S6D02A1, ILI9486, ST7789",
"description": "A TFT and ePaper SPI graphics library for ESP8266 and ESP32", "description": "A TFT and ePaper SPI graphics library for ESP8266 and ESP32",
"repository": "repository":
......
name=TFT_eSPI name=TFT_eSPI
version=1.1.3 version=1.1.4
author=Bodmer author=Bodmer
maintainer=Bodmer maintainer=Bodmer
sentence=A fast TFT graphics library for ESP8266 and ESP32 processors for the Arduino IDE sentence=A fast TFT graphics library for ESP8266 and ESP32 processors for the Arduino IDE
......
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