Skip to content

Commit ad98801

Browse files
authored
Merge pull request #2961 from arturo182/i2c-exception
mimxrt10xx: Change exception type to match other ports
2 parents 739b42e + d6c59c4 commit ad98801

File tree

1 file changed

+1
-1
lines changed
  • ports/mimxrt10xx/common-hal/busio

1 file changed

+1
-1
lines changed

ports/mimxrt10xx/common-hal/busio/I2C.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
8181
}
8282

8383
if(self->sda_pin == NULL || self->scl_pin == NULL) {
84-
mp_raise_RuntimeError(translate("Invalid I2C pin selection"));
84+
mp_raise_ValueError(translate("Invalid I2C pin selection"));
8585
} else {
8686
self->i2c = mcu_i2c_banks[self->sda_pin->bank_idx - 1];
8787
}

0 commit comments

Comments
 (0)