summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2020-01-10 11:42:44 -0800
committerGitHub <noreply@github.com>2020-01-10 11:42:44 -0800
commit6ea8d8a6c2a6cefa8a46339053964fcba6df75d5 (patch)
treeccca169b4c94eda6b213d0c93222673a074cb78c /py
parent8708d3dc45ba48391e867fbda70de2ff4084f302 (diff)
parent360c876be406eb039c995e0b31d1c4ebe5e70323 (diff)
Merge pull request #2498 from dhalbert/optional-i2c-pullup-checking
Make requiring I2C pullups be optional
Diffstat (limited to 'py')
-rw-r--r--py/circuitpy_mpconfig.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk
index a464583f3..93175e136 100644
--- a/py/circuitpy_mpconfig.mk
+++ b/py/circuitpy_mpconfig.mk
@@ -310,6 +310,13 @@ CIRCUITPY_BITBANG_APA102 = 0
endif
CFLAGS += -DCIRCUITPY_BITBANG_APA102=$(CIRCUITPY_BITBANG_APA102)
+# Should busio.I2C() check for pullups?
+# Some boards in combination with certain peripherals may not want this.
+ifndef CIRCUITPY_REQUIRE_I2C_PULLUPS
+CIRCUITPY_REQUIRE_I2C_PULLUPS = 1
+endif
+CFLAGS += -DCIRCUITPY_REQUIRE_I2C_PULLUPS=$(CIRCUITPY_REQUIRE_I2C_PULLUPS)
+
# REPL over BLE
ifndef CIRCUITPY_SERIAL_BLE
CIRCUITPY_SERIAL_BLE = 0