Add build flags for global i2c & SPI pins
This commit is contained in:
parent
8619e8fc0b
commit
171cebed1c
@ -676,11 +676,37 @@ WLED_GLOBAL uint16_t ledMaps _INIT(0); // bitfield representation of available l
|
|||||||
// Usermod manager
|
// Usermod manager
|
||||||
WLED_GLOBAL UsermodManager usermods _INIT(UsermodManager());
|
WLED_GLOBAL UsermodManager usermods _INIT(UsermodManager());
|
||||||
|
|
||||||
WLED_GLOBAL int8_t i2c_sda _INIT(-1); // global I2C SDA pin [HW_PIN_SDA] (used for usermods)
|
// 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)
|
#ifndef I2CSDAPIN
|
||||||
WLED_GLOBAL int8_t spi_mosi _INIT(-1); // global SPI DATA/MOSI pin [HW_PIN_DATASPI] (used for usermods)
|
WLED_GLOBAL int8_t i2c_sda _INIT(-1);
|
||||||
WLED_GLOBAL int8_t spi_miso _INIT(-1); // global SPI DATA/MISO pin [HW_PIN_MISOSPI] (used for usermods)
|
#else
|
||||||
WLED_GLOBAL int8_t spi_sclk _INIT(-1); // global SPI CLOCK/SCLK pin [HW_PIN_CLOCKSPI] (used for usermods)
|
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
|
// global ArduinoJson buffer
|
||||||
WLED_GLOBAL StaticJsonDocument<JSON_BUFFER_SIZE> doc;
|
WLED_GLOBAL StaticJsonDocument<JSON_BUFFER_SIZE> doc;
|
||||||
|
Loading…
Reference in New Issue
Block a user