mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-29 22:26:37 +00:00
Use SDK-provided define instead of own
This commit is contained in:
parent
92bfd8a5cc
commit
462491a5b2
@ -17,7 +17,7 @@ Contributors:
|
|||||||
/----------------------------------------------------------------------------*/
|
/----------------------------------------------------------------------------*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if defined(ARDUINO) && defined(LGFX_USE_V1) && !defined(ESP32C3)
|
#if defined(ARDUINO) && defined(LGFX_USE_V1) && !defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||||
|
|
||||||
#include "Arduino.h"
|
#include "Arduino.h"
|
||||||
#include "LovyanGFX.hpp"
|
#include "LovyanGFX.hpp"
|
||||||
|
@ -94,12 +94,12 @@ static lgfx::Bus_Parallel8* init_parallel_8_bus(Preferences* prefs, int8_t data_
|
|||||||
cfg.pin_rd = prefs->getInt("rd", TFT_RD);
|
cfg.pin_rd = prefs->getInt("rd", TFT_RD);
|
||||||
cfg.pin_wr = prefs->getInt("wr", TFT_WR);
|
cfg.pin_wr = prefs->getInt("wr", TFT_WR);
|
||||||
cfg.pin_rs = prefs->getInt("rs", TFT_DC);
|
cfg.pin_rs = prefs->getInt("rs", TFT_DC);
|
||||||
#ifndef ESP32C3
|
#ifndef CONFIG_IDF_TARGET_ESP32C3
|
||||||
cfg.freq_write = prefs->getUInt("write_freq", SPI_FREQUENCY);
|
cfg.freq_write = prefs->getUInt("write_freq", SPI_FREQUENCY);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if !defined(CONFIG_IDF_TARGET_ESP32S3) && !defined(ESP32C3)
|
#if !defined(CONFIG_IDF_TARGET_ESP32S3) && !defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||||
uint8_t port = prefs->getUInt("i2s_port", 0);
|
uint8_t port = prefs->getUInt("i2s_port", 0);
|
||||||
switch(port) {
|
switch(port) {
|
||||||
#if SOC_I2S_NUM > 1
|
#if SOC_I2S_NUM > 1
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[env:2424S012]
|
[env:2424S012]
|
||||||
extends = arduino_esp32c3_v2, flash_4mb
|
extends = arduino_esp32c3_v2, flash_4mb
|
||||||
; Close enough
|
; Close enough, sets it up to use USB-CDC rather than uart
|
||||||
board = seeed_xiao_esp32c3
|
board = seeed_xiao_esp32c3
|
||||||
|
|
||||||
build_flags =
|
build_flags =
|
||||||
@ -9,7 +9,6 @@ build_flags =
|
|||||||
${esp32c3.no_ps_ram}
|
${esp32c3.no_ps_ram}
|
||||||
|
|
||||||
; Display configuration
|
; Display configuration
|
||||||
-D ESP32C3=1
|
|
||||||
-D LGFX_USE_V1=1
|
-D LGFX_USE_V1=1
|
||||||
-D HASP_USE_LGFX_TOUCH=1
|
-D HASP_USE_LGFX_TOUCH=1
|
||||||
;CST816S driver
|
;CST816S driver
|
||||||
@ -33,4 +32,3 @@ build_flags =
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${arduino_esp32s3_v2.lib_deps}
|
${arduino_esp32s3_v2.lib_deps}
|
||||||
${lovyangfx.lib_deps}
|
${lovyangfx.lib_deps}
|
||||||
; ${tft_espi.lib_deps}
|
|
Loading…
x
Reference in New Issue
Block a user