summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2020-05-13 08:23:55 -0700
committerScott Shawcroft <scott@tannewt.org>2020-05-13 08:23:55 -0700
commit7546d47f777636962fa0119224f52496ab64181f (patch)
tree6628db8926179284db3857cb2dcc492e5300750c /py
parent2efe17bcb76197137287ae4a984b4481ab77be15 (diff)
parent82fdced180da8b6730753caae93ac6b9c9fcdaae (diff)
Merge remote-tracking branch 'adafruit/master' into improve_verification
Diffstat (limited to 'py')
-rw-r--r--py/circuitpy_defns.mk5
-rw-r--r--py/circuitpy_mpconfig.h8
-rw-r--r--py/circuitpy_mpconfig.mk3
3 files changed, 16 insertions, 0 deletions
diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk
index 9913329c2..9e36f2e6a 100644
--- a/py/circuitpy_defns.mk
+++ b/py/circuitpy_defns.mk
@@ -139,6 +139,9 @@ endif
ifeq ($(CIRCUITPY_BUSIO),1)
SRC_PATTERNS += busio/% bitbangio/OneWire.%
endif
+ifeq ($(CIRCUITPY_COUNTIO),1)
+SRC_PATTERNS += countio/%
+endif
ifeq ($(CIRCUITPY_DIGITALIO),1)
SRC_PATTERNS += digitalio/%
endif
@@ -269,6 +272,8 @@ SRC_COMMON_HAL_ALL = \
busio/SPI.c \
busio/UART.c \
busio/__init__.c \
+ countio/Counter.c \
+ countio/__init__.c \
digitalio/DigitalInOut.c \
digitalio/__init__.c \
displayio/ParallelBus.c \
diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h
index a62ac11e9..6ea413216 100644
--- a/py/circuitpy_mpconfig.h
+++ b/py/circuitpy_mpconfig.h
@@ -321,6 +321,13 @@ extern const struct _mp_obj_module_t busio_module;
#define BUSIO_MODULE
#endif
+#if CIRCUITPY_COUNTIO
+extern const struct _mp_obj_module_t countio_module;
+#define COUNTIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_countio), (mp_obj_t)&countio_module },
+#else
+#define COUNTIO_MODULE
+#endif
+
#if CIRCUITPY_DIGITALIO
extern const struct _mp_obj_module_t digitalio_module;
#define DIGITALIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_digitalio), (mp_obj_t)&digitalio_module },
@@ -645,6 +652,7 @@ extern const struct _mp_obj_module_t ustack_module;
BLEIO_MODULE \
BOARD_MODULE \
BUSIO_MODULE \
+ COUNTIO_MODULE \
DIGITALIO_MODULE \
DISPLAYIO_MODULE \
FONTIO_MODULE \
diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk
index 046d91caa..0801540bc 100644
--- a/py/circuitpy_mpconfig.mk
+++ b/py/circuitpy_mpconfig.mk
@@ -88,6 +88,9 @@ CFLAGS += -DCIRCUITPY_BUSIO=$(CIRCUITPY_BUSIO)
CIRCUITPY_DIGITALIO ?= 1
CFLAGS += -DCIRCUITPY_DIGITALIO=$(CIRCUITPY_DIGITALIO)
+CIRCUITPY_COUNTIO ?= $(CIRCUITPY_FULL_BUILD)
+CFLAGS += -DCIRCUITPY_COUNTIO=$(CIRCUITPY_COUNTIO)
+
CIRCUITPY_DISPLAYIO ?= $(CIRCUITPY_FULL_BUILD)
CFLAGS += -DCIRCUITPY_DISPLAYIO=$(CIRCUITPY_DISPLAYIO)