diff --git a/wled00/wled.h b/wled00/wled.h index dac6ae8b5..9124cedcb 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -130,7 +130,7 @@ #include "src/dependencies/dmx/ESPDMX.h" #else //ESP32 #include "src/dependencies/dmx/SparkFunDMX.h" - #endif + #endif #endif #include "src/dependencies/e131/ESPAsyncE131.h" @@ -393,8 +393,8 @@ WLED_GLOBAL bool arlsForceMaxBri _INIT(false); // enable to f #ifdef ESP8266 WLED_GLOBAL DMXESPSerial dmx; #else //ESP32 - WLED_GLOBAL SparkFunDMX dmx; - #endif + WLED_GLOBAL SparkFunDMX dmx; + #endif WLED_GLOBAL uint16_t e131ProxyUniverse _INIT(0); // output this E1.31 (sACN) / ArtNet universe via MAX485 (0 = disabled) #endif WLED_GLOBAL uint16_t e131Universe _INIT(1); // settings for E1.31 (sACN) protocol (only DMX_MODE_MULTIPLE_* can span over consequtive universes) @@ -578,7 +578,7 @@ WLED_GLOBAL int16_t currentPlaylist _INIT(-1); //still used for "PL=~" HTTP API command WLED_GLOBAL byte presetCycCurr _INIT(0); WLED_GLOBAL byte presetCycMin _INIT(1); -WLED_GLOBAL byte presetCycMax _INIT(5); +WLED_GLOBAL byte presetCycMax _INIT(5); // realtime WLED_GLOBAL byte realtimeMode _INIT(REALTIME_MODE_INACTIVE); @@ -676,11 +676,37 @@ WLED_GLOBAL uint16_t ledMaps _INIT(0); // bitfield representation of available l // Usermod manager WLED_GLOBAL UsermodManager usermods _INIT(UsermodManager()); -WLED_GLOBAL int8_t i2c_sda _INIT(-1); // global I2C SDA pin [HW_PIN_SDA] (used for usermods) -WLED_GLOBAL int8_t i2c_scl _INIT(-1); // global I2C SCL pin [HW_PIN_SCL] (used for usermods) -WLED_GLOBAL int8_t spi_mosi _INIT(-1); // global SPI DATA/MOSI pin [HW_PIN_DATASPI] (used for usermods) -WLED_GLOBAL int8_t spi_miso _INIT(-1); // global SPI DATA/MISO pin [HW_PIN_MISOSPI] (used for usermods) -WLED_GLOBAL int8_t spi_sclk _INIT(-1); // global SPI CLOCK/SCLK pin [HW_PIN_CLOCKSPI] (used for usermods) +// global I2C SDA pin [HW_PIN_SDA] (used for usermods) +#ifndef I2CSDAPIN +WLED_GLOBAL int8_t i2c_sda _INIT(-1); +#else +WLED_GLOBAL int8_t i2c_sda _INIT(I2CSDAPIN); +#endif +// global I2C SCL pin [HW_PIN_SCL] (used for usermods) +#ifndef I2CSCLPIN +WLED_GLOBAL int8_t i2c_scl _INIT(-1); +#else +WLED_GLOBAL int8_t i2c_scl _INIT(I2CSCLPIN); +#endif + +// global SPI DATA/MOSI pin [HW_PIN_DATASPI] (used for usermods) +#ifndef SPIMOSIPIN +WLED_GLOBAL int8_t spi_mosi _INIT(-1); +#else +WLED_GLOBAL int8_t spi_mosi _INIT(SPIMOSIPIN); +#endif +// global SPI DATA/MISO pin [HW_PIN_MISOSPI] (used for usermods) +#ifndef SPIMISOPIN +WLED_GLOBAL int8_t spi_miso _INIT(-1); +#else +WLED_GLOBAL int8_t spi_miso _INIT(SPIMISOPIN); +#endif +// global SPI CLOCK/SCLK pin [HW_PIN_CLOCKSPI] (used for usermods) +#ifndef SPISCLKPIN +WLED_GLOBAL int8_t spi_sclk _INIT(-1); +#else +WLED_GLOBAL int8_t spi_sclk _INIT(SPISCLKPIN); +#endif // global ArduinoJson buffer WLED_GLOBAL StaticJsonDocument doc;