diff options
| author | Jeff Epler <jeff@adafruit.com> | 2021-02-18 20:29:05 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-18 20:29:05 -0600 |
| commit | 1cd4e4552e1a72c61a787c2fa0b8d51a7cf1301f (patch) | |
| tree | 58d5a81dd3753458f2cb9d4d6fddcf89ebc43c66 /py | |
| parent | 0ecb24c3e56c64c11265611ec174950b18fce8bf (diff) | |
| parent | b854c06a0ca31e97b4c6998ff8ef5b314ebf49e4 (diff) | |
Merge pull request #4219 from jepler/bit_transpose
Add Bit transpose function to support piopixl8
Diffstat (limited to 'py')
| -rw-r--r-- | py/circuitpy_defns.mk | 4 | ||||
| -rw-r--r-- | py/circuitpy_mpconfig.h | 9 | ||||
| -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 f907bf7ae..47870ede1 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -132,6 +132,9 @@ endif ifeq ($(CIRCUITPY_AUDIOMP3),1) SRC_PATTERNS += audiomp3/% endif +ifeq ($(CIRCUITPY_BITOPS),1) +SRC_PATTERNS += bitops/% +endif ifeq ($(CIRCUITPY_BITBANGIO),1) SRC_PATTERNS += bitbangio/% endif @@ -466,6 +469,7 @@ SRC_SHARED_MODULE_ALL = \ bitbangio/OneWire.c \ bitbangio/SPI.c \ bitbangio/__init__.c \ + bitops/__init__.c \ board/__init__.c \ adafruit_bus_device/__init__.c \ adafruit_bus_device/I2CDevice.c \ diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index ee23c7156..d72146c42 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -299,6 +299,14 @@ extern const struct _mp_obj_module_t audiopwmio_module; #define BINASCII_MODULE #endif +#if CIRCUITPY_BITOPS +extern const struct _mp_obj_module_t bitops_module; +#define BITOPS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_bitops),(mp_obj_t)&bitops_module }, +#else +#define BITOPS_MODULE +#endif + + #if CIRCUITPY_BITBANGIO #define BITBANGIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_bitbangio), (mp_obj_t)&bitbangio_module }, extern const struct _mp_obj_module_t bitbangio_module; @@ -819,6 +827,7 @@ extern const struct _mp_obj_module_t msgpack_module; AUDIOMP3_MODULE \ AUDIOPWMIO_MODULE \ BINASCII_MODULE \ + BITOPS_MODULE \ BITBANGIO_MODULE \ BLEIO_MODULE \ BOARD_MODULE \ diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index d9c7c0d33..6244ed136 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -89,6 +89,9 @@ CFLAGS += -DCIRCUITPY_AUDIOMP3=$(CIRCUITPY_AUDIOMP3) CIRCUITPY_BINASCII ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_BINASCII=$(CIRCUITPY_BINASCII) +CIRCUITPY_BITOPS ?= 0 +CFLAGS += -DCIRCUITPY_BITOPS=$(CIRCUITPY_BITOPS) + CIRCUITPY_BITBANGIO ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_BITBANGIO=$(CIRCUITPY_BITBANGIO) |
