From c47b3a32a24ab5da2bb82e0f2ef2a2ae585af852 Mon Sep 17 00:00:00 2001 From: fvanroie Date: Thu, 24 Mar 2022 14:08:13 +0100 Subject: [PATCH] Add build for ESP32 One 3.5inch RPi LCD (C) --- .github/workflows/build.yaml | 4 +++- user_setups/esp32/esp32-one_st7796.ini | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2a6c8d11..c1fc6c1a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -27,7 +27,9 @@ jobs: - env: d1-r32-unoshield_ili9486_adc out: d1-r32-espduino32 - env: esp32-one_st7796 - out: esp32-one + out: waveshare + - env: esp32-one_ili9486 + out: waveshare - env: esp32-touchdown out: esp32-touchdown - out: freetouchdeck diff --git a/user_setups/esp32/esp32-one_st7796.ini b/user_setups/esp32/esp32-one_st7796.ini index d8ff9c3f..df7a0ba3 100644 --- a/user_setups/esp32/esp32-one_st7796.ini +++ b/user_setups/esp32/esp32-one_st7796.ini @@ -5,7 +5,7 @@ ; - XPT2046 touch controller ; ;***************************************************; -[env:esp32-one_st7796] +[esp32one] extends = esp32_4mb_v2 board = esp32dev @@ -16,8 +16,16 @@ build_flags = ;-mfix-esp32-psram-cache-issue ; uses ;region -- TFT_eSPI build options ------------------------ - ${lcd.raspberrypi} ${esp32.hspi} ; Use HSPI hardware SPI bus + -D RPI_DISPLAY_TYPE=1 + -D TFT_WIDTH=320 + -D TFT_HEIGHT=480 + ;-D TFT_ROTATION=0 ; Use default, see TFT_ROTATION values + -D SPI_FREQUENCY=80000000 + -D SPI_TOUCH_FREQUENCY=2500000 + -D USER_SETUP_LOADED=1 + -D TOUCH_DRIVER=0x2046 ; XPT2046 Resistive SPI touch panel driver + -D SUPPORT_TRANSACTIONS -D TFT_CS=5 -D TFT_DC=4 -D TFT_RST=32 @@ -42,3 +50,16 @@ lib_ignore = ${env.lib_ignore} ${esp32.lib_ignore} ;endregion + + +[env:esp32-one_ili9486] +extends = esp32one +build_flags = + ${esp32-one.build_flags} + -D ILI9486_DRIVER=1 + +[env:esp32-one_st7796] +extends = esp32one +build_flags = + ${esp32-one.build_flags} + -D ST7796_DRIVER=1