Migrate MCP and utilities to CircuitPython, including color GIF and volume fixes
This commit is contained in:
+17
-1
@@ -255,4 +255,20 @@ class RLCD:
|
||||
self.write_cmd(0x2C)
|
||||
self.cs(0); self.dc(1)
|
||||
self.spi.write(self.hw_buffer)
|
||||
self.cs(1)
|
||||
self.cs(1)
|
||||
|
||||
def set_brightness(self, level):
|
||||
"""Set backlight brightness percentage. RLCD is reflective and doesn't support backlight."""
|
||||
print("RLCD is a reflective LCD and does not support backlight brightness control.")
|
||||
pass
|
||||
|
||||
def set_power(self, on):
|
||||
"""Set display power status (True = ON, False = OFF)."""
|
||||
if on:
|
||||
self.write_cmd(0x11) # SLPOUT
|
||||
time.sleep_ms(120)
|
||||
self.write_cmd(0x29) # DISPON
|
||||
else:
|
||||
self.write_cmd(0x28) # DISPOFF
|
||||
self.write_cmd(0x10) # SLPIN
|
||||
time.sleep_ms(10)
|
||||
Reference in New Issue
Block a user