[SOLVED] Adafruit_ILI9341_STM – hardware scrolling broken
madias Fri Mar 23, 2018 9:11 pm
I don’t know much about the changes in this library for ~ 2 years, but sadly hardware scrolling is totally broken:
It was easy to set it up with:
//new scroll commands
#define ILI9341_VSCRDEF 0x33
#define ILI9341_VSCRSADD 0x37
void scrollAddress(uint16_t VSP) {
tft.writecommand(ILI9341_VSCRSADD); // Vertical scrolling start address
tft.writedata(VSP >> 8);
tft.writedata(VSP);
}
void setupScrollArea(uint16_t TFA, uint16_t BFA) {
tft.writecommand(ILI9341_VSCRDEF); // Vertical scroll definition
tft.writedata(TFA >> 8);
tft.writedata(TFA);
tft.writedata((320 - TFA - BFA) >> 8);
tft.writedata(320 - TFA - BFA);
tft.writedata(BFA >> 8);
tft.writedata(BFA);
}
