diff options
| author | Scott Shawcroft <scott@adafruit.com> | 2020-05-13 08:22:57 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-13 08:22:57 -0700 |
| commit | 82fdced180da8b6730753caae93ac6b9c9fcdaae (patch) | |
| tree | 6989f946451ea25bfc40b901c4cd97119a1fcaeb /py | |
| parent | 75f9969860870a4ae636c74ae210275413b13c2f (diff) | |
| parent | 4612270f98988ac4646c5cbf4bebddb35e71f660 (diff) | |
Merge pull request #2827 from LearnWeaver/Optical-Encoder-Module
Countio
Diffstat (limited to 'py')
| -rw-r--r-- | py/circuitpy_defns.mk | 5 | ||||
| -rw-r--r-- | py/circuitpy_mpconfig.h | 8 | ||||
| -rw-r--r-- | py/circuitpy_mpconfig.mk | 3 |
3 files changed, 16 insertions, 0 deletions
diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index c6ea2b45b..f26baec04 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) |
