summaryrefslogtreecommitdiff
path: root/atmel-samd
diff options
context:
space:
mode:
authorScott Shawcroft <scott@chickadee.tech>2016-08-23 17:36:29 -0700
committerScott Shawcroft <scott@chickadee.tech>2016-08-23 17:36:29 -0700
commit386ab580cd8a56d90da81580e6f62940cc30a457 (patch)
tree40e6c533e01a14e1ee1ae47368c3f314e60d9294 /atmel-samd
parentdea22b0b5db46702777e8baa41dc8bf985b34672 (diff)
Change the board information used in the header to be board specific.
Diffstat (limited to 'atmel-samd')
-rw-r--r--atmel-samd/boards/arduino_zero/mpconfigboard.h3
-rw-r--r--atmel-samd/boards/feather_m0_ble/mpconfigboard.h3
-rw-r--r--atmel-samd/mpconfigport.h12
3 files changed, 15 insertions, 3 deletions
diff --git a/atmel-samd/boards/arduino_zero/mpconfigboard.h b/atmel-samd/boards/arduino_zero/mpconfigboard.h
index a70e849c9..d3115ca75 100644
--- a/atmel-samd/boards/arduino_zero/mpconfigboard.h
+++ b/atmel-samd/boards/arduino_zero/mpconfigboard.h
@@ -2,3 +2,6 @@
#define MICROPY_HW_LED1 PIN_PA17 // red
#define UART_REPL
// #define USB_REPL
+
+#define MICROPY_HW_BOARD_NAME "Arduino Zero"
+#define MICROPY_HW_MCU_NAME "samd21g18"
diff --git a/atmel-samd/boards/feather_m0_ble/mpconfigboard.h b/atmel-samd/boards/feather_m0_ble/mpconfigboard.h
index b14b47714..f8ee70368 100644
--- a/atmel-samd/boards/feather_m0_ble/mpconfigboard.h
+++ b/atmel-samd/boards/feather_m0_ble/mpconfigboard.h
@@ -2,3 +2,6 @@
#define MICROPY_HW_LED1 PIN_PA17 // red
// #define UART_REPL
#define USB_REPL
+
+#define MICROPY_HW_BOARD_NAME "Adafruit Feather M0 BLE"
+#define MICROPY_HW_MCU_NAME "samd21g18"
diff --git a/atmel-samd/mpconfigport.h b/atmel-samd/mpconfigport.h
index 1b1b0144e..f989ff256 100644
--- a/atmel-samd/mpconfigport.h
+++ b/atmel-samd/mpconfigport.h
@@ -1,5 +1,8 @@
#include <stdint.h>
+#ifndef __INCLUDED_MPCONFIGPORT_H
+#define __INCLUDED_MPCONFIGPORT_H
+
// options to control how Micro Python is built
#define MICROPY_QSTR_BYTES_IN_HASH (1)
@@ -74,12 +77,13 @@ extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj;
#define MICROPY_PORT_BUILTINS \
{ MP_OBJ_NEW_QSTR(MP_QSTR_open), (mp_obj_t)&mp_builtin_open_obj },
+
+// board specific definitions
+#include "mpconfigboard.h"
+
// We need to provide a declaration/definition of alloca()
#include <alloca.h>
-#define MICROPY_HW_BOARD_NAME "atmel-samd"
-#define MICROPY_HW_MCU_NAME "samd21"
-
#ifdef __linux__
#define MICROPY_MIN_USE_STDOUT (1)
#endif
@@ -94,3 +98,5 @@ extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj;
#define MICROPY_PORT_ROOT_POINTERS \
const char *readline_hist[8]; \
vstr_t *repl_line;
+
+#endif // __INCLUDED_MPCONFIGPORT_H