samd/mcu/samd21: Allow user to enable additional options.

Currently for samd21 some features are disable because of limited memory.
With the ability to trade firmware and filesystem space, a user may wish to
selectively enable some of these features.  This change allows them to be
enabled in board `mpconfigboard.h` or on the build command line for
example.  The selectively enable functions are: MICROPY_PY_FRAMEBUF,
MICROPY_PY_SELECT, MICROPY_PY_ONEWIRE and MICROPY_PY_ASYNCIO.

Signed-off-by: Rick Sorensen <rick.sorensen@gmail.com>
This commit is contained in:
Rick Sorensen 2024-06-09 21:34:01 -05:00 committed by Damien George
parent 0b7f6e1d3d
commit 260568e081

View file

@ -63,12 +63,20 @@ unsigned long trng_random_u32(int delay);
#define MICROPY_PY_BUILTINS_ROUND_INT (SAMD21_EXTRA_FEATURES)
#define MICROPY_CAN_OVERRIDE_BUILTINS (SAMD21_EXTRA_FEATURES)
#define MICROPY_PY_SYS_STDIO_BUFFER (SAMD21_EXTRA_FEATURES)
#ifndef MICROPY_PY_FRAMEBUF
#define MICROPY_PY_FRAMEBUF (SAMD21_EXTRA_FEATURES)
#endif
#ifndef MICROPY_PY_ASYNCIO
#define MICROPY_PY_ASYNCIO (SAMD21_EXTRA_FEATURES)
#endif
#ifndef MICROPY_PY_SELECT
#define MICROPY_PY_SELECT (SAMD21_EXTRA_FEATURES)
#endif
#define MICROPY_PY_ERRNO (SAMD21_EXTRA_FEATURES)
#define MICROPY_PY_DEFLATE (SAMD21_EXTRA_FEATURES)
#ifndef MICROPY_PY_ONEWIRE
#define MICROPY_PY_ONEWIRE (SAMD21_EXTRA_FEATURES)
#endif
#ifndef MICROPY_PY_MACHINE_PIN_BOARD_CPU
#define MICROPY_PY_MACHINE_PIN_BOARD_CPU (1)