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:
Ewoud
2023-01-05 16:35:49 +01:00
parent 2ec24242db
commit 642d7d91ea
15 changed files with 75 additions and 75 deletions

View File

@@ -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)