Allow overriding EXTRA_BUILTIN_MODULES in mpconfigboard.h
Some boards (like the uGame10) may want to have their own set of extra modules. This change lets them override EXTRA_BUILTIN_MODULES in their mpconfigboard.h and makes the ugame10 board do that.
This commit is contained in:
parent
be12e07d74
commit
6a6ab2b0ec
@ -47,3 +47,8 @@
|
||||
#define EXTERNAL_FLASH_DEVICES S25FL216K
|
||||
|
||||
#include "external_flash/external_flash.h"
|
||||
|
||||
#define EXTRA_BUILTIN_MODULES \
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_audioio), (mp_obj_t)&audioio_module }, \
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_gamepad),(mp_obj_t)&gamepad_module }, \
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR__stage), (mp_obj_t)&stage_module }
|
||||
|
@ -9,3 +9,6 @@ SPI_FLASH_FILESYSTEM = 1
|
||||
|
||||
CHIP_VARIANT = SAMD21E18A
|
||||
CHIP_FAMILY = samd21
|
||||
|
||||
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/ugame10
|
||||
|
@ -207,18 +207,22 @@ extern const struct _mp_obj_module_t usb_hid_module;
|
||||
#define AUDIOBUSIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_audiobusio), (mp_obj_t)&audiobusio_module },
|
||||
#endif
|
||||
|
||||
#ifndef EXTRA_BUILTIN_MODULES
|
||||
#define EXTRA_BUILTIN_MODULES \
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_audioio), (mp_obj_t)&audioio_module }, \
|
||||
AUDIOBUSIO_MODULE \
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_bitbangio), (mp_obj_t)&bitbangio_module }, \
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_gamepad),(mp_obj_t)&gamepad_module }
|
||||
#endif
|
||||
#define EXPRESS_BOARD
|
||||
|
||||
#else
|
||||
#define MICROPY_PY_BUILTINS_REVERSED (0)
|
||||
#define MICROPY_PY_MICROPYTHON_MEM_INFO (0)
|
||||
#define MICROPY_PY_FRAMEBUF (0)
|
||||
#ifndef EXTRA_BUILTIN_MODULES
|
||||
#define EXTRA_BUILTIN_MODULES
|
||||
#endif
|
||||
|
||||
#define MICROPY_PY_BUILTINS_COMPLEX (0)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user