From 26e25650b2a75a8d53640b14d34c8a12ac7efe9e Mon Sep 17 00:00:00 2001 From: gn0st1c Date: Mon, 25 Jun 2018 22:15:59 +0300 Subject: [PATCH 1/7] Update gulpfile.js tabs to spaces for consistency --- code/gulpfile.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/gulpfile.js b/code/gulpfile.js index 0bcdf930..39f9325b 100644 --- a/code/gulpfile.js +++ b/code/gulpfile.js @@ -96,14 +96,14 @@ var buildHeaderFile = function() { cb(0, destination); - }); + }); } var htmllintReporter = function(filepath, issues) { - if (issues.length > 0) { - issues.forEach(function (issue) { - console.info( + if (issues.length > 0) { + issues.forEach(function (issue) { + console.info( '[gulp-htmllint] ' + filepath + ' [' + issue.line + ',' + @@ -111,9 +111,9 @@ var htmllintReporter = function(filepath, issues) { '(' + issue.code + ') ' + issue.msg ); - }); - process.exitCode = 1; - } + }); + process.exitCode = 1; + } }; var buildWebUI = function(module) { From 913a24aef6f53e8cae54fb5adf3dd8251ab52f27 Mon Sep 17 00:00:00 2001 From: gn0st1c Date: Mon, 25 Jun 2018 22:17:25 +0300 Subject: [PATCH 2/7] Update web.ino tabs to spaces for consistency --- code/espurna/web.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/espurna/web.ino b/code/espurna/web.ino index ed302a60..479b0dc4 100644 --- a/code/espurna/web.ino +++ b/code/espurna/web.ino @@ -231,9 +231,9 @@ void _onHome(AsyncWebServerRequest *request) { response->addHeader("Content-Encoding", "gzip"); response->addHeader("Last-Modified", _last_modified); - response->addHeader("X-XSS-Protection", "1; mode=block"); - response->addHeader("X-Content-Type-Options", "nosniff"); - response->addHeader("X-Frame-Options", "deny"); + response->addHeader("X-XSS-Protection", "1; mode=block"); + response->addHeader("X-Content-Type-Options", "nosniff"); + response->addHeader("X-Frame-Options", "deny"); request->send(response); } From bce6774c176e4abecd7dd07195a9decbbab49547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Tue, 26 Jun 2018 11:54:27 +0200 Subject: [PATCH 3/7] Fix crash on loading malformed settings, option to load partial configuration --- code/espurna/settings.ino | 17 ++++++++++++++--- code/espurna/web.ino | 7 +++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/code/espurna/settings.ino b/code/espurna/settings.ino index 89a2cd54..19013663 100644 --- a/code/espurna/settings.ino +++ b/code/espurna/settings.ino @@ -375,19 +375,30 @@ size_t settingsMaxSize() { bool settingsRestoreJson(JsonObject& data) { + // Check this is an ESPurna configuration file (must have "app":"ESPURNA") const char* app = data["app"]; - if (strcmp(app, APP_NAME) != 0) return false; + if (!app || strcmp(app, APP_NAME) != 0) { + DEBUG_MSG_P(PSTR("[SETTING] Wrong or missing 'app' key\n")); + return false; + } - for (unsigned int i = EEPROM_DATA_END; i < SPI_FLASH_SEC_SIZE; i++) { - EEPROMr.write(i, 0xFF); + // Clear settings + bool is_backup = data["backup"]; + if (is_backup) { + for (unsigned int i = EEPROM_DATA_END; i < SPI_FLASH_SEC_SIZE; i++) { + EEPROMr.write(i, 0xFF); + } } + // Dump settings to memory buffer for (auto element : data) { if (strcmp(element.key, "app") == 0) continue; if (strcmp(element.key, "version") == 0) continue; + if (strcmp(element.key, "backup") == 0) continue; setSetting(element.key, element.value.as()); } + // Persist to EEPROM saveSettings(); DEBUG_MSG_P(PSTR("[SETTINGS] Settings restored successfully\n")); diff --git a/code/espurna/web.ino b/code/espurna/web.ino index ed302a60..5afa9070 100644 --- a/code/espurna/web.ino +++ b/code/espurna/web.ino @@ -123,14 +123,17 @@ void _onGetConfig(AsyncWebServerRequest *request) { response->addHeader("X-Content-Type-Options", "nosniff"); response->addHeader("X-Frame-Options", "deny"); - response->printf("{\n \"app\": \"%s\",\n \"version\": \"%s\"", APP_NAME, APP_VERSION); + response->printf("{\n\"app\": \"%s\"", APP_NAME); + response->printf(",\n\"version\": \"%s\"", APP_VERSION); + response->printf(",\n\"backup\": \"1\""); + response->printf(",\n\"timestamp\": \"%s\"", ntpDateTime().c_str()); // Write the keys line by line (not sorted) unsigned long count = settingsKeyCount(); for (unsigned int i=0; iprintf(",\n \"%s\": \"%s\"", key.c_str(), value.c_str()); + response->printf(",\n\"%s\": \"%s\"", key.c_str(), value.c_str()); } response->printf("\n}"); From fc18bf5873bb35083779b13bd8de469756d1946e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Thu, 28 Jun 2018 13:45:58 +0200 Subject: [PATCH 4/7] Info about an extra lightweight core version for 1MB --- code/espurna/config/hardware.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index e4d96ab6..ae7affd4 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -40,6 +40,7 @@ #define DOMOTICZ_SUPPORT 0 #define HOMEASSISTANT_SUPPORT 0 #define I2C_SUPPORT 0 + #define MDNS_SERVER_SUPPORT 0 #define MQTT_SUPPORT 0 #define NTP_SUPPORT 0 #define SCHEDULER_SUPPORT 0 @@ -47,6 +48,13 @@ #define THINGSPEAK_SUPPORT 0 #define WEB_SUPPORT 0 + // Extra light-weight image + //#define DEBUG_SERIAL_SUPPORT 0 + //#define DEBUG_TELNET_SUPPORT 0 + //#define DEBUG_WEB_SUPPORT 0 + //#define TELNET_SUPPORT 0 + //#define TERMINAL_SUPPORT 0 + // ----------------------------------------------------------------------------- // Development boards // ----------------------------------------------------------------------------- From 71f941097da476d1e1252405c5d91eab80ccb618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Thu, 28 Jun 2018 13:46:29 +0200 Subject: [PATCH 5/7] Fix mismatch between memory size and layout for several boards --- code/platformio.ini | 46 ++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/code/platformio.ini b/code/platformio.ini index 9e42b38a..c642c425 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -1405,7 +1405,7 @@ board = ${common.board_4m} board_build.flash_mode = ${common.flash_mode} lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -build_flags = ${common.build_flags_1m0m} -DEXS_WIFI_RELAY_V31 +build_flags = ${common.build_flags_4m1m} -DEXS_WIFI_RELAY_V31 monitor_speed = ${common.monitor_speed} extra_scripts = ${common.extra_scripts} @@ -1416,7 +1416,7 @@ board = ${common.board_4m} board_build.flash_mode = ${common.flash_mode} lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -build_flags = ${common.build_flags_1m0m} -DEXS_WIFI_RELAY_V31 +build_flags = ${common.build_flags_4m1m} -DEXS_WIFI_RELAY_V31 upload_speed = ${common.upload_speed} upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} @@ -1719,7 +1719,7 @@ 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_4m1m} -DEUROMATE_WIFI_STECKER_SCHUKO +build_flags = ${common.build_flags_1m0m} -DEUROMATE_WIFI_STECKER_SCHUKO monitor_speed = ${common.monitor_speed} extra_scripts = ${common.extra_scripts} @@ -1730,7 +1730,7 @@ 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_4m1m} -DEUROMATE_WIFI_STECKER_SCHUKO +build_flags = ${common.build_flags_1m0m} -DEUROMATE_WIFI_STECKER_SCHUKO upload_speed = ${common.upload_speed} upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} @@ -1743,7 +1743,7 @@ 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_4m1m} -DTONBUX_POWERSTRIP02 +build_flags = ${common.build_flags_1m0m} -DTONBUX_POWERSTRIP02 monitor_speed = ${common.monitor_speed} extra_scripts = ${common.extra_scripts} @@ -1754,7 +1754,7 @@ 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_4m1m} -DTONBUX_POWERSTRIP02 +build_flags = ${common.build_flags_1m0m} -DTONBUX_POWERSTRIP02 upload_speed = ${common.upload_speed} upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} @@ -1767,7 +1767,7 @@ 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_4m1m} -DLINGAN_SWA1 +build_flags = ${common.build_flags_1m0m} -DLINGAN_SWA1 monitor_speed = ${common.monitor_speed} extra_scripts = ${common.extra_scripts} @@ -1778,7 +1778,7 @@ 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_4m1m} -DLINGAN_SWA1 +build_flags = ${common.build_flags_1m0m} -DLINGAN_SWA1 upload_speed = ${common.upload_speed} upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} @@ -1956,11 +1956,11 @@ extra_scripts = ${common.extra_scripts} [env:arniex-swifitch] platform = ${common.platform} framework = ${common.framework} -board = ${common.board_1m} +board = ${common.board_4m} board_build.flash_mode = ${common.flash_mode} lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -build_flags = ${common.build_flags_1m0m} -DARNIEX_SWIFITCH +build_flags = ${common.build_flags_4m1m} -DARNIEX_SWIFITCH extra_scripts = ${common.extra_scripts} monitor_speed = ${common.monitor_speed} @@ -1971,7 +1971,7 @@ board = ${common.board_4m} board_build.flash_mode = ${common.flash_mode} lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -build_flags = ${common.build_flags_1m0m} -DARNIEX_SWIFITCH +build_flags = ${common.build_flags_4m1m} -DARNIEX_SWIFITCH upload_speed = ${common.upload_speed} upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} @@ -2009,7 +2009,7 @@ board = ${common.board_4m} board_build.flash_mode = ${common.flash_mode} lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -build_flags = ${common.build_flags_1m0m} -DLUANI_HVIO +build_flags = ${common.build_flags_4m1m} -DLUANI_HVIO monitor_speed = ${common.monitor_speed} extra_scripts = ${common.extra_scripts} @@ -2020,7 +2020,7 @@ board = ${common.board_4m} board_build.flash_mode = ${common.flash_mode} lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -build_flags = ${common.build_flags_1m0m} -DZLUANI_HVIO +build_flags = ${common.build_flags_4m1m} -DLUANI_HVIO upload_speed = ${common.upload_speed} upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} @@ -2034,7 +2034,7 @@ 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_4m1m} -DNEO_COOLCAM_NAS_WR01W +build_flags = ${common.build_flags_1m0m} -DNEO_COOLCAM_NAS_WR01W monitor_speed = ${common.monitor_speed} extra_scripts = ${common.extra_scripts} @@ -2045,7 +2045,7 @@ 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_4m1m} -DNEO_COOLCAM_NAS_WR01W +build_flags = ${common.build_flags_1m0m} -DNEO_COOLCAM_NAS_WR01W upload_speed = ${common.upload_speed} upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} @@ -2058,7 +2058,7 @@ 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_4m1m} -DESTINK_WIFI_POWER_STRIP +build_flags = ${common.build_flags_1m0m} -DESTINK_WIFI_POWER_STRIP monitor_speed = ${common.monitor_speed} extra_scripts = ${common.extra_scripts} @@ -2069,7 +2069,7 @@ 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_4m1m} -DESTINK_WIFI_POWER_STRIP +build_flags = ${common.build_flags_1m0m} -DESTINK_WIFI_POWER_STRIP upload_speed = ${common.upload_speed} upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} @@ -2206,7 +2206,7 @@ board = ${common.board_4m} board_build.flash_mode = ${common.flash_mode} lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -build_flags = ${common.build_flags_1m0m} -DALLNET_4DUINO_IOT_WLAN_RELAIS +build_flags = ${common.build_flags_4m1m} -DALLNET_4DUINO_IOT_WLAN_RELAIS monitor_speed = ${common.monitor_speed} extra_scripts = ${common.extra_scripts} @@ -2217,7 +2217,7 @@ board = ${common.board_4m} board_build.flash_mode = ${common.flash_mode} lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -build_flags = ${common.build_flags_1m0m} -DALLNET_4DUINO_IOT_WLAN_RELAIS +build_flags = ${common.build_flags_4m1m} -DALLNET_4DUINO_IOT_WLAN_RELAIS upload_speed = ${common.upload_speed} upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} @@ -2278,7 +2278,7 @@ board = ${common.board_4m} board_build.flash_mode = ${common.flash_mode} lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -build_flags = ${common.build_flags_1m0m} -DNODEMCU_BASIC -DGEIGER_SUPPORT=1 -DEVENTS_SUPPORT=0 -DINFLUXDB_SUPPORT=1 -DALEXA_SUPPORT=0 -DALEXA_ENABLED=0 +build_flags = ${common.build_flags_4m1m} -DNODEMCU_BASIC -DGEIGER_SUPPORT=1 -DEVENTS_SUPPORT=0 -DINFLUXDB_SUPPORT=1 -DALEXA_SUPPORT=0 -DALEXA_ENABLED=0 upload_speed = ${common.upload_speed_fast} monitor_speed = ${common.monitor_speed} extra_scripts = ${common.extra_scripts} @@ -2290,7 +2290,7 @@ board = ${common.board_4m} board_build.flash_mode = ${common.flash_mode} lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -build_flags = ${common.build_flags_1m0m} -DNODEMCU_BASIC -DGEIGER_SUPPORT=1 -DEVENTS_SUPPORT=0 -DINFLUXDB_SUPPORT=1 -DALEXA_SUPPORT=0 -DALEXA_ENABLED=0 +build_flags = ${common.build_flags_4m1m} -DNODEMCU_BASIC -DGEIGER_SUPPORT=1 -DEVENTS_SUPPORT=0 -DINFLUXDB_SUPPORT=1 -DALEXA_SUPPORT=0 -DALEXA_ENABLED=0 upload_speed = ${common.upload_speed_fast} monitor_speed = ${common.monitor_speed} upload_port = ${common.upload_port} @@ -2330,7 +2330,7 @@ board = ${common.board_4m} board_build.flash_mode = ${common.flash_mode} lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -build_flags = ${common.build_flags_1m0m} -DBH_ONOFRE +build_flags = ${common.build_flags_4m1m} -DBH_ONOFRE upload_speed = ${common.upload_speed_fast} monitor_speed = ${common.monitor_speed} extra_scripts = ${common.extra_scripts} @@ -2342,7 +2342,7 @@ board = ${common.board_4m} board_build.flash_mode = ${common.flash_mode} lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -build_flags = ${common.build_flags_1m0m} -DBH_ONOFRE +build_flags = ${common.build_flags_4m1m} -DBH_ONOFRE upload_speed = ${common.upload_speed_fast} monitor_speed = ${common.monitor_speed} upload_port = ${common.upload_port} From 210cd8df713592241a1addb6daf6c0769b1417d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Thu, 28 Jun 2018 14:05:38 +0200 Subject: [PATCH 6/7] Option to disable LED support --- code/espurna/config/general.h | 8 ++++++++ code/espurna/config/hardware.h | 1 + code/espurna/espurna.ino | 6 ++++-- code/espurna/led.ino | 4 ++++ code/espurna/relay.ino | 4 +++- 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/code/espurna/config/general.h b/code/espurna/config/general.h index 26722487..8c10f7c7 100644 --- a/code/espurna/config/general.h +++ b/code/espurna/config/general.h @@ -217,6 +217,14 @@ #define BUTTON_LNGLNGCLICK_DELAY 10000 // Time in ms holding the button down to get a long-long click #endif +//------------------------------------------------------------------------------ +// LED +//------------------------------------------------------------------------------ + +#ifndef LED_SUPPORT +#define LED_SUPPORT 1 +#endif + //------------------------------------------------------------------------------ // RELAY //------------------------------------------------------------------------------ diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index ae7affd4..c200cc77 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -52,6 +52,7 @@ //#define DEBUG_SERIAL_SUPPORT 0 //#define DEBUG_TELNET_SUPPORT 0 //#define DEBUG_WEB_SUPPORT 0 + //#define LED_SUPPORT 0 //#define TELNET_SUPPORT 0 //#define TERMINAL_SUPPORT 0 diff --git a/code/espurna/espurna.ino b/code/espurna/espurna.ino index def70f6b..852055da 100644 --- a/code/espurna/espurna.ino +++ b/code/espurna/espurna.ino @@ -49,7 +49,7 @@ void setup() { // Init EEPROM eepromSetup(); - + // Init Serial, SPIFFS and system check systemSetup(); @@ -100,7 +100,9 @@ void setup() { relaySetup(); buttonSetup(); - ledSetup(); + #if LED_SUPPORT + ledSetup(); + #endif #if MQTT_SUPPORT mqttSetup(); #endif diff --git a/code/espurna/led.ino b/code/espurna/led.ino index 06fac792..f71aa31b 100644 --- a/code/espurna/led.ino +++ b/code/espurna/led.ino @@ -10,6 +10,8 @@ Copyright (C) 2016-2018 by Xose Pérez // LED // ----------------------------------------------------------------------------- +#if LED_SUPPORT + typedef struct { unsigned char pin; bool reverse; @@ -290,3 +292,5 @@ void ledLoop() { _led_update = false; } + +#endif LED_SUPPORT diff --git a/code/espurna/relay.ino b/code/espurna/relay.ino index 1c361a60..f738187e 100644 --- a/code/espurna/relay.ino +++ b/code/espurna/relay.ino @@ -194,7 +194,9 @@ void _relayProcess(bool mode) { #endif // Flag relay-based LEDs to update status - ledUpdate(true); + #if LED_SUPPORT + ledUpdate(true); + #endif _relays[id].report = false; _relays[id].group_report = false; From 152bf22fdd2b069bffd5d22752b4172a59703b5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Thu, 28 Jun 2018 14:08:49 +0200 Subject: [PATCH 7/7] Option to disable button support --- code/espurna/button.ino | 4 ++++ code/espurna/config/general.h | 4 ++++ code/espurna/config/hardware.h | 1 + code/espurna/espurna.ino | 4 +++- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/code/espurna/button.ino b/code/espurna/button.ino index ea550e1f..4d8afef5 100644 --- a/code/espurna/button.ino +++ b/code/espurna/button.ino @@ -10,6 +10,8 @@ Copyright (C) 2016-2018 by Xose Pérez // BUTTON // ----------------------------------------------------------------------------- +#if BUTTON_SUPPORT + #include #include @@ -266,3 +268,5 @@ void buttonLoop() { #endif } + +#endif // BUTTON_SUPPORT diff --git a/code/espurna/config/general.h b/code/espurna/config/general.h index 8c10f7c7..60783df6 100644 --- a/code/espurna/config/general.h +++ b/code/espurna/config/general.h @@ -201,6 +201,10 @@ // BUTTON //------------------------------------------------------------------------------ +#ifndef BUTTON_SUPPORT +#define BUTTON_SUPPORT 1 +#endif + #ifndef BUTTON_DEBOUNCE_DELAY #define BUTTON_DEBOUNCE_DELAY 50 // Debounce delay (ms) #endif diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index c200cc77..69a69ec3 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -37,6 +37,7 @@ // Disable non-core modules #define ALEXA_SUPPORT 0 #define BROKER_SUPPORT 0 + #define BUTTON_SUPPORT 0 #define DOMOTICZ_SUPPORT 0 #define HOMEASSISTANT_SUPPORT 0 #define I2C_SUPPORT 0 diff --git a/code/espurna/espurna.ino b/code/espurna/espurna.ino index 852055da..c064aa20 100644 --- a/code/espurna/espurna.ino +++ b/code/espurna/espurna.ino @@ -99,7 +99,9 @@ void setup() { #endif relaySetup(); - buttonSetup(); + #if BUTTON_SUPPORT + buttonSetup(); + #endif #if LED_SUPPORT ledSetup(); #endif