Skip to content

Commit 7b064da

Browse files
committed
Call sleep() on time
1 parent 7ac5141 commit 7b064da

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

adafruit_epd/epd.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def __init__(self, width, height, spi, cs_pin, dc_pin, sramcs_pin, rst_pin, busy
7272
# SPI interface (required)
7373
self.spi_device = spi
7474
while not self.spi_device.try_lock():
75-
sleep(0.01)
75+
time.sleep(0.01)
7676
self.spi_device.configure(baudrate=1000000) # 1 Mhz
7777
self.spi_device.unlock()
7878

@@ -99,7 +99,7 @@ def display(self): # pylint: disable=too-many-branches
9999

100100
if self.sram:
101101
while not self.spi_device.try_lock():
102-
sleep(0.01)
102+
time.sleep(0.01)
103103
self.sram.cs_pin.value = False
104104
#send read command
105105
self._buf[0] = mcp_sram.Adafruit_MCP_SRAM.SRAM_READ
@@ -114,7 +114,7 @@ def display(self): # pylint: disable=too-many-branches
114114
databyte = self.write_ram(0)
115115

116116
while not self.spi_device.try_lock():
117-
sleep(0.01)
117+
time.sleep(0.01)
118118
self._dc.value = True
119119

120120
if self.sram:
@@ -131,7 +131,7 @@ def display(self): # pylint: disable=too-many-branches
131131

132132
if self.sram:
133133
while not self.spi_device.try_lock():
134-
sleep(0.01)
134+
time.sleep(0.01)
135135
self.sram.cs_pin.value = False
136136
#send read command
137137
self._buf[0] = mcp_sram.Adafruit_MCP_SRAM.SRAM_READ
@@ -147,7 +147,7 @@ def display(self): # pylint: disable=too-many-branches
147147
databyte = self.write_ram(1)
148148

149149
while not self.spi_device.try_lock():
150-
sleep(0.01)
150+
time.sleep(0.01)
151151
self._dc.value = True
152152

153153
if self.sram:
@@ -182,7 +182,7 @@ def command(self, cmd, data=None, end=True):
182182
self._cs.value = False
183183

184184
while not self.spi_device.try_lock():
185-
sleep(0.01)
185+
time.sleep(0.01)
186186
ret = self._spi_transfer(cmd)
187187

188188
if data is not None:

0 commit comments

Comments
 (0)