Fixed a bug in the sleep function introduced in another version of 3.7inch e-paper.
This commit is contained in:
parent
8dfe2cff0a
commit
395d30e35e
4 changed files with 8 additions and 20 deletions
|
@ -382,10 +382,7 @@ void Epd::Clear(UBYTE mode) {
|
||||||
* You can use EPD_Reset() to awaken
|
* You can use EPD_Reset() to awaken
|
||||||
*/
|
*/
|
||||||
void Epd::Sleep(void) {
|
void Epd::Sleep(void) {
|
||||||
SendCommand(0X50);
|
SendCommand(0X10); //deep sleep
|
||||||
SendData(0xf7);
|
SendData(0x03);
|
||||||
SendCommand(0X02); //power off
|
|
||||||
SendCommand(0X07); //deep sleep
|
|
||||||
SendData(0xA5);
|
|
||||||
}
|
}
|
||||||
/* END OF FILE */
|
/* END OF FILE */
|
||||||
|
|
|
@ -584,9 +584,6 @@ parameter:
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
void EPD_3IN7_Sleep(void)
|
void EPD_3IN7_Sleep(void)
|
||||||
{
|
{
|
||||||
EPD_3IN7_SendCommand(0X50);
|
EPD_3IN7_SendCommand(0X10); //enter deep sleep
|
||||||
EPD_3IN7_SendData(0xf7);
|
EPD_3IN7_SendData(0x03);
|
||||||
EPD_3IN7_SendCommand(0X02); //power off
|
|
||||||
EPD_3IN7_SendCommand(0X07); //deep sleep
|
|
||||||
EPD_3IN7_SendData(0xA5);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -455,11 +455,8 @@ class EPD:
|
||||||
|
|
||||||
|
|
||||||
def sleep(self):
|
def sleep(self):
|
||||||
self.send_command(0X50) # DEEP_SLEEP_MODE
|
self.send_command(0X10) #deep sleep
|
||||||
self.send_data(0xf7)
|
self.send_data(0x03)
|
||||||
self.send_command(0X02) #power off
|
|
||||||
self.send_command(0X07) #deep sleep
|
|
||||||
self.send_data(0xA5)
|
|
||||||
|
|
||||||
epdconfig.delay_ms(2000)
|
epdconfig.delay_ms(2000)
|
||||||
epdconfig.module_exit()
|
epdconfig.module_exit()
|
||||||
|
|
|
@ -577,9 +577,6 @@ parameter:
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
void EPD_3IN7_Sleep(void)
|
void EPD_3IN7_Sleep(void)
|
||||||
{
|
{
|
||||||
EPD_3IN7_SendCommand(0X50);
|
EPD_3IN7_SendCommand(0X10); //deep sleep
|
||||||
EPD_3IN7_SendData(0xf7);
|
EPD_3IN7_SendData(0x03);
|
||||||
EPD_3IN7_SendCommand(0X02); //power off
|
|
||||||
EPD_3IN7_SendCommand(0X07); //deep sleep
|
|
||||||
EPD_3IN7_SendData(0xA5);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue