summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Halbert <halbert@adafruit.com>2021-02-03 07:56:59 -0500
committerGitHub <noreply@github.com>2021-02-03 07:56:59 -0500
commitcd616f63932632b27d8fd7cbf40d7b3f49f5a4dc (patch)
tree40f7432927a5235f71dbb5c4d44e2e73a3afaec6
parent9140bfb5b26dd78203160de344a5b08e3a63e027 (diff)
parent4eb396806c9423d43ba1ac2d4601737f03ce7ede (diff)
Merge pull request #4118 from BiffoBear/Clarified-I2C-init-error-msg-take-2
Clarified i2 c init error msg take 2
-rw-r--r--locale/circuitpython.pot12
-rw-r--r--ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk11
-rw-r--r--ports/atmel-samd/common-hal/busio/I2C.c2
-rw-r--r--ports/esp32s2/common-hal/busio/I2C.c2
-rw-r--r--ports/mimxrt10xx/common-hal/busio/I2C.c2
-rw-r--r--ports/nrf/common-hal/busio/I2C.c2
-rw-r--r--ports/raspberrypi/common-hal/busio/I2C.c2
7 files changed, 12 insertions, 21 deletions
diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot
index 4a43759a7..529bc6d52 100644
--- a/locale/circuitpython.pot
+++ b/locale/circuitpython.pot
@@ -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 ""
@@ -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"
diff --git a/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk b/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk
index 735d42297..1f88fbead 100644
--- a/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk
@@ -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
diff --git a/ports/atmel-samd/common-hal/busio/I2C.c b/ports/atmel-samd/common-hal/busio/I2C.c
index ffe74a274..2551f7bf1 100644
--- a/ports/atmel-samd/common-hal/busio/I2C.c
+++ b/ports/atmel-samd/common-hal/busio/I2C.c
@@ -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
diff --git a/ports/esp32s2/common-hal/busio/I2C.c b/ports/esp32s2/common-hal/busio/I2C.c
index 772262d0a..8372eb8c3 100644
--- a/ports/esp32s2/common-hal/busio/I2C.c
+++ b/ports/esp32s2/common-hal/busio/I2C.c
@@ -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
diff --git a/ports/mimxrt10xx/common-hal/busio/I2C.c b/ports/mimxrt10xx/common-hal/busio/I2C.c
index aaa2549a8..c8daddc4b 100644
--- a/ports/mimxrt10xx/common-hal/busio/I2C.c
+++ b/ports/mimxrt10xx/common-hal/busio/I2C.c
@@ -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
diff --git a/ports/nrf/common-hal/busio/I2C.c b/ports/nrf/common-hal/busio/I2C.c
index 37cb192df..654fa857f 100644
--- a/ports/nrf/common-hal/busio/I2C.c
+++ b/ports/nrf/common-hal/busio/I2C.c
@@ -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
diff --git a/ports/raspberrypi/common-hal/busio/I2C.c b/ports/raspberrypi/common-hal/busio/I2C.c
index fa49e375e..26a7f3807 100644
--- a/ports/raspberrypi/common-hal/busio/I2C.c
+++ b/ports/raspberrypi/common-hal/busio/I2C.c
@@ -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