mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 13:46:36 +00:00
Add Lilygo T-HMI
This commit is contained in:
parent
82482c7c6e
commit
646ad3d8ca
@ -664,6 +664,9 @@ void LovyanGfx::init(int w, int h)
|
||||
}
|
||||
|
||||
#elif defined(TTGO_T_HMI)
|
||||
pinMode(PWR_EN, OUTPUT);
|
||||
digitalWrite(PWR_EN, HIGH);
|
||||
|
||||
auto _panel_instance = new lgfx::Panel_ST7789();
|
||||
auto _bus_instance = new lgfx::Bus_Parallel8();
|
||||
auto _touch_instance = new lgfx::Touch_XPT2046();
|
||||
|
77
user_setups/esp32s3/lilygo-t-hmi.ini
Normal file
77
user_setups/esp32s3/lilygo-t-hmi.ini
Normal file
@ -0,0 +1,77 @@
|
||||
;***************************************************;
|
||||
; Lilygo T-HMI v1.1 with 2.8" TFT ;
|
||||
; - TTGO T7 S3 v1.1 Mini esp32 s3 board ;
|
||||
; - st7789 TFT ;
|
||||
; - xpt2046 touch controller ;
|
||||
;***************************************************;
|
||||
|
||||
[lilygo-t-hmi_st7789]
|
||||
extends = arduino_esp32s3_v2, flash_16mb
|
||||
board = esp32-s3-devkitc-1
|
||||
board_build.arduino.memory_type = qio_opi
|
||||
|
||||
build_flags =
|
||||
-D HASP_MODEL="LILYGO T-HMI"
|
||||
-DTTGO_T_HMI=1
|
||||
${arduino_esp32s3_v2.build_flags}
|
||||
${esp32s3.ps_ram}
|
||||
-D ARDUINO_USB_MODE=1
|
||||
-D ARDUINO_USB_CDC_ON_BOOT=1
|
||||
|
||||
;region -- TFT_eSPI build options ------------------------
|
||||
-D LGFX_USE_V1=1
|
||||
;-D USER_SETUP_LOADED=1
|
||||
-D ST7789_DRIVER=1
|
||||
-DSUPPORT_TRANSACTIONS
|
||||
-DCGRAM_OFFSET
|
||||
-DTFT_INVERSION_OFF
|
||||
-DTFT_PARALLEL_8_BIT
|
||||
-D TFT_ROTATION=0 ; 0=0, 1=90, 2=180 or 3=270 degree
|
||||
-D TFT_WIDTH=240
|
||||
-D TFT_HEIGHT=320
|
||||
-D TFT_CS=6 ; Chip select control pin=library pulls permanently low
|
||||
-D TFT_DC=7 ; Data Command control pin
|
||||
-D TFT_RST=-1 ; Reset pin, toggles on startup
|
||||
-D TFT_WR=8 ; Write strobe control pin
|
||||
-D TFT_RD=-1 ; Read strobe control pin
|
||||
-D TFT_D0=48 ; Must use pins in the range 0-31 or alternatively 32-48
|
||||
-D TFT_D1=47 ; so a single register write sets/clears all bits.
|
||||
-D TFT_D2=39 ; Pins can be randomly assigned, this does not affect
|
||||
-D TFT_D3=40 ; TFT screen update performance.
|
||||
-D TFT_D4=41
|
||||
-D TFT_D5=42
|
||||
-D TFT_D6=45
|
||||
-D TFT_D7=46
|
||||
-D TFT_BCKL=38 ; LED back-light
|
||||
|
||||
-D TOUCH_DRIVER=0x2046
|
||||
-D HASP_USE_LGFX_TOUCH=1
|
||||
-D TOUCH_SCLK=1
|
||||
-D TOUCH_MISO=4
|
||||
-D TOUCH_MOSI=3
|
||||
-D TOUCH_CS=2
|
||||
-D TOUCH_IRQ=9
|
||||
-D SPI_TOUCH_FREQUENCY=2500000
|
||||
|
||||
-D SD_MISO=13
|
||||
-D SD_MOSI=11
|
||||
-D SD_SCLK=12
|
||||
-D SDIO_DATA0=13
|
||||
-D SDIO_CMD=11
|
||||
-D SDIO_SCLK=12
|
||||
|
||||
-D PWR_EN=10
|
||||
-D PWR_ON=14
|
||||
-D BAT_ADC=5
|
||||
-D BUTTON1=0
|
||||
-D BUTTON2=21
|
||||
;endregion
|
||||
|
||||
lib_deps =
|
||||
${arduino_esp32s3_v2.lib_deps}
|
||||
${lovyangfx.lib_deps}
|
||||
;${tft_espi.lib_deps}
|
||||
|
||||
|
||||
[env:lilygo-t-hmi_st7789_16MB]
|
||||
extends = lilygo-t-hmi_st7789, flash_16mb
|
Loading…
x
Reference in New Issue
Block a user