Skip to content

Commit

Permalink
Merge pull request #4118 from BiffoBear/Clarified-I2C-init-error-msg-…
Browse files Browse the repository at this point in the history
…take-2

Clarified i2 c init error msg take 2
  • Loading branch information
dhalbert authored Feb 3, 2021
2 parents 9140bfb + 4eb3968 commit cd616f6
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 21 deletions.
12 changes: 6 additions & 6 deletions locale/circuitpython.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1535,6 +1535,12 @@ msgstr ""
msgid "No out in program"
msgstr ""

#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c
msgid "No pull up found on SDA or SCL; check your wiring"
msgstr ""

#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
Expand Down Expand Up @@ -1866,12 +1872,6 @@ msgstr ""
msgid "SD card CSD format not supported"
msgstr ""

#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c
msgid "SDA or SCL needs a pull up"
msgstr ""

#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO GetCardInfo Error %d"
Expand Down
11 changes: 1 addition & 10 deletions ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,5 @@ LONGINT_IMPL = NONE
CIRCUITPY_FULL_BUILD = 0

SUPEROPT_GC = 0

CFLAGS_BOARD = --param max-inline-insns-auto=15
ifeq ($(TRANSLATION), zh_Latn_pinyin)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), de_DE)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
SUPEROPT_VM = 0
endif
CFLAGS_INLINE_LIMIT = 45
2 changes: 1 addition & 1 deletion ports/atmel-samd/common-hal/busio/I2C.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion ports/esp32s2/common-hal/busio/I2C.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion ports/mimxrt10xx/common-hal/busio/I2C.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion ports/nrf/common-hal/busio/I2C.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion ports/raspberrypi/common-hal/busio/I2C.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit cd616f6

Please sign in to comment.