diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index be02dd63..5fcdcbe9 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -3500,6 +3500,33 @@ #define HLW8012_POWER_RATIO 3414290 #define HLW8012_INTERRUPT_ON FALLING +// ----------------------------------------------------------------------------- +// Charging Essentials / LITESUN LA-WF3 +// ----------------------------------------------------------------------------- + +#elif defined(LITESUN_LA_WF3) + + // Info + #define MANUFACTURER "LITESUN" + #define DEVICE "LA_WF3" + + // Buttons + #define BUTTON1_PIN 13 + #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH + #define BUTTON1_RELAY 1 + + // Relays + #define RELAY1_PIN 12 + #define RELAY1_TYPE RELAY_TYPE_NORMAL + + // LEDs + #define LED1_PIN 4 // 4 blue led + #define LED1_MODE LED_MODE_WIFI + #define LED1_PIN_INVERSE 1 + + #define LED2_PIN 5 // 5 red led + #define LED2_MODE LED_MODE_RELAY + #define LED2_PIN_INVERSE 1 // ----------------------------------------------------------------------------- // TEST boards (do not use!!) diff --git a/code/platformio.ini b/code/platformio.ini index 1d9cd97b..b9805c7b 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -3277,3 +3277,29 @@ monitor_speed = ${common.monitor_speed} upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} extra_scripts = ${common.extra_scripts} + +[env:litesun-la-wf3] +platform = ${common.platform} +framework = ${common.framework} +board = ${common.board_1m} +board_build.flash_mode = ${common.flash_mode} +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags_1m0m} -DLITESUN_LA_WF3 +upload_speed = ${common.upload_speed} +monitor_speed = ${common.monitor_speed} +extra_scripts = ${common.extra_scripts} + +[env:litesun-la-wf3-ota] +platform = ${common.platform} +framework = ${common.framework} +board = ${common.board_1m} +board_build.flash_mode = ${common.flash_mode} +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags_1m0m} -DLITESUN_LA_WF3 +upload_speed = ${common.upload_speed} +monitor_speed = ${common.monitor_speed} +upload_port = ${common.upload_port} +upload_flags = ${common.upload_flags} +extra_scripts = ${common.extra_scripts} \ No newline at end of file