Merge 15481cfd7f into fc4f54334d
This commit is contained in:
commit
8f2dfc08a1
1 changed files with 8 additions and 7 deletions
|
|
@ -74,13 +74,14 @@ class EPD:
|
|||
epdconfig.digital_write(self.cs_pin, 1)
|
||||
|
||||
def ReadBusy(self):
|
||||
logger.debug("e-Paper busy")
|
||||
self.send_command(0x71)
|
||||
busy = epdconfig.digital_read(self.busy_pin)
|
||||
while(busy == 0):
|
||||
self.send_command(0x71)
|
||||
busy = epdconfig.digital_read(self.busy_pin)
|
||||
epdconfig.delay_ms(20)
|
||||
logger.debug("e-Paper busy")
|
||||
iter = 0
|
||||
while epdconfig.digital_read(self.busy_pin) == 0:
|
||||
epdconfig.delay_ms(100)
|
||||
iter += 1
|
||||
if iter > 150:
|
||||
logger.info("Forced e-paper busy release")
|
||||
break
|
||||
logger.debug("e-Paper busy release")
|
||||
|
||||
def init(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue