diff --git a/Adafruit_ST7735.cpp b/Adafruit_ST7735.cpp index bfab90a..ee2778f 100644 --- a/Adafruit_ST7735.cpp +++ b/Adafruit_ST7735.cpp @@ -228,7 +228,8 @@ void Adafruit_ST7735::initR(uint8_t options) { displayInit(Rcmd2green144); _colstart = 2; _rowstart = 3; // For default rotation 0 - } else if (options == INITR_MINI160x80) { + } else if ((options == INITR_MINI160x80) || + (options == INITR_MINI160x80_RGB)) { _height = ST7735_TFTWIDTH_80; _width = ST7735_TFTHEIGHT_160; displayInit(Rcmd2green160x80); @@ -286,7 +287,8 @@ void Adafruit_ST7735::setRotation(uint8_t m) { if (tabcolor == INITR_144GREENTAB) { _height = ST7735_TFTHEIGHT_128; _width = ST7735_TFTWIDTH_128; - } else if (tabcolor == INITR_MINI160x80) { + } else if ((tabcolor == INITR_MINI160x80) || + (tabcolor == INITR_MINI160x80_RGB)) { _height = ST7735_TFTHEIGHT_160; _width = ST7735_TFTWIDTH_80; } else { @@ -306,7 +308,8 @@ void Adafruit_ST7735::setRotation(uint8_t m) { if (tabcolor == INITR_144GREENTAB) { _width = ST7735_TFTHEIGHT_128; _height = ST7735_TFTWIDTH_128; - } else if (tabcolor == INITR_MINI160x80) { + } else if ((tabcolor == INITR_MINI160x80) || + (tabcolor == INITR_MINI160x80_RGB)) { _width = ST7735_TFTHEIGHT_160; _height = ST7735_TFTWIDTH_80; } else { @@ -326,7 +329,8 @@ void Adafruit_ST7735::setRotation(uint8_t m) { if (tabcolor == INITR_144GREENTAB) { _height = ST7735_TFTHEIGHT_128; _width = ST7735_TFTWIDTH_128; - } else if (tabcolor == INITR_MINI160x80) { + } else if ((tabcolor == INITR_MINI160x80) || + (tabcolor == INITR_MINI160x80_RGB)) { _height = ST7735_TFTHEIGHT_160; _width = ST7735_TFTWIDTH_80; } else { @@ -346,7 +350,8 @@ void Adafruit_ST7735::setRotation(uint8_t m) { if (tabcolor == INITR_144GREENTAB) { _width = ST7735_TFTHEIGHT_128; _height = ST7735_TFTWIDTH_128; - } else if (tabcolor == INITR_MINI160x80) { + } else if ((tabcolor == INITR_MINI160x80) || + (tabcolor == INITR_MINI160x80_RGB)) { _width = ST7735_TFTHEIGHT_160; _height = ST7735_TFTWIDTH_80; } else { diff --git a/Adafruit_ST7735.h b/Adafruit_ST7735.h index da1320a..dded91a 100755 --- a/Adafruit_ST7735.h +++ b/Adafruit_ST7735.h @@ -13,6 +13,7 @@ #define INITR_144GREENTAB 0x01 #define INITR_MINI160x80 0x04 #define INITR_HALLOWING 0x05 +#define INITR_MINI160x80_RGB 0x06 // Some register settings #define ST7735_MADCTL_BGR 0x08