59inline bool i2cPortC(m5::unit::UnitUnified& units, m5::unit::Component& u,
const bool bus_ready =
false)
61 const int sda = M5.getPin(m5::pin_name_t::port_c_pin2);
62 const int scl = M5.getPin(m5::pin_name_t::port_c_pin1);
63 if (sda < 0 || scl < 0) {
66#if M5_UNIT_IMU_HP_I2C_NUM >= 2
67 static m5::I2C_Class port_c_i2c;
68 if (!bus_ready && !port_c_i2c.begin(I2C_NUM_1, sda, scl)) {
71 return units.add(u, port_c_i2c);
bool i2cPortC(m5::unit::UnitUnified &units, m5::unit::Component &u, const bool bus_ready=false)
Route a GROVE unit to classic M5Stack Core Port C on a dedicated I2C bus.
Definition m5_unit_imu_wiring.hpp:59