// Initialization for ST7735R screens (green or red tabs)
void Adafruit_ST7735::initR(uint8_t options) {
commonInit(Rcmd1);
if(options == INITR_GREENTAB) {
commandList(Rcmd2green);
colstart = 2;
rowstart = 1;
} else if(options == INITR_144GREENTAB) {
_height = ST7735_TFTHEIGHT_128;
_width = ST7735_TFTWIDTH_128;
commandList(Rcmd2green144);
colstart = 2;
rowstart = 3;
} else if(options == INITR_MINI160x80) {
_height = ST7735_TFTHEIGHT_160;
_width = ST7735_TFTWIDTH_80;
commandList(Rcmd2green160x80);
colstart = 24;
rowstart = 0;
} else {
// colstart, rowstart left at default '0' values
commandList(Rcmd2red);
}
commandList(Rcmd3);
// if black, change MADCTL color filter
if ((options == INITR_BLACKTAB) || (options == INITR_MINI160x80)) {
writecommand(ST7735_MADCTL);
writedata(0xC0);
}
tabcolor = options;
setRotation(0);
}