Update ST7789.py

change screen width, height and rotation
This commit is contained in:
makerph
2022-08-11 11:48:43 +08:00
committed by GitHub
parent ca8a50a496
commit 8a78311b5f

View File

@ -90,8 +90,8 @@ ST7789_PWCTR6 = 0xFC
class ST7789(object): class ST7789(object):
"""Representation of an ST7789 TFT LCD.""" """Representation of an ST7789 TFT LCD."""
def __init__(self, port, cs, dc, backlight=None, rst=None, width=240, def __init__(self, port, cs, dc, backlight=None, rst=None, width=320,
height=240, rotation=90, invert=True, spi_speed_hz=4000000, height=240, rotation=0, invert=True, spi_speed_hz=4000000,
offset_left=0, offset_left=0,
offset_top=0): offset_top=0):
"""Create an instance of the display using SPI communication. """Create an instance of the display using SPI communication.