Initial commit. Edited error messages in .c files

This commit is contained in:
BiffoBear 2021-02-03 05:49:40 +07:00
parent 9140bfb5b2
commit 2656c84b01
5 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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