Skip to content

Commit

Permalink
更新 micropython-easydisplay
Browse files Browse the repository at this point in the history
  • Loading branch information
funnygeeker committed Mar 23, 2024
1 parent 477a6e5 commit 1fefbf0
Show file tree
Hide file tree
Showing 13 changed files with 203 additions and 389 deletions.
3 changes: 1 addition & 2 deletions README.ZH-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ from lib.easymenu import EasyMenu, MenuItem, BackItem, ValueItem, ToggleItem

spi = SPI(1, baudrate=20000000, polarity=0, phase=0, sck=Pin(18), mosi=Pin(17))
dp = st7735_buf.ST7735(width=128, height=128, spi=spi, cs=14, dc=15, res=16, rotate=1, bl=13, invert=False, rgb=False)
ed = EasyDisplay(display=dp, font="/text_lite_16px_2312.v3.bmf", show=True, color=0xFFFF, clear=True,
color_type="RGB565")
ed = EasyDisplay(dp, "RGB565", font="/text_lite_16px_2312.v3.bmf", show=True, color=0xFFFF, clear=True)

status = True

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ from lib.easymenu import EasyMenu, MenuItem, BackItem, ValueItem, ToggleItem

spi = SPI(1, baudrate=20000000, polarity=0, phase=0, sck=Pin(18), mosi=Pin(17))
dp = st7735_buf.ST7735(width=128, height=128, spi=spi, cs=14, dc=15, res=16, rotate=1, bl=13, invert=False, rgb=False)
ed = EasyDisplay(display=dp, font="/text_lite_16px_2312.v3.bmf", show=True, color=0xFFFF, clear=True,
color_type="RGB565")
ed = EasyDisplay(dp, "RGB565", font="/text_lite_16px_2312.v3.bmf", show=True, color=0xFFFF, clear=True)

status = True

Expand Down
Binary file modified driver/st7735_buf.mpy
Binary file not shown.
2 changes: 1 addition & 1 deletion driver/st7735_buf.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def __init__(self, width: int, height: int, spi, res: int, dc: int,
self.cs = Pin(cs, Pin.OUT, Pin.PULL_DOWN)
if bl is not None:
self.bl = PWM(Pin(bl, Pin.OUT))
self.bl.duty(1023)
self.back_light(255)
else:
self.bl = None
self._rotate = rotate
Expand Down
Binary file modified driver/st7735_spi.mpy
Binary file not shown.
2 changes: 1 addition & 1 deletion driver/st7735_spi.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def __init__(self, width: int, height: int, spi, res: int, dc: int,
self.cs = Pin(cs, Pin.OUT, Pin.PULL_DOWN)
if bl is not None:
self.bl = PWM(Pin(bl, Pin.OUT))
self.bl.duty(1023)
self.back_light(255)
else:
self.bl = None
self._rotate = rotate
Expand Down
Binary file modified driver/st7789_buf.mpy
Binary file not shown.
2 changes: 1 addition & 1 deletion driver/st7789_buf.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def __init__(self, width: int, height: int, spi, res: int, dc: int,
self.cs = Pin(cs, Pin.OUT, Pin.PULL_DOWN)
if bl is not None:
self.bl = PWM(Pin(bl, Pin.OUT))
self.bl.duty(1023)
self.back_light(255)
else:
self.bl = None
self._rotate = rotate
Expand Down
Binary file modified driver/st7789_spi.mpy
Binary file not shown.
2 changes: 1 addition & 1 deletion driver/st7789_spi.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def __init__(self, width: int, height: int, spi, res: int, dc: int,
self.cs = Pin(cs, Pin.OUT, Pin.PULL_DOWN)
if bl is not None:
self.bl = PWM(Pin(bl, Pin.OUT))
self.bl.duty(1023)
self.back_light(255)
else:
self.bl = None
self._rotate = rotate
Expand Down
Binary file modified lib/easydisplay.mpy
Binary file not shown.
Loading

0 comments on commit 1fefbf0

Please sign in to comment.