Merge pull request #854 from python-ugame/extra-override

Allow overriding EXTRA_BUILTIN_MODULES in mpconfigboard.h
This commit is contained in:
Scott Shawcroft 2018-05-22 10:22:35 -07:00 committed by GitHub
commit 165b28438a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -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 }

View File

@ -10,3 +10,6 @@ LONGINT_IMPL = MPZ
CHIP_VARIANT = SAMD21E18A
CHIP_FAMILY = samd21
FROZEN_MPY_DIRS += $(TOP)/frozen/ugame10

View File

@ -215,18 +215,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)