mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-24 11:46:34 +00:00
Add BACKLIGHT_FREQUENCY
This commit is contained in:
parent
749781587f
commit
d927b49caa
@ -186,9 +186,9 @@ void Esp32Device::set_backlight_pin(uint8_t pin)
|
||||
if(pin < GPIO_NUM_MAX) {
|
||||
LOG_VERBOSE(TAG_GUI, F("Backlight : Pin %d"), pin);
|
||||
#ifndef ESP32S2
|
||||
ledcSetup(BACKLIGHT_CHANNEL, 20000, 12);
|
||||
ledcSetup(BACKLIGHT_CHANNEL, BACKLIGHT_FREQUENCY, 12);
|
||||
#else
|
||||
ledcSetup(BACKLIGHT_CHANNEL, 20000, 10);
|
||||
ledcSetup(BACKLIGHT_CHANNEL, BACKLIGHT_FREQUENCY, 10);
|
||||
#endif
|
||||
ledcAttachPin(pin, BACKLIGHT_CHANNEL);
|
||||
update_backlight();
|
||||
|
@ -9,6 +9,10 @@
|
||||
|
||||
#if defined(ESP32)
|
||||
|
||||
#ifndef BACKLIGHT_FREQUENCY
|
||||
#define BACKLIGHT_FREQUENCY 20000
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
; Wireless-Tag WT-86-32-3ZW1 ;
|
||||
; - custom ESP32-S2 pcb ;
|
||||
; - ili9488 TFT 8-bit ;
|
||||
; - gls1680 touch controller ;
|
||||
; - gsl1680 touch controller ;
|
||||
;***************************************************;
|
||||
|
||||
[env:wt-86-32-3zw1]
|
||||
@ -45,20 +45,22 @@ build_flags =
|
||||
-D LGFX_USE_V1=1
|
||||
-D SUPPORT_TRANSACTIONS
|
||||
-D SPI_TOUCH_FREQUENCY=2500000
|
||||
-D TOUCH_DRIVER=0x1680 ; GLS1680 Capacitive I2C touch panel driver
|
||||
-D TOUCH_DRIVER=0x1680 ; GSL1680 Capacitive I2C touch panel driver
|
||||
|
||||
-D I2C_TOUCH_PORT=0
|
||||
-D I2C_TOUCH_ADDRESS=0x40
|
||||
-D I2C_TOUCH_FREQUENCY=400000
|
||||
|
||||
-D BACKLIGHT_FREQUENCY=2000
|
||||
;endregion
|
||||
|
||||
;region -- Library options -------------------------------
|
||||
lib_deps =
|
||||
${env.lib_deps}
|
||||
${esp32s2.lib_deps}
|
||||
${gsl1680.lib_deps}
|
||||
;lovyan03/LovyanGFX @ ^0.4.14
|
||||
https://github.com/lovyan03/LovyanGFX.git#1be6600
|
||||
git+https://github.com/arovak/GSL2038.git
|
||||
|
||||
lib_ignore =
|
||||
${env.lib_ignore}
|
||||
|
Loading…
x
Reference in New Issue
Block a user