adafruit / Adafruit_ILI9341

Library for Adafruit ILI9341 displays
406 stars 281 forks source link

Missing: setScrollMargins(uint16_t top, uint16_t bottom); #34

Closed trlafleur closed 5 years ago

trlafleur commented 6 years ago

This function is missing from the library. Its needed to allow hardware scrolling, its available in many other library's.


for .h file void setScrollMargins(uint16_t top, uint16_t bottom);

for .cpp file // ***** // Added by TRL 29 Feb 2018 <------

void Adafruit_ILI9341::setScrollMargins(uint16_t top, uint16_t bottom) { // TFA+VSA+BFA must equal 320 startWrite(); writeCommand(0x33); // Vertical Scroll definition. SPI_WRITE16(top); SPI_WRITE16(ILI9341_TFTHEIGHT-(top+bottom)); SPI_WRITE16(bottom); endWrite(); }

// *****