mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 09:43:03 +00:00
Implement optional second I2C bus for NRF52840
Enabled at compile-time if WIRE_INFERFACES_COUNT defined as 2
This commit is contained in:
committed by
todd-herbert
parent
1f8aa1efc7
commit
11598beb16
@@ -360,6 +360,8 @@ void setup()
|
||||
Wire1.begin();
|
||||
#elif defined(I2C_SDA1) && !defined(ARCH_RP2040)
|
||||
Wire1.begin(I2C_SDA1, I2C_SCL1);
|
||||
#elif defined(NRF52840_XXAA) && (WIRE_INTERFACES_COUNT == 2)
|
||||
Wire1.begin();
|
||||
#endif
|
||||
|
||||
#if defined(I2C_SDA) && defined(ARCH_RP2040)
|
||||
@@ -427,6 +429,8 @@ void setup()
|
||||
#elif defined(I2C_SDA1) && !defined(ARCH_RP2040)
|
||||
Wire1.begin(I2C_SDA1, I2C_SCL1);
|
||||
i2cScanner->scanPort(ScanI2C::I2CPort::WIRE1);
|
||||
#elif defined(NRF52840_XXAA) && (WIRE_INTERFACES_COUNT == 2)
|
||||
i2cScanner->scanPort(ScanI2C::I2CPort::WIRE1);
|
||||
#endif
|
||||
|
||||
#if defined(I2C_SDA) && defined(ARCH_RP2040)
|
||||
|
||||
Reference in New Issue
Block a user