Skip to content

Commit 260568e

Browse files
ricksorensendpgeorge
authored andcommitted
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 <[email protected]>
1 parent 0b7f6e1 commit 260568e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ports/samd/mcu/samd21/mpconfigmcu.h

+8
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,20 @@ unsigned long trng_random_u32(int delay);
6363
#define MICROPY_PY_BUILTINS_ROUND_INT (SAMD21_EXTRA_FEATURES)
6464
#define MICROPY_CAN_OVERRIDE_BUILTINS (SAMD21_EXTRA_FEATURES)
6565
#define MICROPY_PY_SYS_STDIO_BUFFER (SAMD21_EXTRA_FEATURES)
66+
#ifndef MICROPY_PY_FRAMEBUF
6667
#define MICROPY_PY_FRAMEBUF (SAMD21_EXTRA_FEATURES)
68+
#endif
69+
#ifndef MICROPY_PY_ASYNCIO
6770
#define MICROPY_PY_ASYNCIO (SAMD21_EXTRA_FEATURES)
71+
#endif
72+
#ifndef MICROPY_PY_SELECT
6873
#define MICROPY_PY_SELECT (SAMD21_EXTRA_FEATURES)
74+
#endif
6975
#define MICROPY_PY_ERRNO (SAMD21_EXTRA_FEATURES)
7076
#define MICROPY_PY_DEFLATE (SAMD21_EXTRA_FEATURES)
77+
#ifndef MICROPY_PY_ONEWIRE
7178
#define MICROPY_PY_ONEWIRE (SAMD21_EXTRA_FEATURES)
79+
#endif
7280

7381
#ifndef MICROPY_PY_MACHINE_PIN_BOARD_CPU
7482
#define MICROPY_PY_MACHINE_PIN_BOARD_CPU (1)

0 commit comments

Comments
 (0)