mirror of
https://github.com/Bodmer/TFT_eSPI.git
synced 2025-08-04 05:04:42 +02:00
adds support for 160x80 ebay module
unknown module 160x80 BGR inverted, offset 26 differs from adafruit of same size
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
#define INITR_GREENTAB2 0x3 // Use if you get random pixels on two edges of green tab display
|
#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_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 INITB 0xB
|
#define INITB 0xB
|
||||||
|
|
||||||
|
|
||||||
@@ -38,6 +39,10 @@
|
|||||||
#define TAB_COLOUR INITR_GREENTAB128
|
#define TAB_COLOUR INITR_GREENTAB128
|
||||||
#define CGRAM_OFFSET
|
#define CGRAM_OFFSET
|
||||||
|
|
||||||
|
#elif defined (ST7735_GREENTAB160x80)
|
||||||
|
#define TAB_COLOUR INITR_GREENTAB160x80
|
||||||
|
#define CGRAM_OFFSET
|
||||||
|
|
||||||
#elif defined (ST7735_REDTAB)
|
#elif defined (ST7735_REDTAB)
|
||||||
#define TAB_COLOUR INITR_REDTAB
|
#define TAB_COLOUR INITR_REDTAB
|
||||||
|
|
||||||
|
@@ -173,6 +173,13 @@
|
|||||||
colstart = 0;
|
colstart = 0;
|
||||||
rowstart = 32;
|
rowstart = 32;
|
||||||
}
|
}
|
||||||
|
else if (tabcolor == INITR_GREENTAB160x80)
|
||||||
|
{
|
||||||
|
commandList(Rcmd2green);
|
||||||
|
writecommand(TFT_INVON);
|
||||||
|
colstart = 26;
|
||||||
|
rowstart = 1;
|
||||||
|
}
|
||||||
else if (tabcolor == INITR_REDTAB)
|
else if (tabcolor == INITR_REDTAB)
|
||||||
{
|
{
|
||||||
commandList(Rcmd2red);
|
commandList(Rcmd2red);
|
||||||
|
@@ -20,6 +20,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 = 0;
|
colstart = 0;
|
||||||
rowstart = 32;
|
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) {
|
} else if(tabcolor == INITB) {
|
||||||
writedata(TFT_MAD_MX | TFT_MAD_RGB);
|
writedata(TFT_MAD_MX | TFT_MAD_RGB);
|
||||||
} else {
|
} else {
|
||||||
@@ -43,6 +47,10 @@
|
|||||||
writedata(TFT_MAD_MV | TFT_MAD_MY | TFT_MAD_BGR);
|
writedata(TFT_MAD_MV | TFT_MAD_MY | TFT_MAD_BGR);
|
||||||
colstart = 32;
|
colstart = 32;
|
||||||
rowstart = 0;
|
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) {
|
} 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 {
|
||||||
@@ -66,6 +74,10 @@
|
|||||||
writedata(TFT_MAD_BGR);
|
writedata(TFT_MAD_BGR);
|
||||||
colstart = 0;
|
colstart = 0;
|
||||||
rowstart = 0;
|
rowstart = 0;
|
||||||
|
} else if(tabcolor == INITR_GREENTAB160x80) {
|
||||||
|
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 {
|
||||||
@@ -89,6 +101,10 @@
|
|||||||
writedata(TFT_MAD_MX | TFT_MAD_MV | TFT_MAD_BGR);
|
writedata(TFT_MAD_MX | TFT_MAD_MV | TFT_MAD_BGR);
|
||||||
colstart = 0;
|
colstart = 0;
|
||||||
rowstart = 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) {
|
} else if(tabcolor == INITB) {
|
||||||
writedata(TFT_MAD_MV | TFT_MAD_RGB);
|
writedata(TFT_MAD_MV | TFT_MAD_RGB);
|
||||||
} else {
|
} else {
|
||||||
|
@@ -24,6 +24,7 @@
|
|||||||
//#define M5STACK
|
//#define M5STACK
|
||||||
|
|
||||||
// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation
|
// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation
|
||||||
|
//#define TFT_WIDTH 80
|
||||||
//#define TFT_WIDTH 128
|
//#define TFT_WIDTH 128
|
||||||
//#define TFT_HEIGHT 160
|
//#define TFT_HEIGHT 160
|
||||||
//#define TFT_HEIGHT 128
|
//#define TFT_HEIGHT 128
|
||||||
@@ -40,6 +41,7 @@
|
|||||||
//#define ST7735_GREENTAB2
|
//#define ST7735_GREENTAB2
|
||||||
//#define ST7735_GREENTAB3
|
//#define ST7735_GREENTAB3
|
||||||
//#define ST7735_GREENTAB128 // For 128 x 128 display
|
//#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_REDTAB
|
||||||
//#define ST7735_BLACKTAB
|
//#define ST7735_BLACKTAB
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user