Merge pull request #2961 from arturo182/i2c-exception
mimxrt10xx: Change exception type to match other ports
This commit is contained in:
commit
ad988013f0
@ -81,7 +81,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
||||
}
|
||||
|
||||
if(self->sda_pin == NULL || self->scl_pin == NULL) {
|
||||
mp_raise_RuntimeError(translate("Invalid I2C pin selection"));
|
||||
mp_raise_ValueError(translate("Invalid I2C pin selection"));
|
||||
} else {
|
||||
self->i2c = mcu_i2c_banks[self->sda_pin->bank_idx - 1];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user