This commit is contained in:
jeremygan2021
2026-03-03 23:40:33 +08:00
parent f0d44b7290
commit 415cc9df97
6 changed files with 228 additions and 60 deletions

View File

@@ -298,11 +298,11 @@ class ST77xx:
class ST7789(ST77xx):
def init(self, *, color_mode=ColorMode_65K | ColorMode_16bit):
def init(self, *, color_mode=ColorMode_65K | ColorMode_16bit, is_bgr=False):
super().init()
self._set_color_mode(color_mode)
delay_ms(50)
self._set_mem_access_mode(4, True, True, False)
self._set_mem_access_mode(4, True, True, is_bgr)
self.inversion_mode(True)
delay_ms(10)
self.write(ST77XX_NORON)