st7789 drivers: provide default rst arg.

main
Peter Hinch 2025-04-15 17:26:24 +01:00
rodzic 62f6dd18b1
commit 08f2429ba4
2 zmienionych plików z 18 dodań i 16 usunięć

Wyświetl plik

@ -81,7 +81,7 @@ class ST7789(framebuf.FrameBuffer):
spi,
cs,
dc,
rst,
rst=None,
height=240,
width=240,
disp_mode=LANDSCAPE,
@ -114,13 +114,14 @@ class ST7789(framebuf.FrameBuffer):
# Hardware reset
def _hwreset(self):
self._dc(0)
self._rst(1)
sleep_ms(1)
self._rst(0)
sleep_ms(1)
self._rst(1)
sleep_ms(1)
if self._rst is not None:
self._dc(0)
self._rst(1)
sleep_ms(1)
self._rst(0)
sleep_ms(1)
self._rst(1)
sleep_ms(1)
# Write a command, a bytes instance (in practice 1 byte).
def _wcmd(self, buf):

Wyświetl plik

@ -70,7 +70,7 @@ class ST7789(framebuf.FrameBuffer):
spi,
cs,
dc,
rst,
rst=None,
height=240,
width=240,
disp_mode=LANDSCAPE,
@ -103,13 +103,14 @@ class ST7789(framebuf.FrameBuffer):
# Hardware reset
def _hwreset(self):
self._dc(0)
self._rst(1)
sleep_ms(1)
self._rst(0)
sleep_ms(1)
self._rst(1)
sleep_ms(1)
if self._rst is not None:
self._dc(0)
self._rst(1)
sleep_ms(1)
self._rst(0)
sleep_ms(1)
self._rst(1)
sleep_ms(1)
# Write a command, a bytes instance (in practice 1 byte).
def _wcmd(self, buf):