Initial commit. Edited error messages in .c files
This commit is contained in:
parent
9140bfb5b2
commit
2656c84b01
@ -97,7 +97,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
||||
if (!gpio_get_pin_level(sda->number) || !gpio_get_pin_level(scl->number)) {
|
||||
reset_pin_number(sda->number);
|
||||
reset_pin_number(scl->number);
|
||||
mp_raise_RuntimeError(translate("SDA or SCL needs a pull up"));
|
||||
mp_raise_RuntimeError(translate("No pull up found on SDA or SCL; check your wiring"));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -85,7 +85,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
||||
if (gpio_get_level(sda->number) == 0 || gpio_get_level(scl->number) == 0) {
|
||||
reset_pin_number(sda->number);
|
||||
reset_pin_number(scl->number);
|
||||
mp_raise_RuntimeError(translate("SDA or SCL needs a pull up"));
|
||||
mp_raise_RuntimeError(translate("No pull up found on SDA or SCL; check your wiring"));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -110,7 +110,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
||||
if( !GPIO_PinRead(sda->gpio, sda->number) || !GPIO_PinRead(scl->gpio, scl->number)) {
|
||||
common_hal_reset_pin(sda);
|
||||
common_hal_reset_pin(scl);
|
||||
mp_raise_RuntimeError(translate("SDA or SCL needs a pull up"));
|
||||
mp_raise_RuntimeError(translate("No pull up found on SDA or SCL; check your wiring"));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -131,7 +131,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, const mcu_pin_obj_t *
|
||||
if (!nrf_gpio_pin_read(sda->number) || !nrf_gpio_pin_read(scl->number)) {
|
||||
reset_pin_number(sda->number);
|
||||
reset_pin_number(scl->number);
|
||||
mp_raise_RuntimeError(translate("SDA or SCL needs a pull up"));
|
||||
mp_raise_RuntimeError(translate("No pull up found on SDA or SCL; check your wiring"));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -90,7 +90,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
||||
if (!gpio_get(sda->number) || !gpio_get(scl->number)) {
|
||||
reset_pin_number(sda->number);
|
||||
reset_pin_number(scl->number);
|
||||
mp_raise_RuntimeError(translate("SDA or SCL needs a pull up"));
|
||||
mp_raise_RuntimeError(translate("No pull up found on SDA or SCL; check your wiring"));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user