Porównaj commity

...

2 Commity

Autor SHA1 Wiadomość Data
Peter Hinch 940d7847a6
Merge pull request #61 from PBrunot/add-esp32-wroverkit
Adds support for esp32 wrover kit 4.1 display based on ILI9341
2024-03-18 09:17:50 +00:00
Pascal Brunot 5f44969a87 Adds support for esp32 wrover kit 4.1 display based on ILI9341
tested successfully with gui.demos scripts @ 30 Mhz
2024-03-17 19:04:28 +01:00
1 zmienionych plików z 32 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,32 @@
# color_setup.py Customise for your hardware config
# Released under the MIT License (MIT). See LICENSE.
# Copyright (c) 2020 Peter Hinch
# As written, supports:
# ili9341 240x320 displays on ESP32 Wrover KIT 4.1
# See https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-wrover-kit.html
# Demo of initialisation procedure designed to minimise risk of memory fail
# when instantiating the frame buffer. The aim is to do this as early as
# possible before importing other modules.
from machine import Pin, SPI
import gc
# ili9341 specific driver
from drivers.ili93xx.ili9341 import ILI9341 as SSD
pdc = Pin(21, Pin.OUT, value=0)
prst = Pin(18, Pin.OUT, value=1)
pcs = Pin(22, Pin.OUT, value=1)
# Kept as ssd to maintain compatability
gc.collect() # Precaution before instantiating framebuf
# See DRIVERS.md re overclocking the SPI bus
spi = SPI(2, sck=Pin(19), mosi=Pin(23), miso=Pin(25), baudrate=30_000_000)
ssd = SSD(spi, dc=pdc, cs=pcs, rst=prst)
# turn on the backlight
bl = Pin(5, Pin.OUT)
bl.value(0)