summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Sorensen <rick.sorensen@gmail.com>2024-06-09 21:34:01 -0500
committerDamien George <damien@micropython.org>2024-08-26 12:32:37 +1000
commit260568e081a56488f122db41065e0059ca89c306 (patch)
tree28f5b4c33e1d9aa789bc50106ce681e8fd4ea452
parent0b7f6e1d3d57036aaeb082bdc685310a42dd6cb0 (diff)
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>
-rw-r--r--ports/samd/mcu/samd21/mpconfigmcu.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ports/samd/mcu/samd21/mpconfigmcu.h b/ports/samd/mcu/samd21/mpconfigmcu.h
index fdad3fee4..fbb5b28e2 100644
--- a/ports/samd/mcu/samd21/mpconfigmcu.h
+++ b/ports/samd/mcu/samd21/mpconfigmcu.h
@@ -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)