From 71d25367256e6ae1af0ac308f8a46d3b5417cefb Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 6 May 2021 09:04:56 -0700 Subject: [PATCH] Build fixes thanks to jepler --- py/py.mk | 18 ------------------ shared-bindings/camera/ImageFormat.c | 2 +- shared-bindings/gnss/SatelliteSystem.c | 2 +- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/py/py.mk b/py/py.mk index 0a8bd4cf06..6bbb09de61 100644 --- a/py/py.mk +++ b/py/py.mk @@ -55,24 +55,6 @@ CFLAGS_MOD += -DCIRCUITPY_ULAB=1 -DMODULE_ULAB_ENABLED=1 -iquote $(TOP)/extmod/u $(BUILD)/extmod/ulab/code/%.o: CFLAGS += -Wno-missing-declarations -Wno-missing-prototypes -Wno-unused-parameter -Wno-float-equal -Wno-sign-compare -Wno-cast-align -Wno-shadow -DCIRCUITPY endif -# External modules written in C. -ifneq ($(USER_C_MODULES),) -# pre-define USERMOD variables as expanded so that variables are immediate -# expanded as they're added to them -SRC_USERMOD := -CFLAGS_USERMOD := -LDFLAGS_USERMOD := -$(foreach module, $(wildcard $(USER_C_MODULES)/*/micropython.mk), \ - $(eval USERMOD_DIR = $(patsubst %/,%,$(dir $(module))))\ - $(info Including User C Module from $(USERMOD_DIR))\ - $(eval include $(module))\ -) - -SRC_MOD += $(patsubst $(USER_C_MODULES)/%.c,%.c,$(SRC_USERMOD)) -CFLAGS_MOD += $(CFLAGS_USERMOD) -LDFLAGS_MOD += $(LDFLAGS_USERMOD) -endif - # py object files PY_CORE_O_BASENAME = $(addprefix py/,\ mpstate.o \ diff --git a/shared-bindings/camera/ImageFormat.c b/shared-bindings/camera/ImageFormat.c index 9f2f9617f6..3ff687b7bf 100644 --- a/shared-bindings/camera/ImageFormat.c +++ b/shared-bindings/camera/ImageFormat.c @@ -64,7 +64,7 @@ mp_obj_t camera_imageformat_type_to_obj(camera_imageformat_t format) { return (mp_obj_t)MP_ROM_PTR(&camera_imageformat_rgb565_obj); case IMAGEFORMAT_NONE: default: - return (mp_obj_t)MP_ROM_PTR(&mp_const_none_obj); + return MP_ROM_NONE; } } diff --git a/shared-bindings/gnss/SatelliteSystem.c b/shared-bindings/gnss/SatelliteSystem.c index 7d66727b8d..edac03ddb6 100644 --- a/shared-bindings/gnss/SatelliteSystem.c +++ b/shared-bindings/gnss/SatelliteSystem.c @@ -76,7 +76,7 @@ mp_obj_t gnss_satellitesystem_type_to_obj(gnss_satellitesystem_t system) { return (mp_obj_t)MP_ROM_PTR(&gnss_satellitesystem_qzss_l1s_obj); case SATELLITESYSTEM_NONE: default: - return (mp_obj_t)MP_ROM_PTR(&mp_const_none_obj); + return MP_ROM_NONE; } }