From 77220e24dde0b93552d99366ef50213c3a4c23a9 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Sat, 20 Mar 2021 23:52:38 +0100 Subject: [PATCH] Reserved pins management. Disabling ADALight by default. --- wled00/wled.cpp | 4 +++- wled00/wled.h | 4 ++-- wled00/xml.cpp | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/wled00/wled.cpp b/wled00/wled.cpp index 62156eb8..438d3fdb 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -319,7 +319,9 @@ void WLED::setup() #ifdef WLED_USE_DMX //reserve GPIO2 as hardcoded DMX pin pinManager.allocatePin(2); #endif - +#ifdef WLED_ENABLE_ADALIGHT // reserve GPIO3 (RX) pin for ADALight + pinManager.allocatePin(3); +#endif bool fsinit = false; DEBUGFS_PRINTLN(F("Mount FS")); #ifdef ARDUINO_ARCH_ESP32 diff --git a/wled00/wled.h b/wled00/wled.h index 77dfbb4f..403ec9d5 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2103204 +#define VERSION 2103205 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG @@ -32,7 +32,7 @@ #ifndef WLED_DISABLE_MQTT #define WLED_ENABLE_MQTT // saves 12kb #endif -#define WLED_ENABLE_ADALIGHT // saves 500b only +//#define WLED_ENABLE_ADALIGHT // saves 500b only (uses GPIO3 (RX) for serial) //#define WLED_ENABLE_DMX // uses 3.5kb (use LEDPIN other than 2) #define WLED_ENABLE_LOXONE // uses 1.2kb #ifndef WLED_DISABLE_WEBSOCKETS diff --git a/wled00/xml.cpp b/wled00/xml.cpp index f0cb93c1..c8f75333 100644 --- a/wled00/xml.cpp +++ b/wled00/xml.cpp @@ -285,6 +285,9 @@ void getSettingsJS(byte subPage, char* dest) #ifdef WLED_ENABLE_DMX oappend(SET_F(",2")); // DMX hardcoded pin #endif + #ifdef WLED_ENABLE_ADALIGHT + oappend(SET_F(",3")); // ADALight (RX) pin + #endif #ifdef WLED_DEBUG oappend(SET_F(",1")); // debug output (TX) pin #endif