i2c_sda, i2c_scl, spi_mosi, spi_miso, spi_sclk without HW_PIN_*, bh1750
platformio: - add bh1750 to _max - define rotary defaults for wemos usermod_bh1750 - Remove HW_PIN_* and replace by i2c_sda etc - add appendConfigData usermods mpu6050_imu, rtc, 4ld, pinmanager - Remove HW_PIN_* change SDA2:pin (etc) to SDA:pin
This commit is contained in:
@@ -16,10 +16,6 @@ class RTCUsermod : public Usermod {
|
||||
|
||||
void setup() {
|
||||
PinManagerPinType pins[2] = { { i2c_scl, true }, { i2c_sda, true } };
|
||||
#if defined(ARDUINO_ARCH_ESP32) && defined(HW_PIN_SDA) && defined(HW_PIN_SCL)
|
||||
//if (pins[0].pin < 0) pins[0].pin = HW_PIN_SCL; //WLEDMM
|
||||
//if (pins[1].pin < 0) pins[1].pin = HW_PIN_SDA; //WLEDMM
|
||||
#endif
|
||||
if (pins[1].pin < 0 || pins[0].pin < 0) { disabled=true; return; } //WLEDMM bugfix - ensure that "final" GPIO are valid and no "-1" sneaks trough
|
||||
if (!pinManager.allocateMultiplePins(pins, 2, PinOwner::HW_I2C)) { disabled = true; return; }
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
|
||||
Reference in New Issue
Block a user