index fix
This commit is contained in:
parent
60985968a8
commit
c85873e4e6
@ -54,9 +54,9 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
||||
}
|
||||
}
|
||||
|
||||
//check if pins are on the same I2C peripheral
|
||||
//handle typedef selection, errors
|
||||
if(self->sda->i2c_index == self->scl->i2c_index) {
|
||||
I2Cx = mcu_i2c_banks[self->sda->i2c_index];
|
||||
I2Cx = mcu_i2c_banks[self->sda->i2c_index-1];
|
||||
} else {
|
||||
mp_raise_RuntimeError(translate("Invalid I2C pin selection"));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user