From 386ab580cd8a56d90da81580e6f62940cc30a457 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 23 Aug 2016 17:36:29 -0700 Subject: Change the board information used in the header to be board specific. --- atmel-samd/boards/arduino_zero/mpconfigboard.h | 3 +++ atmel-samd/boards/feather_m0_ble/mpconfigboard.h | 3 +++ atmel-samd/mpconfigport.h | 12 +++++++++--- 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 +#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 -#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 -- cgit v1.2.3