Update epd4in2.cpp

ClearFrame was refreshing the display despite the comment claiming it won't, and WaitUntilIdle was sending unnecessary SPI commands with an unnecessary delay of 100ms.

ClearFrame now only clears SRAM as intended and WaitUntilIdle is sped up significantly.
This commit is contained in:
Joseph DiGiovanni 2021-11-13 12:14:38 -05:00 committed by GitHub
parent bcb561fd70
commit 3fb83839a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,10 +132,8 @@ void Epd::SendData(unsigned char data) {
* @brief: Wait until the busy_pin goes HIGH
*/
void Epd::WaitUntilIdle(void) {
SendCommand(0x71);
while(DigitalRead(busy_pin) == 0) { //0: busy, 1: idle
DelayMs(100);
SendCommand(0x71);
// Wait
}
}
@ -418,10 +416,6 @@ void Epd::ClearFrame(void) {
SendData(0xFF);
}
DelayMs(2);
SetLut();
SendCommand(DISPLAY_REFRESH);
DelayMs(100);
WaitUntilIdle();
}
/**