diff options
Diffstat (limited to 'py')
| -rw-r--r-- | py/circuitpy_defns.mk | 5 | ||||
| -rw-r--r-- | py/circuitpy_mpconfig.h | 9 | ||||
| -rw-r--r-- | py/circuitpy_mpconfig.mk | 5 |
3 files changed, 19 insertions, 0 deletions
diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 9bda124fc..09d0a93e2 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -201,6 +201,9 @@ endif ifeq ($(CIRCUITPY_USTACK),1) SRC_PATTERNS += ustack/% endif +ifeq ($(CIRCUITPY_PEW),1) +SRC_PATTERNS += _pew/% +endif # All possible sources are listed here, and are filtered by SRC_PATTERNS. SRC_COMMON_HAL = \ @@ -323,6 +326,8 @@ $(filter $(SRC_PATTERNS), \ terminalio/__init__.c \ uheap/__init__.c \ ustack/__init__.c \ + _pew/__init__.c \ + _pew/PewPew.c \ ) ifeq ($(INTERNAL_LIBM),1) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 218fc3d05..00f3c7b3f 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -470,6 +470,13 @@ extern const struct _mp_obj_module_t ustack_module; #define USTACK_MODULE #endif +#if CIRCUITPY_PEW +extern const struct _mp_obj_module_t pew_module; +#define PEW_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR__pew),(mp_obj_t)&pew_module }, +#else +#define PEW_MODULE +#endif + // These modules are not yet in shared-bindings, but we prefer the non-uxxx names. #if MICROPY_PY_UERRNO #define ERRNO_MODULE { MP_ROM_QSTR(MP_QSTR_errno), MP_ROM_PTR(&mp_module_uerrno) }, @@ -529,6 +536,7 @@ extern const struct _mp_obj_module_t ustack_module; NETWORK_MODULE \ SOCKET_MODULE \ WIZNET_MODULE \ + PEW_MODULE \ PIXELBUF_MODULE \ PULSEIO_MODULE \ RANDOM_MODULE \ @@ -570,6 +578,7 @@ extern const struct _mp_obj_module_t ustack_module; vstr_t *repl_line; \ mp_obj_t rtc_time_source; \ mp_obj_t gamepad_singleton; \ + mp_obj_t pew_singleton; \ mp_obj_t terminal_tilegrid_tiles; \ FLASH_ROOT_POINTERS \ NETWORK_ROOT_POINTERS \ diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index e10c7f66e..8ea72f0bf 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -218,6 +218,11 @@ CIRCUITPY_USB_MIDI = 1 endif CFLAGS += -DCIRCUITPY_USB_MIDI=$(CIRCUITPY_USB_MIDI) +ifndef CIRCUITPY_PEW +CIRCUITPY_PEW = 0 +endif +CFLAGS += -DCIRCUITPY_PEW=$(CIRCUITPY_PEW) + # For debugging. ifndef CIRCUITPY_USTACK CIRCUITPY_USTACK = 0 |
