LilyGo T-DISPLAY 135x240
https://www.lilygo.cc/products/lilygo%C2%AE-ttgo-t-display-1-14-inch-lcd-esp32-control-board
tft_configs/ttgo_tdisplay/tft_config.py
1"""LilyGo T-DISPLAY 135x240
2
3https://www.lilygo.cc/products/lilygo%C2%AE-ttgo-t-display-1-14-inch-lcd-esp32-control-board
4
5"""
6
7from machine import Pin, SPI
8import st7789py as st7789
9
10TFA = 40
11BFA = 40
12WIDE = 1
13TALL = 0
14SCROLL = 0 # orientation for scroll.py
15FEATHERS = 1 # orientation for feathers.py
16
17def config(rotation=0):
18 """
19 Configures and returns an instance of the ST7789 display driver.
20
21 Args:
22 rotation (int): The rotation of the display (default: 0).
23
24 Returns:
25 ST7789: An instance of the ST7789 display driver.
26 """
27
28 return st7789.ST7789(
29 SPI(2, baudrate=30000000, sck=Pin(18), mosi=Pin(19), miso=None),
30 135,
31 240,
32 reset=Pin(23, Pin.OUT),
33 cs=Pin(5, Pin.OUT),
34 dc=Pin(16, Pin.OUT),
35 backlight=Pin(4, Pin.OUT),
36 rotation=rotation,
37 )