Skip to content

Commit cd616f6

Browse files
authored
Merge pull request adafruit#4118 from BiffoBear/Clarified-I2C-init-error-msg-take-2
Clarified i2 c init error msg take 2
2 parents 9140bfb + 4eb3968 commit cd616f6

File tree

7 files changed

+12
-21
lines changed

7 files changed

+12
-21
lines changed

locale/circuitpython.pot

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,6 +1535,12 @@ msgstr ""
15351535
msgid "No out in program"
15361536
msgstr ""
15371537

1538+
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
1539+
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
1540+
#: ports/raspberrypi/common-hal/busio/I2C.c
1541+
msgid "No pull up found on SDA or SCL; check your wiring"
1542+
msgstr ""
1543+
15381544
#: shared-module/touchio/TouchIn.c
15391545
msgid "No pulldown on pin; 1Mohm recommended"
15401546
msgstr ""
@@ -1866,12 +1872,6 @@ msgstr ""
18661872
msgid "SD card CSD format not supported"
18671873
msgstr ""
18681874

1869-
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
1870-
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
1871-
#: ports/raspberrypi/common-hal/busio/I2C.c
1872-
msgid "SDA or SCL needs a pull up"
1873-
msgstr ""
1874-
18751875
#: ports/stm/common-hal/sdioio/SDCard.c
18761876
#, c-format
18771877
msgid "SDIO GetCardInfo Error %d"

ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,5 @@ LONGINT_IMPL = NONE
1111
CIRCUITPY_FULL_BUILD = 0
1212

1313
SUPEROPT_GC = 0
14-
15-
CFLAGS_BOARD = --param max-inline-insns-auto=15
16-
ifeq ($(TRANSLATION), zh_Latn_pinyin)
17-
RELEASE_NEEDS_CLEAN_BUILD = 1
18-
CFLAGS_INLINE_LIMIT = 35
19-
endif
20-
ifeq ($(TRANSLATION), de_DE)
21-
RELEASE_NEEDS_CLEAN_BUILD = 1
22-
CFLAGS_INLINE_LIMIT = 35
2314
SUPEROPT_VM = 0
24-
endif
15+
CFLAGS_INLINE_LIMIT = 45

ports/atmel-samd/common-hal/busio/I2C.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
9797
if (!gpio_get_pin_level(sda->number) || !gpio_get_pin_level(scl->number)) {
9898
reset_pin_number(sda->number);
9999
reset_pin_number(scl->number);
100-
mp_raise_RuntimeError(translate("SDA or SCL needs a pull up"));
100+
mp_raise_RuntimeError(translate("No pull up found on SDA or SCL; check your wiring"));
101101
}
102102
#endif
103103

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
8585
if (gpio_get_level(sda->number) == 0 || gpio_get_level(scl->number) == 0) {
8686
reset_pin_number(sda->number);
8787
reset_pin_number(scl->number);
88-
mp_raise_RuntimeError(translate("SDA or SCL needs a pull up"));
88+
mp_raise_RuntimeError(translate("No pull up found on SDA or SCL; check your wiring"));
8989
}
9090
#endif
9191

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
110110
if( !GPIO_PinRead(sda->gpio, sda->number) || !GPIO_PinRead(scl->gpio, scl->number)) {
111111
common_hal_reset_pin(sda);
112112
common_hal_reset_pin(scl);
113-
mp_raise_RuntimeError(translate("SDA or SCL needs a pull up"));
113+
mp_raise_RuntimeError(translate("No pull up found on SDA or SCL; check your wiring"));
114114
}
115115
#endif
116116

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, const mcu_pin_obj_t *
131131
if (!nrf_gpio_pin_read(sda->number) || !nrf_gpio_pin_read(scl->number)) {
132132
reset_pin_number(sda->number);
133133
reset_pin_number(scl->number);
134-
mp_raise_RuntimeError(translate("SDA or SCL needs a pull up"));
134+
mp_raise_RuntimeError(translate("No pull up found on SDA or SCL; check your wiring"));
135135
}
136136
#endif
137137

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
9090
if (!gpio_get(sda->number) || !gpio_get(scl->number)) {
9191
reset_pin_number(sda->number);
9292
reset_pin_number(scl->number);
93-
mp_raise_RuntimeError(translate("SDA or SCL needs a pull up"));
93+
mp_raise_RuntimeError(translate("No pull up found on SDA or SCL; check your wiring"));
9494
}
9595
#endif
9696

0 commit comments

Comments
 (0)