diff --git a/.travis.yml b/.travis.yml index 4c8a2f529e..5f85b66e03 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ script: - make -C atmel-samd BOARD=feather_m0_basic - make -C atmel-samd BOARD=feather_m0_express - make -C atmel-samd BOARD=metro_m0_flash - - make -C atmel-samd BOARD=cplay_m0_flash + - make -C atmel-samd BOARD=circuitplayground_express - make -C atmel-samd BOARD=trinket_m0 - make -C atmel-samd BOARD=gemma_m0 - make -C minimal CROSS=1 build/firmware.bin diff --git a/atmel-samd/boards/cplay_m0_flash/conf_access.h b/atmel-samd/boards/circuitplayground_express/conf_access.h similarity index 100% rename from atmel-samd/boards/cplay_m0_flash/conf_access.h rename to atmel-samd/boards/circuitplayground_express/conf_access.h diff --git a/atmel-samd/boards/cplay_m0_flash/conf_board.h b/atmel-samd/boards/circuitplayground_express/conf_board.h similarity index 100% rename from atmel-samd/boards/cplay_m0_flash/conf_board.h rename to atmel-samd/boards/circuitplayground_express/conf_board.h diff --git a/atmel-samd/boards/cplay_m0_flash/conf_clocks.h b/atmel-samd/boards/circuitplayground_express/conf_clocks.h similarity index 100% rename from atmel-samd/boards/cplay_m0_flash/conf_clocks.h rename to atmel-samd/boards/circuitplayground_express/conf_clocks.h diff --git a/atmel-samd/boards/cplay_m0_flash/conf_usb.h b/atmel-samd/boards/circuitplayground_express/conf_usb.h similarity index 98% rename from atmel-samd/boards/cplay_m0_flash/conf_usb.h rename to atmel-samd/boards/circuitplayground_express/conf_usb.h index f4ba8eccbf..5f95708626 100644 --- a/atmel-samd/boards/cplay_m0_flash/conf_usb.h +++ b/atmel-samd/boards/circuitplayground_express/conf_usb.h @@ -19,7 +19,7 @@ #endif #ifndef USB_DEVICE_PRODUCT_NAME -# define USB_DEVICE_PRODUCT_NAME "Circuit Playground M0 (Experimental)" +# define USB_DEVICE_PRODUCT_NAME "CircuitPlayground Express" #endif // #define USB_DEVICE_SERIAL_NAME "12...EF" #define USB_DEVICE_GET_SERIAL_NAME_POINTER serial_number diff --git a/atmel-samd/boards/cplay_m0_flash/init.c b/atmel-samd/boards/circuitplayground_express/init.c similarity index 100% rename from atmel-samd/boards/cplay_m0_flash/init.c rename to atmel-samd/boards/circuitplayground_express/init.c diff --git a/atmel-samd/boards/cplay_m0_flash/mpconfigboard.h b/atmel-samd/boards/circuitplayground_express/mpconfigboard.h similarity index 94% rename from atmel-samd/boards/cplay_m0_flash/mpconfigboard.h rename to atmel-samd/boards/circuitplayground_express/mpconfigboard.h index c8ece7ad37..375c28dddb 100644 --- a/atmel-samd/boards/cplay_m0_flash/mpconfigboard.h +++ b/atmel-samd/boards/circuitplayground_express/mpconfigboard.h @@ -1,6 +1,6 @@ #define USB_REPL -#define MICROPY_HW_BOARD_NAME "Adafruit Circuit Playground M0 (Experimental)" +#define MICROPY_HW_BOARD_NAME "Adafruit CircuitPlayground Express" #define MICROPY_HW_MCU_NAME "samd21g18" //#define MICROPY_HW_LED_MSC PIN_PA17 diff --git a/atmel-samd/boards/cplay_m0_flash/mpconfigboard.mk b/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk similarity index 100% rename from atmel-samd/boards/cplay_m0_flash/mpconfigboard.mk rename to atmel-samd/boards/circuitplayground_express/mpconfigboard.mk diff --git a/atmel-samd/boards/circuitplayground_express/pins.c b/atmel-samd/boards/circuitplayground_express/pins.c new file mode 100644 index 0000000000..6c1f40e041 --- /dev/null +++ b/atmel-samd/boards/circuitplayground_express/pins.c @@ -0,0 +1,93 @@ +#include "samd21_pins.h" + +// STATIC const mp_map_elem_t board_global_dict_table[] = { +// // Rev C +// // { MP_OBJ_NEW_QSTR(MP_QSTR_D10), (mp_obj_t)&pin_PA06 }, +// // { MP_OBJ_NEW_QSTR(MP_QSTR_D9), (mp_obj_t)&pin_PA07 }, +// // { MP_OBJ_NEW_QSTR(MP_QSTR_D6), (mp_obj_t)&pin_PA04 }, +// // { MP_OBJ_NEW_QSTR(MP_QSTR_D12), (mp_obj_t)&pin_PA05 }, +// // +// // { MP_OBJ_NEW_QSTR(MP_QSTR_D0), (mp_obj_t)&pin_PB09 }, +// // //{ MP_OBJ_NEW_QSTR(MP_QSTR_RX), (mp_obj_t)&pin_PA11 }, +// // { MP_OBJ_NEW_QSTR(MP_QSTR_D1), (mp_obj_t)&pin_PB08 }, +// // //{ MP_OBJ_NEW_QSTR(MP_QSTR_TX), (mp_obj_t)&pin_PA10 }, +// +// // Rev D +// { MP_OBJ_NEW_QSTR(MP_QSTR_A11), (mp_obj_t)&pin_PA06 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_A10), (mp_obj_t)&pin_PA07 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_A9), (mp_obj_t)&pin_PA04 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_A8), (mp_obj_t)&pin_PA05 }, +// +// { MP_OBJ_NEW_QSTR(MP_QSTR_A6), (mp_obj_t)&pin_PB09 }, +// //{ MP_OBJ_NEW_QSTR(MP_QSTR_RX), (mp_obj_t)&pin_PA11 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_A7), (mp_obj_t)&pin_PB08 }, +// //{ MP_OBJ_NEW_QSTR(MP_QSTR_TX), (mp_obj_t)&pin_PA10 }, +// +// { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), (mp_obj_t)&pin_PB23 }, +// +// { MP_OBJ_NEW_QSTR(MP_QSTR_MICROPHONE), (mp_obj_t)&pin_PA08 }, +// +// { MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_INTERRUPT), (mp_obj_t)&pin_PA09 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_SDA), (mp_obj_t)&pin_PA00 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_SCL), (mp_obj_t)&pin_PA01 }, +// +// { MP_OBJ_NEW_QSTR(MP_QSTR_LEFT_BUTTON), (mp_obj_t)&pin_PA28 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_RIGHT_BUTTON), (mp_obj_t)&pin_PA14 }, +// +// { MP_OBJ_NEW_QSTR(MP_QSTR_SLIDE_SWITCH), (mp_obj_t)&pin_PA15 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER), (mp_obj_t)&pin_PA02 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_LIGHT), (mp_obj_t)&pin_PA11 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_TEMPERATURE), (mp_obj_t)&pin_PA10 }, +// +// { MP_OBJ_NEW_QSTR(MP_QSTR_D13), (mp_obj_t)&pin_PA17 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), (mp_obj_t)&pin_PB02 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_A5), (mp_obj_t)&pin_PB02 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), (mp_obj_t)&pin_PB03 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_A4), (mp_obj_t)&pin_PB03 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), (mp_obj_t)&pin_PB11 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), (mp_obj_t)&pin_PB10 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), (mp_obj_t)&pin_PA12 }, +// { MP_OBJ_NEW_QSTR(MP_QSTR_FLASH_CS), (mp_obj_t)&pin_PB22 }, +// }; + +// Rev F +STATIC const mp_map_elem_t board_global_dict_table[] = { + { MP_OBJ_NEW_QSTR(MP_QSTR_A11), (mp_obj_t)&pin_PA06 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A10), (mp_obj_t)&pin_PA07 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A9), (mp_obj_t)&pin_PA04 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A8), (mp_obj_t)&pin_PA05 }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_A6), (mp_obj_t)&pin_PB09 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A7), (mp_obj_t)&pin_PB08 }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_REMOTEIN), (mp_obj_t)&pin_PA12 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_REMOTEOUT), (mp_obj_t)&pin_PA23 }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), (mp_obj_t)&pin_PB23 }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_MICROPHONE_SCK), (mp_obj_t)&pin_PA10 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MICROPHONE_DO), (mp_obj_t)&pin_PA08 }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_INTERRUPT), (mp_obj_t)&pin_PA13 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_SDA), (mp_obj_t)&pin_PA00 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_SCL), (mp_obj_t)&pin_PA01 }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_LEFT_BUTTON), (mp_obj_t)&pin_PA28 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_RIGHT_BUTTON), (mp_obj_t)&pin_PA14 }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_SLIDE_SWITCH), (mp_obj_t)&pin_PA15 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER), (mp_obj_t)&pin_PA02 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LIGHT), (mp_obj_t)&pin_PA11 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TEMPERATURE), (mp_obj_t)&pin_PA09 }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D13), (mp_obj_t)&pin_PA17 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), (mp_obj_t)&pin_PB02 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A5), (mp_obj_t)&pin_PB02 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), (mp_obj_t)&pin_PB03 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A4), (mp_obj_t)&pin_PB03 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), (mp_obj_t)&pin_PA21 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), (mp_obj_t)&pin_PA20 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), (mp_obj_t)&pin_PA16 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_FLASH_CS), (mp_obj_t)&pin_PB22 }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/atmel-samd/boards/cplay_m0_flash/touch.h b/atmel-samd/boards/circuitplayground_express/touch.h similarity index 100% rename from atmel-samd/boards/cplay_m0_flash/touch.h rename to atmel-samd/boards/circuitplayground_express/touch.h diff --git a/atmel-samd/boards/cplay_m0_flash/pins.c b/atmel-samd/boards/cplay_m0_flash/pins.c deleted file mode 100644 index 99c6d004b7..0000000000 --- a/atmel-samd/boards/cplay_m0_flash/pins.c +++ /dev/null @@ -1,52 +0,0 @@ -#include "samd21_pins.h" - -STATIC const mp_map_elem_t board_global_dict_table[] = { - // Rev C - // { MP_OBJ_NEW_QSTR(MP_QSTR_D10), (mp_obj_t)&pin_PA06 }, - // { MP_OBJ_NEW_QSTR(MP_QSTR_D9), (mp_obj_t)&pin_PA07 }, - // { MP_OBJ_NEW_QSTR(MP_QSTR_D6), (mp_obj_t)&pin_PA04 }, - // { MP_OBJ_NEW_QSTR(MP_QSTR_D12), (mp_obj_t)&pin_PA05 }, - // - // { MP_OBJ_NEW_QSTR(MP_QSTR_D0), (mp_obj_t)&pin_PB09 }, - // //{ MP_OBJ_NEW_QSTR(MP_QSTR_RX), (mp_obj_t)&pin_PA11 }, - // { MP_OBJ_NEW_QSTR(MP_QSTR_D1), (mp_obj_t)&pin_PB08 }, - // //{ MP_OBJ_NEW_QSTR(MP_QSTR_TX), (mp_obj_t)&pin_PA10 }, - - // Rev D - { MP_OBJ_NEW_QSTR(MP_QSTR_A11), (mp_obj_t)&pin_PA06 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A10), (mp_obj_t)&pin_PA07 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A9), (mp_obj_t)&pin_PA04 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A8), (mp_obj_t)&pin_PA05 }, - - { MP_OBJ_NEW_QSTR(MP_QSTR_A6), (mp_obj_t)&pin_PB09 }, - //{ MP_OBJ_NEW_QSTR(MP_QSTR_RX), (mp_obj_t)&pin_PA11 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A7), (mp_obj_t)&pin_PB08 }, - //{ MP_OBJ_NEW_QSTR(MP_QSTR_TX), (mp_obj_t)&pin_PA10 }, - - { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), (mp_obj_t)&pin_PB23 }, - - { MP_OBJ_NEW_QSTR(MP_QSTR_MICROPHONE), (mp_obj_t)&pin_PA08 }, - - { MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_INTERRUPT), (mp_obj_t)&pin_PA09 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_SDA), (mp_obj_t)&pin_PA00 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_SCL), (mp_obj_t)&pin_PA01 }, - - { MP_OBJ_NEW_QSTR(MP_QSTR_LEFT_BUTTON), (mp_obj_t)&pin_PA28 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_RIGHT_BUTTON), (mp_obj_t)&pin_PA14 }, - - { MP_OBJ_NEW_QSTR(MP_QSTR_SLIDE_SWITCH), (mp_obj_t)&pin_PA15 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER), (mp_obj_t)&pin_PA02 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_LIGHT), (mp_obj_t)&pin_PA11 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_TEMPERATURE), (mp_obj_t)&pin_PA10 }, - - { MP_OBJ_NEW_QSTR(MP_QSTR_D13), (mp_obj_t)&pin_PA17 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), (mp_obj_t)&pin_PB02 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A5), (mp_obj_t)&pin_PB02 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), (mp_obj_t)&pin_PB03 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A4), (mp_obj_t)&pin_PB03 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), (mp_obj_t)&pin_PB11 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), (mp_obj_t)&pin_PB10 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), (mp_obj_t)&pin_PA12 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_FLASH_CS), (mp_obj_t)&pin_PB22 }, -}; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/tools/build_adafruit_bins.sh b/tools/build_adafruit_bins.sh index 83b18547c8..8dcbb274e6 100755 --- a/tools/build_adafruit_bins.sh +++ b/tools/build_adafruit_bins.sh @@ -1,7 +1,7 @@ rm -rf atmel-samd/build* rm -rf esp8266/build* -ATMEL_BOARDS="arduino_zero cplay_m0_flash feather_m0_basic feather_m0_adalogger feather_m0_express metro_m0_flash trinket_m0 gemma_m0" +ATMEL_BOARDS="arduino_zero circuitplayground_express feather_m0_basic feather_m0_adalogger feather_m0_express metro_m0_flash trinket_m0 gemma_m0" for board in $ATMEL_BOARDS; do make -C atmel-samd BOARD=$board