Merge pull request #2961 from arturo182/i2c-exception

mimxrt10xx: Change exception type to match other ports
This commit is contained in:
arturo182 2020-05-27 11:24:46 +02:00 committed by GitHub
commit ad988013f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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];
}