Busy pin constants
rodzic
8f142cc44a
commit
0bc7f0e2e9
|
@ -56,6 +56,8 @@ SET_RAM_X_ADDRESS_COUNTER = const(0x4E)
|
|||
SET_RAM_Y_ADDRESS_COUNTER = const(0x4F)
|
||||
TERMINATE_FRAME_READ_WRITE = const(0xFF) # aka NOOP
|
||||
|
||||
BUSY = const(1) # 1=busy, 0=idle
|
||||
|
||||
class EPD:
|
||||
def __init__(self, spi, cs, dc, rst, busy):
|
||||
self.spi = spi
|
||||
|
@ -101,7 +103,7 @@ class EPD:
|
|||
self.set_lut(self.LUT_FULL_UPDATE)
|
||||
|
||||
def wait_until_idle(self):
|
||||
while self.busy.value() == 1: # 0=idle, 1=busy
|
||||
while self.busy.value() == BUSY:
|
||||
sleep_ms(100)
|
||||
|
||||
def reset(self):
|
||||
|
|
|
@ -81,6 +81,8 @@ ROTATE_90 = const(1)
|
|||
ROTATE_180 = const(2)
|
||||
ROTATE_270 = const(3)
|
||||
|
||||
BUSY = const(0) # 0=busy, 1=idle
|
||||
|
||||
class EPD:
|
||||
def __init__(self, spi, cs, dc, rst, busy):
|
||||
self.spi = spi
|
||||
|
@ -134,7 +136,7 @@ class EPD:
|
|||
self.set_lut_red()
|
||||
|
||||
def wait_until_idle(self):
|
||||
while self.busy.value() == 0: # 0=busy, 1=idle
|
||||
while self.busy.value() == BUSY:
|
||||
sleep_ms(100)
|
||||
|
||||
def reset(self):
|
||||
|
|
|
@ -61,6 +61,8 @@ SET_RAM_X_ADDRESS_COUNTER = const(0x4E)
|
|||
SET_RAM_Y_ADDRESS_COUNTER = const(0x4F)
|
||||
TERMINATE_FRAME_READ_WRITE = const(0xFF) # not in datasheet, aka NOOP
|
||||
|
||||
BUSY = const(1) # 1=busy, 0=idle
|
||||
|
||||
class EPD:
|
||||
def __init__(self, spi, cs, dc, rst, busy):
|
||||
self.spi = spi
|
||||
|
@ -106,7 +108,7 @@ class EPD:
|
|||
self.set_lut(self.LUT_FULL_UPDATE)
|
||||
|
||||
def wait_until_idle(self):
|
||||
while self.busy.value() == 1: # 0=idle, 1=busy
|
||||
while self.busy.value() == BUSY:
|
||||
sleep_ms(100)
|
||||
|
||||
def reset(self):
|
||||
|
|
|
@ -80,6 +80,8 @@ ROTATE_90 = const(1)
|
|||
ROTATE_180 = const(2)
|
||||
ROTATE_270 = const(3)
|
||||
|
||||
BUSY = const(0) # 0=busy, 1=idle
|
||||
|
||||
class EPD:
|
||||
def __init__(self, spi, cs, dc, rst, busy):
|
||||
self.spi = spi
|
||||
|
@ -119,7 +121,7 @@ class EPD:
|
|||
self._command(RESOLUTION_SETTING, ustruct.pack(">BH", EPD_WIDTH, EPD_HEIGHT))
|
||||
|
||||
def wait_until_idle(self):
|
||||
while self.busy.value() == 0: # 0=busy, 1=idle
|
||||
while self.busy.value() == BUSY:
|
||||
sleep_ms(100)
|
||||
|
||||
def reset(self):
|
||||
|
|
|
@ -72,6 +72,8 @@ VCM_DC_SETTING_REGISTER = const(0x82)
|
|||
#READ_OTP_DATA = const(0xA2)
|
||||
POWER_OPTIMIZATION = const(0xF8) # Power optimization in flow diagram
|
||||
|
||||
BUSY = const(0) # 0=busy, 1=idle
|
||||
|
||||
class EPD:
|
||||
def __init__(self, spi, cs, dc, rst, busy):
|
||||
self.spi = spi
|
||||
|
@ -127,7 +129,7 @@ class EPD:
|
|||
self.set_lut()
|
||||
|
||||
def wait_until_idle(self):
|
||||
while self.busy.value() == 0: # 0=busy, 1=idle
|
||||
while self.busy.value() == BUSY:
|
||||
sleep_ms(100)
|
||||
|
||||
def reset(self):
|
||||
|
|
|
@ -81,6 +81,8 @@ ROTATE_90 = const(1)
|
|||
ROTATE_180 = const(2)
|
||||
ROTATE_270 = const(3)
|
||||
|
||||
BUSY = const(0) # 0=busy, 1=idle
|
||||
|
||||
class EPD:
|
||||
def __init__(self, spi, cs, dc, rst, busy):
|
||||
self.spi = spi
|
||||
|
@ -135,7 +137,7 @@ class EPD:
|
|||
self._command(PARTIAL_DISPLAY_REFRESH, b'\x00')
|
||||
|
||||
def wait_until_idle(self):
|
||||
while self.busy.value() == 0: # 0=busy, 1=idle
|
||||
while self.busy.value() == BUSY:
|
||||
sleep_ms(100)
|
||||
|
||||
def reset(self):
|
||||
|
|
|
@ -56,6 +56,8 @@ SET_RAM_X_ADDRESS_COUNTER = const(0x4E)
|
|||
SET_RAM_Y_ADDRESS_COUNTER = const(0x4F)
|
||||
TERMINATE_FRAME_READ_WRITE = const(0xFF)
|
||||
|
||||
BUSY = const(1) # 1=busy, 0=idle
|
||||
|
||||
class EPD:
|
||||
def __init__(self, spi, cs, dc, rst, busy):
|
||||
self.spi = spi
|
||||
|
@ -104,7 +106,7 @@ class EPD:
|
|||
self.set_lut(self.LUT_FULL_UPDATE)
|
||||
|
||||
def wait_until_idle(self):
|
||||
while self.busy.value() == 1: # 0=idle, 1=busy
|
||||
while self.busy.value() == BUSY:
|
||||
sleep_ms(100)
|
||||
|
||||
def reset(self):
|
||||
|
|
|
@ -75,6 +75,8 @@ ROTATE_90 = const(1)
|
|||
ROTATE_180 = const(2)
|
||||
ROTATE_270 = const(3)
|
||||
|
||||
BUSY = const(0) # 0=busy, 1=idle
|
||||
|
||||
class EPD:
|
||||
def __init__(self, spi, cs, dc, rst, busy):
|
||||
self.spi = spi
|
||||
|
@ -115,7 +117,7 @@ class EPD:
|
|||
self._command(VCM_DC_SETTING_REGISTER, b'\x0A')
|
||||
|
||||
def wait_until_idle(self):
|
||||
while self.busy.value() == 0: # 0=busy, 1=idle
|
||||
while self.busy.value() == BUSY:
|
||||
sleep_ms(100)
|
||||
|
||||
def reset(self):
|
||||
|
|
|
@ -74,6 +74,8 @@ VCM_DC_SETTING = const(0x82)
|
|||
#READ_OTP = const(0xA2)
|
||||
#POWER_SAVING = const(0xE3)
|
||||
|
||||
BUSY = const(0) # 0=busy, 1=idle
|
||||
|
||||
class EPD:
|
||||
def __init__(self, spi, cs, dc, rst, busy):
|
||||
self.spi = spi
|
||||
|
@ -119,7 +121,7 @@ class EPD:
|
|||
self._command(PLL_CONTROL, b'\x3C') # 3A 100HZ 29 150Hz 39 200HZ 31 171HZ
|
||||
|
||||
def wait_until_idle(self):
|
||||
while self.busy.value() == 0: # 0=busy, 1=idle
|
||||
while self.busy.value() == BUSY:
|
||||
sleep_ms(100)
|
||||
|
||||
def reset(self):
|
||||
|
|
|
@ -74,6 +74,8 @@ VCOM_AND_DATA_INTERVAL_SETTING = const(0x50)
|
|||
#READ_OTP_DATA = const(0xA2)
|
||||
#POWER_SAVING = const(0xE3)
|
||||
|
||||
BUSY = const(0) # 0=busy, 1=idle
|
||||
|
||||
class EPD:
|
||||
def __init__(self, spi, cs, dc, rst, busy):
|
||||
self.spi = spi
|
||||
|
@ -110,7 +112,7 @@ class EPD:
|
|||
self._command(PANEL_SETTING, b'\x0F') # LUT from OTP
|
||||
|
||||
def wait_until_idle(self):
|
||||
while self.busy.value() == 0: # 0=busy, 1=idle
|
||||
while self.busy.value() == BUSY:
|
||||
sleep_ms(100)
|
||||
|
||||
def reset(self):
|
||||
|
|
|
@ -73,6 +73,8 @@ TCON_RESOLUTION = const(0x61)
|
|||
VCM_DC_SETTING = const(0x82)
|
||||
FLASH_MODE = const(0xE5)
|
||||
|
||||
BUSY = const(0) # 0=busy, 1=idle
|
||||
|
||||
class EPD:
|
||||
def __init__(self, spi, cs, dc, rst, busy):
|
||||
self.spi = spi
|
||||
|
@ -117,7 +119,7 @@ class EPD:
|
|||
self._command(FLASH_MODE, b'\x03')
|
||||
|
||||
def wait_until_idle(self):
|
||||
while self.busy.value() == 0: # 0=busy, 1=idle
|
||||
while self.busy.value() == BUSY:
|
||||
sleep_ms(100)
|
||||
|
||||
def reset(self):
|
||||
|
|
|
@ -73,6 +73,8 @@ TCON_RESOLUTION = const(0x61)
|
|||
VCM_DC_SETTING = const(0x82)
|
||||
FLASH_MODE = const(0xE5)
|
||||
|
||||
BUSY = const(0) # 0=busy, 1=idle
|
||||
|
||||
class EPD:
|
||||
def __init__(self, spi, cs, dc, rst, busy):
|
||||
self.spi = spi
|
||||
|
@ -117,7 +119,7 @@ class EPD:
|
|||
self._command(FLASH_MODE, b'\x03')
|
||||
|
||||
def wait_until_idle(self):
|
||||
while self.busy.value() == 0: # 0=busy, 1=idle
|
||||
while self.busy.value() == BUSY:
|
||||
sleep_ms(100)
|
||||
|
||||
def reset(self):
|
||||
|
|
|
@ -73,6 +73,8 @@ TCON_RESOLUTION = const(0x61)
|
|||
VCM_DC_SETTING = const(0x82)
|
||||
FLASH_MODE = const(0xE5)
|
||||
|
||||
BUSY = const(0) # 0=busy, 1=idle
|
||||
|
||||
class EPD:
|
||||
def __init__(self, spi, cs, dc, rst, busy):
|
||||
self.spi = spi
|
||||
|
@ -117,7 +119,7 @@ class EPD:
|
|||
self._command(FLASH_MODE, b'\x03')
|
||||
|
||||
def wait_until_idle(self):
|
||||
while self.busy.value() == 0: # 0=busy, 1=idle
|
||||
while self.busy.value() == BUSY:
|
||||
sleep_ms(100)
|
||||
|
||||
def reset(self):
|
||||
|
|
|
@ -75,6 +75,8 @@ TCON_RESOLUTION = const(0x61)
|
|||
VCM_DC_SETTING = const(0x82)
|
||||
FLASH_MODE = const(0xE5)
|
||||
|
||||
BUSY = const(0) # 0=busy, 1=idle
|
||||
|
||||
class EPD:
|
||||
def __init__(self, spi, cs, dc, rst, busy):
|
||||
self.spi = spi
|
||||
|
@ -119,7 +121,7 @@ class EPD:
|
|||
self._command(FLASH_MODE, b'\x03')
|
||||
|
||||
def wait_until_idle(self):
|
||||
while self.busy.value() == 0: # 0=busy, 1=idle
|
||||
while self.busy.value() == BUSY:
|
||||
sleep_ms(100)
|
||||
|
||||
def reset(self):
|
||||
|
|
Ładowanie…
Reference in New Issue