mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 05:36:37 +00:00
Set default gpios for Lanbon L8-HS
This commit is contained in:
parent
0e16eeb9e1
commit
0b6a2ff0de
@ -38,6 +38,14 @@ ButtonConfig switchConfig; // Clicks only
|
||||
// An array of button pins, led pins, and the led states. Cannot be const
|
||||
// because ledState is mutable.
|
||||
hasp_gpio_config_t gpioConfig[HASP_NUM_GPIO_CONFIG] = {
|
||||
#if defined(LANBONL8_HS)
|
||||
{.pin = RELAY_1, .group = 1, .gpio_function = OUTPUT, .type = LIGHT_RELAY},
|
||||
{.pin = RELAY_2, .group = 2, .gpio_function = OUTPUT, .type = LIGHT_RELAY},
|
||||
{.pin = LED_RED, .group = 4, .gpio_function = OUTPUT, .type = LED_R},
|
||||
{.pin = RELAY_3, .group = 3, .gpio_function = OUTPUT, .type = LIGHT_RELAY},
|
||||
{.pin = LED_GREEN, .group = 5, .gpio_function = OUTPUT, .type = LED_G},
|
||||
{.pin = LED_BLUE, .group = 6, .gpio_function = OUTPUT, .type = LED_B}
|
||||
#endif
|
||||
// {2, 8, INPUT, LOW}, {3, 9, OUTPUT, LOW}, {4, 10, INPUT, HIGH}, {5, 11, OUTPUT, LOW}, {6, 12, INPUT, LOW},
|
||||
};
|
||||
uint8_t pwm_channel = 1; // Backlight has 0
|
||||
|
@ -16,10 +16,10 @@ struct hasp_gpio_config_t
|
||||
uint8_t pin : 8; // pin number
|
||||
uint8_t group : 8; // groupid
|
||||
uint8_t gpio_function : 7; // INPUT, OUTPUT, PULLUP, etc
|
||||
uint8_t type; // switch, button, ...
|
||||
uint8_t inverted : 1;
|
||||
uint8_t channel : 4; // pwmchannel
|
||||
uint8_t power : 1;
|
||||
uint8_t type; // switch, button, ...
|
||||
uint16_t val;
|
||||
uint16_t max;
|
||||
#ifdef ARDUINO
|
||||
|
@ -16,10 +16,9 @@ build_flags =
|
||||
|
||||
;region -- TFT_eSPI build options ------------------------
|
||||
-D LANBONL8
|
||||
; -D USER_SETUP_LOADED=1
|
||||
-D LANBONL8_HS ; default GPIO settings
|
||||
-D LGFX_USE_V1=1
|
||||
-D ST7789_DRIVER=1
|
||||
;-D CGRAM_OFFSET=1 ; Library will add offsets required
|
||||
-D TFT_SDA_READ ; Read from display, it only provides an SDA pin
|
||||
-D TFT_WIDTH=240
|
||||
-D TFT_HEIGHT=320
|
||||
@ -48,15 +47,13 @@ build_flags =
|
||||
-D LED_GREEN=32
|
||||
-D LED_BLUE=33
|
||||
-D RELAY_1=12
|
||||
-D RELAY_2=24
|
||||
-D RELAY_3=37
|
||||
-D RELAY_2=14
|
||||
-D RELAY_3=27
|
||||
;endregion
|
||||
|
||||
lib_deps =
|
||||
${arduino_esp32_v2.lib_deps}
|
||||
${lovyangfx.lib_deps}
|
||||
;${tft_espi.lib_deps}
|
||||
; FT6336U is 6x faster then FocalTech Library
|
||||
;git+https://github.com/lewisxhe/FocalTech_Library.git
|
||||
${ft6336.lib_deps}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user