@@ -234,6 +234,12 @@ void Adafruit_ST7735::initR(uint8_t options) {
234234 displayInit (Rcmd2green160x80);
235235 _colstart = 24 ;
236236 _rowstart = 0 ;
237+ } else if (options == INITR_GREENTAB160x80) {
238+ _height = ST7735_TFTWIDTH_80;
239+ _width = ST7735_TFTHEIGHT_160;
240+ displayInit (Rcmd2green160x80);
241+ _colstart = 26 ;
242+ _rowstart = 1 ;
237243 } else {
238244 // colstart, rowstart left at default '0' values
239245 displayInit (Rcmd2red);
@@ -246,6 +252,10 @@ void Adafruit_ST7735::initR(uint8_t options) {
246252 sendCommand (ST77XX_MADCTL, &data, 1 );
247253 }
248254
255+ if (options == INITR_GREENTAB160x80) {
256+ sendCommand (ST77XX_INVON, 0 );
257+ }
258+
249259 if (options == INITR_HALLOWING) {
250260 // Hallowing is simply a 1.44" green tab upside-down:
251261 tabcolor = INITR_144GREENTAB;
@@ -286,7 +296,7 @@ void Adafruit_ST7735::setRotation(uint8_t m) {
286296 if (tabcolor == INITR_144GREENTAB) {
287297 _height = ST7735_TFTHEIGHT_128;
288298 _width = ST7735_TFTWIDTH_128;
289- } else if (tabcolor == INITR_MINI160x80) {
299+ } else if (( tabcolor == INITR_MINI160x80) || (tabcolor == INITR_GREENTAB160x80) ) {
290300 _height = ST7735_TFTHEIGHT_160;
291301 _width = ST7735_TFTWIDTH_80;
292302 } else {
@@ -306,7 +316,7 @@ void Adafruit_ST7735::setRotation(uint8_t m) {
306316 if (tabcolor == INITR_144GREENTAB) {
307317 _width = ST7735_TFTHEIGHT_128;
308318 _height = ST7735_TFTWIDTH_128;
309- } else if (tabcolor == INITR_MINI160x80) {
319+ } else if (( tabcolor == INITR_MINI160x80) || (tabcolor == INITR_GREENTAB160x80) ) {
310320 _width = ST7735_TFTHEIGHT_160;
311321 _height = ST7735_TFTWIDTH_80;
312322 } else {
@@ -326,7 +336,7 @@ void Adafruit_ST7735::setRotation(uint8_t m) {
326336 if (tabcolor == INITR_144GREENTAB) {
327337 _height = ST7735_TFTHEIGHT_128;
328338 _width = ST7735_TFTWIDTH_128;
329- } else if (tabcolor == INITR_MINI160x80) {
339+ } else if (( tabcolor == INITR_MINI160x80) || (tabcolor == INITR_GREENTAB160x80) ) {
330340 _height = ST7735_TFTHEIGHT_160;
331341 _width = ST7735_TFTWIDTH_80;
332342 } else {
@@ -346,7 +356,7 @@ void Adafruit_ST7735::setRotation(uint8_t m) {
346356 if (tabcolor == INITR_144GREENTAB) {
347357 _width = ST7735_TFTHEIGHT_128;
348358 _height = ST7735_TFTWIDTH_128;
349- } else if (tabcolor == INITR_MINI160x80) {
359+ } else if (( tabcolor == INITR_MINI160x80) || (tabcolor == INITR_GREENTAB160x80) ) {
350360 _width = ST7735_TFTHEIGHT_160;
351361 _height = ST7735_TFTWIDTH_80;
352362 } else {
0 commit comments