kopia lustrzana https://github.com/peterhinch/micropython-micro-gui
st7789 drivers: provide default rst arg.
rodzic
62f6dd18b1
commit
08f2429ba4
|
@ -81,7 +81,7 @@ class ST7789(framebuf.FrameBuffer):
|
|||
spi,
|
||||
cs,
|
||||
dc,
|
||||
rst,
|
||||
rst=None,
|
||||
height=240,
|
||||
width=240,
|
||||
disp_mode=LANDSCAPE,
|
||||
|
@ -114,6 +114,7 @@ class ST7789(framebuf.FrameBuffer):
|
|||
|
||||
# Hardware reset
|
||||
def _hwreset(self):
|
||||
if self._rst is not None:
|
||||
self._dc(0)
|
||||
self._rst(1)
|
||||
sleep_ms(1)
|
||||
|
|
|
@ -70,7 +70,7 @@ class ST7789(framebuf.FrameBuffer):
|
|||
spi,
|
||||
cs,
|
||||
dc,
|
||||
rst,
|
||||
rst=None,
|
||||
height=240,
|
||||
width=240,
|
||||
disp_mode=LANDSCAPE,
|
||||
|
@ -103,6 +103,7 @@ class ST7789(framebuf.FrameBuffer):
|
|||
|
||||
# Hardware reset
|
||||
def _hwreset(self):
|
||||
if self._rst is not None:
|
||||
self._dc(0)
|
||||
self._rst(1)
|
||||
sleep_ms(1)
|
||||
|
|
Ładowanie…
Reference in New Issue