@@ -234,6 +234,12 @@ void Adafruit_ST7735::initR(uint8_t options) {
234
234
displayInit (Rcmd2green160x80);
235
235
_colstart = 24 ;
236
236
_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 ;
237
243
} else {
238
244
// colstart, rowstart left at default '0' values
239
245
displayInit (Rcmd2red);
@@ -246,6 +252,10 @@ void Adafruit_ST7735::initR(uint8_t options) {
246
252
sendCommand (ST77XX_MADCTL, &data, 1 );
247
253
}
248
254
255
+ if (options == INITR_GREENTAB160x80) {
256
+ sendCommand (ST77XX_INVON, 0 );
257
+ }
258
+
249
259
if (options == INITR_HALLOWING) {
250
260
// Hallowing is simply a 1.44" green tab upside-down:
251
261
tabcolor = INITR_144GREENTAB;
@@ -286,7 +296,7 @@ void Adafruit_ST7735::setRotation(uint8_t m) {
286
296
if (tabcolor == INITR_144GREENTAB) {
287
297
_height = ST7735_TFTHEIGHT_128;
288
298
_width = ST7735_TFTWIDTH_128;
289
- } else if (tabcolor == INITR_MINI160x80) {
299
+ } else if (( tabcolor == INITR_MINI160x80) || (tabcolor == INITR_GREENTAB160x80) ) {
290
300
_height = ST7735_TFTHEIGHT_160;
291
301
_width = ST7735_TFTWIDTH_80;
292
302
} else {
@@ -306,7 +316,7 @@ void Adafruit_ST7735::setRotation(uint8_t m) {
306
316
if (tabcolor == INITR_144GREENTAB) {
307
317
_width = ST7735_TFTHEIGHT_128;
308
318
_height = ST7735_TFTWIDTH_128;
309
- } else if (tabcolor == INITR_MINI160x80) {
319
+ } else if (( tabcolor == INITR_MINI160x80) || (tabcolor == INITR_GREENTAB160x80) ) {
310
320
_width = ST7735_TFTHEIGHT_160;
311
321
_height = ST7735_TFTWIDTH_80;
312
322
} else {
@@ -326,7 +336,7 @@ void Adafruit_ST7735::setRotation(uint8_t m) {
326
336
if (tabcolor == INITR_144GREENTAB) {
327
337
_height = ST7735_TFTHEIGHT_128;
328
338
_width = ST7735_TFTWIDTH_128;
329
- } else if (tabcolor == INITR_MINI160x80) {
339
+ } else if (( tabcolor == INITR_MINI160x80) || (tabcolor == INITR_GREENTAB160x80) ) {
330
340
_height = ST7735_TFTHEIGHT_160;
331
341
_width = ST7735_TFTWIDTH_80;
332
342
} else {
@@ -346,7 +356,7 @@ void Adafruit_ST7735::setRotation(uint8_t m) {
346
356
if (tabcolor == INITR_144GREENTAB) {
347
357
_width = ST7735_TFTHEIGHT_128;
348
358
_height = ST7735_TFTWIDTH_128;
349
- } else if (tabcolor == INITR_MINI160x80) {
359
+ } else if (( tabcolor == INITR_MINI160x80) || (tabcolor == INITR_GREENTAB160x80) ) {
350
360
_width = ST7735_TFTHEIGHT_160;
351
361
_height = ST7735_TFTWIDTH_80;
352
362
} else {
0 commit comments