Closed pguerra75 closed 4 years ago
someone added it as a PR!
FYI, for future me/past me. This was added as "clearDisplayBuffer"
/**************************************************************************/
/*!
@brief Clears the display buffer without outputting to the display
*/
/**************************************************************************/
void Adafruit_SharpMem::clearDisplayBuffer() {
memset(sharpmem_buffer, 0xff, (WIDTH * HEIGHT) / 8);
}
This is likely not an issue for everyone, but for me using the 400x240 display on a SAMD21 clearing the screen before every refresh makes it flicker. To keep it looking smooth I added a "clearBuffer" command that allows the user to write new data to the screen, without completely clearing it first.
/**/ /! @brief Clears the content of the write buffer. / /**/ void Adafruit_SharpMem::clearBuffer() { memset(sharpmem_buffer, 0xff, (WIDTH * HEIGHT) / 8); }