mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 13:46:36 +00:00
Add arduitouch-esp32_ili9341
This commit is contained in:
parent
d5b144745e
commit
13935ca1a1
@ -22,6 +22,7 @@ build_flags =
|
|||||||
;region -- Default Build Environments : Used when Build All ---
|
;region -- Default Build Environments : Used when Build All ---
|
||||||
extra_default_envs =
|
extra_default_envs =
|
||||||
; Comment unneeded environments or create extra
|
; Comment unneeded environments or create extra
|
||||||
|
; arduitouch-esp32_ili9341
|
||||||
; d1-mini-esp32_ili9341
|
; d1-mini-esp32_ili9341
|
||||||
; d1-mini-esp8266_ili9341
|
; d1-mini-esp8266_ili9341
|
||||||
; d132-unoshield
|
; d132-unoshield
|
||||||
|
@ -8,6 +8,18 @@
|
|||||||
|
|
||||||
#if defined(ESP32)
|
#if defined(ESP32)
|
||||||
|
|
||||||
|
#ifndef TFT_BACKLIGHT_ON
|
||||||
|
#define TFT_BACKLIGHT_ON LOW
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef MQTT_NODENAME
|
||||||
|
#define MQTT_NODENAME "plate"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef TFT_BCKL
|
||||||
|
#define TFT_BCKL -1
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace dev {
|
namespace dev {
|
||||||
|
|
||||||
class Esp32Device : public BaseDevice {
|
class Esp32Device : public BaseDevice {
|
||||||
@ -15,19 +27,11 @@ class Esp32Device : public BaseDevice {
|
|||||||
public:
|
public:
|
||||||
Esp32Device()
|
Esp32Device()
|
||||||
{
|
{
|
||||||
#ifdef MQTT_NODENAME
|
_hostname = MQTT_NODENAME;
|
||||||
_hostname = MQTT_NODENAME;
|
_backlight_invert = (TFT_BACKLIGHT_ON == LOW);
|
||||||
#else
|
|
||||||
_hostname = "plate";
|
|
||||||
#endif
|
|
||||||
_backlight_power = 1;
|
_backlight_power = 1;
|
||||||
_backlight_invert = 0;
|
|
||||||
_backlight_level = 255;
|
_backlight_level = 255;
|
||||||
#ifdef TFT_BCKL
|
_backlight_pin = TFT_BCKL;
|
||||||
_backlight_pin = TFT_BCKL;
|
|
||||||
#else
|
|
||||||
_backlight_pin = -1;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
void reboot() override;
|
void reboot() override;
|
||||||
void show_info() override;
|
void show_info() override;
|
||||||
|
35
user_setups/esp32/arduitouch-esp32_ili9341.ini
Normal file
35
user_setups/esp32/arduitouch-esp32_ili9341.ini
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
;***************************************************;
|
||||||
|
; AZ ArduiTouch PCB with ESP32 with 2.4" or 2.8" ;
|
||||||
|
; - ESP32-WROOM-32 board ;
|
||||||
|
; - ili9341 TFT ;
|
||||||
|
; - xpt2046 touch controller ;
|
||||||
|
;***************************************************;
|
||||||
|
|
||||||
|
[env:arduitouch-esp32_ili9341]
|
||||||
|
extends = esp32
|
||||||
|
board = esp32dev
|
||||||
|
|
||||||
|
build_flags =
|
||||||
|
${env.build_flags}
|
||||||
|
${esp32.build_flags}
|
||||||
|
|
||||||
|
;region -- TFT_eSPI build options ------------------------
|
||||||
|
${lcd.lolin24}
|
||||||
|
${esp32.vspi} ; Use VSPI hardware SPI bus
|
||||||
|
-D TFT_DC=4
|
||||||
|
-D TFT_CS=5
|
||||||
|
-D TFT_RST=22 ; RST
|
||||||
|
-D TFT_BCKL=15
|
||||||
|
-D TOUCH_CS=14
|
||||||
|
-D TFT_BACKLIGHT_ON=LOW
|
||||||
|
;endregion
|
||||||
|
|
||||||
|
;region -- Library options -------------------------------
|
||||||
|
lib_deps =
|
||||||
|
${env.lib_deps}
|
||||||
|
${esp32.lib_deps}
|
||||||
|
|
||||||
|
lib_ignore =
|
||||||
|
${env.lib_ignore}
|
||||||
|
${esp32.lib_ignore}
|
||||||
|
;endregion
|
Loading…
x
Reference in New Issue
Block a user