Skip to content

Commit

Permalink
samd/mcu/samd21/mpconfigmcu.h:Allow user to enable additional options.
Browse files Browse the repository at this point in the history
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
 * MICROPY_PY_ASYNCIO

Signed-off-by: Rick Sorensen <rick.sorensen@gmail.com>
  • Loading branch information
ricksorensen committed Jun 10, 2024
1 parent 5903ee5 commit 508fb3e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ports/samd/mcu/samd21/mpconfigmcu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 508fb3e

Please sign in to comment.