diff options
| author | microDev <70126934+microDev1@users.noreply.github.com> | 2021-01-12 18:28:38 +0530 |
|---|---|---|
| committer | microDev <70126934+microDev1@users.noreply.github.com> | 2021-01-12 18:28:38 +0530 |
| commit | cd16f29efdc2df4544ffcccca5ae227be2f816ba (patch) | |
| tree | 8a90c5519f5b478d72d1647f7a537918bb543fdd /py | |
| parent | 5f448139e0c5972def8a8f138cd29afd1e9222f8 (diff) | |
| parent | 047708e36e67beee14771120296cdf758f00601d (diff) | |
Merge branch 'main' into TouchAlarm
Diffstat (limited to 'py')
| -rw-r--r-- | py/circuitpy_defns.mk | 14 | ||||
| -rw-r--r-- | py/circuitpy_mpconfig.h | 8 | ||||
| -rw-r--r-- | py/circuitpy_mpconfig.mk | 3 |
3 files changed, 25 insertions, 0 deletions
diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index d6d192a95..21bd5b965 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -58,6 +58,14 @@ BASE_CFLAGS = \ # -H +# Set a global CIRCUITPY_DEBUG flag. +# Don't just call it "DEBUG": too many libraries use plain DEBUG. +ifneq ($(DEBUG),) +CFLAGS += -DCIRCUITPY_DEBUG=$(DEBUG) +else +CFLAGS += -DCIRCUITPY_DEBUG=0 +endif + ### # Handle frozen modules. @@ -292,6 +300,9 @@ endif ifeq ($(CIRCUITPY_PEW),1) SRC_PATTERNS += _pew/% endif +ifeq ($(CIRCUITPY_MSGPACK),1) +SRC_PATTERNS += msgpack/% +endif # All possible sources are listed here, and are filtered by SRC_PATTERNS in SRC_COMMON_HAL SRC_COMMON_HAL_ALL = \ @@ -412,6 +423,8 @@ $(filter $(SRC_PATTERNS), \ math/__init__.c \ microcontroller/ResetReason.c \ microcontroller/RunMode.c \ + msgpack/__init__.c \ + msgpack/ExtType.c \ supervisor/RunReason.c \ ) @@ -481,6 +494,7 @@ SRC_SHARED_MODULE_ALL = \ memorymonitor/AllocationAlarm.c \ memorymonitor/AllocationSize.c \ network/__init__.c \ + msgpack/__init__.c \ os/__init__.c \ random/__init__.c \ rgbmatrix/RGBMatrix.c \ diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 08c92a77e..a3411b7ad 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -774,6 +774,13 @@ extern const struct _mp_obj_module_t wifi_module; #define WIFI_MODULE #endif +#if CIRCUITPY_MSGPACK +extern const struct _mp_obj_module_t msgpack_module; +#define MSGPACK_MODULE { MP_ROM_QSTR(MP_QSTR_msgpack), MP_ROM_PTR(&msgpack_module) }, +#else +#define MSGPACK_MODULE +#endif + // Define certain native modules with weak links so they can be replaced with Python // implementations. This list may grow over time. #define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \ @@ -830,6 +837,7 @@ extern const struct _mp_obj_module_t wifi_module; _EVE_MODULE \ MEMORYMONITOR_MODULE \ MICROCONTROLLER_MODULE \ + MSGPACK_MODULE \ NEOPIXEL_WRITE_MODULE \ NETWORK_MODULE \ SOCKET_MODULE \ diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index e588c41e0..a01da2956 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -308,3 +308,6 @@ CFLAGS += -DCIRCUITPY_WIFI=$(CIRCUITPY_WIFI) # Enabled micropython.native decorator (experimental) CIRCUITPY_ENABLE_MPY_NATIVE ?= 0 CFLAGS += -DCIRCUITPY_ENABLE_MPY_NATIVE=$(CIRCUITPY_ENABLE_MPY_NATIVE) + +CIRCUITPY_MSGPACK ?= $(CIRCUITPY_FULL_BUILD) +CFLAGS += -DCIRCUITPY_MSGPACK=$(CIRCUITPY_MSGPACK) |
