back to FEHLCD
Description
This function is used to clear the touch buffer of the Proteus. The Proteus LCD stores all instances of being touched in a software buffer. Thus, if the screen is touched while the program is sleeping, the Proteus will store those touches even if they are not acted upon yet. This leads to an issue where the Proteus registers a touch occurred even after the screen has stopped being touched. If you call the ClearBuffer method after a sleep statement, the LCD buffer is cleared such that this undesirable behavior does not occur.
Syntax
.ClearBuffer( )
Parameters
None.
Returns
None.
Examples
#include <FEHLCD.h> int main(void) { float x,y; while( true ) { Sleep(3.0); /* Clear any unwanted touches that occurred during the sleep */ LCD.ClearBuffer(); while (!LCD.Touch(&x, &y)); } return 0; }