Commit ce578b16 authored by russhughes's avatar russhughes

LILYGO T-PicoC3 tft_config.py configuration module

parent 99fc0fe0
...@@ -10,6 +10,7 @@ esp32_st7789 | Generic ESP32 st7789 240x320 Display ...@@ -10,6 +10,7 @@ esp32_st7789 | Generic ESP32 st7789 240x320 Display
pybv11_st7789 | Pyboard Version 1.1 st7789 240x320 Display pybv11_st7789 | Pyboard Version 1.1 st7789 240x320 Display
tdisplay_esp32 | TTGO T-DISPLAY ESP32 st7789 135x240 Display tdisplay_esp32 | TTGO T-DISPLAY ESP32 st7789 135x240 Display
tdisplay_rp2040 | TTGO T-DISPLAY RP2040 st7789 135x240 Display tdisplay_rp2040 | TTGO T-DISPLAY RP2040 st7789 135x240 Display
t-picoc3 | TTGO T-PicoC3 st7789 135x240 Display
twatch_2020_v2 | TTGO TWATCH-2020 v2 st7789 240x240 Display twatch_2020_v2 | TTGO TWATCH-2020 v2 st7789 240x240 Display
ws_pico_114 | Raspberry Pi Pico Waveshare-Pico-lcd-1.14 Display ws_pico_114 | Raspberry Pi Pico Waveshare-Pico-lcd-1.14 Display
ws_pico_13 | Raspberry Pi Pico Waveshare-Pico-lcd-1.3 Display ws_pico_13 | Raspberry Pi Pico Waveshare-Pico-lcd-1.3 Display
......
"""TTGO T-PicoC3 RP2040 display"""
from machine import Pin, SPI
from time import sleep
import st7789
TFA = 40 # top free area when scrolling
BFA = 40 # bottom free area when scrolling
def config(rotation=0, buffer_size=0, options=0):
Pin(22, Pin.OUT, value=1)
spi = SPI(0,
baudrate=62500000,
polarity=1,
phase=1,
sck=Pin(2, Pin.OUT),
mosi=Pin(3, Pin.OUT),
miso=None)
return st7789.ST7789(
spi,
135,
240,
cs=Pin(5, Pin.OUT),
dc=Pin(1, Pin.OUT),
backlight=Pin(4, Pin.OUT),
rotation=rotation,
options=options,
buffer_size=buffer_size)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment