summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/circuitpy_defns.mk6
-rw-r--r--py/circuitpy_mpconfig.h8
-rw-r--r--py/circuitpy_mpconfig.mk3
3 files changed, 17 insertions, 0 deletions
diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk
index 0e87287c1..f72c821e5 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_CAMERA),1)
+SRC_PATTERNS += camera/%
+endif
ifeq ($(CIRCUITPY_COUNTIO),1)
SRC_PATTERNS += countio/%
endif
@@ -310,6 +313,9 @@ SRC_COMMON_HAL_ALL = \
busio/SPI.c \
busio/UART.c \
busio/__init__.c \
+ camera/__init__.c \
+ camera/Camera.c \
+ camera/ImageSize.c \
countio/Counter.c \
countio/__init__.c \
digitalio/DigitalInOut.c \
diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h
index 0fafbe876..4272de2ec 100644
--- a/py/circuitpy_mpconfig.h
+++ b/py/circuitpy_mpconfig.h
@@ -329,6 +329,13 @@ extern const struct _mp_obj_module_t busio_module;
#define BUSIO_MODULE
#endif
+#if CIRCUITPY_CAMERA
+extern const struct _mp_obj_module_t camera_module;
+#define CAMERA_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_camera), (mp_obj_t)&camera_module },
+#else
+#define CAMERA_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 },
@@ -758,6 +765,7 @@ extern const struct _mp_obj_module_t wifi_module;
BLEIO_MODULE \
BOARD_MODULE \
BUSIO_MODULE \
+ CAMERA_MODULE \
COUNTIO_MODULE \
DIGITALIO_MODULE \
DISPLAYIO_MODULE \
diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk
index a2da9c42f..54bdefc6d 100644
--- a/py/circuitpy_mpconfig.mk
+++ b/py/circuitpy_mpconfig.mk
@@ -90,6 +90,9 @@ CFLAGS += -DCIRCUITPY_BOARD=$(CIRCUITPY_BOARD)
CIRCUITPY_BUSIO ?= 1
CFLAGS += -DCIRCUITPY_BUSIO=$(CIRCUITPY_BUSIO)
+CIRCUITPY_CAMERA ?= 0
+CFLAGS += -DCIRCUITPY_CAMERA=$(CIRCUITPY_CAMERA)
+
CIRCUITPY_DIGITALIO ?= 1
CFLAGS += -DCIRCUITPY_DIGITALIO=$(CIRCUITPY_DIGITALIO)