atmel-samd: Add Trinket Rev D support.
This commit is contained in:
parent
e904697991
commit
32cad8c0f8
@ -19,7 +19,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef USB_DEVICE_PRODUCT_NAME
|
||||
# define USB_DEVICE_PRODUCT_NAME "Metro M0 with Flash (Experimental)"
|
||||
# define USB_DEVICE_PRODUCT_NAME "Trinket M0"
|
||||
#endif
|
||||
// #define USB_DEVICE_SERIAL_NAME "12...EF"
|
||||
#define USB_DEVICE_GET_SERIAL_NAME_POINTER serial_number
|
||||
|
@ -4,10 +4,10 @@
|
||||
#define MICROPY_HW_MCU_NAME "samd21e18"
|
||||
|
||||
// Rev B - Black
|
||||
#define MICROPY_HW_APA102_MOSI (&pin_PA04)
|
||||
#define MICROPY_HW_APA102_SCK (&pin_PA05)
|
||||
#define MICROPY_HW_APA102_MOSI (&pin_PA00)
|
||||
#define MICROPY_HW_APA102_SCK (&pin_PA01)
|
||||
|
||||
#define MICROPY_PORT_A (PORT_PA04 | PORT_PA05 | PORT_PA24 | PORT_PA25)
|
||||
#define MICROPY_PORT_A (PORT_PA00 | PORT_PA01 | PORT_PA24 | PORT_PA25)
|
||||
#define MICROPY_PORT_B (0)
|
||||
|
||||
#include "internal_flash.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
LD_FILE = boards/samd21x18-bootloader.ld
|
||||
USB_VID = 0x239A
|
||||
USB_PID = 0x8015
|
||||
USB_PID = 0x801F
|
||||
|
||||
FLASH_IMPL = internal_flash.c
|
||||
|
||||
|
@ -1,13 +1,18 @@
|
||||
#include "samd21_pins.h"
|
||||
|
||||
STATIC const mp_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D0), (mp_obj_t)&pin_PA04 },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D0), (mp_obj_t)&pin_PA08 },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_SDA), (mp_obj_t)&pin_PA08 },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D1), (mp_obj_t)&pin_PA02 },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D2), (mp_obj_t)&pin_PA05 },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A0), (mp_obj_t)&pin_PA02 },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D2), (mp_obj_t)&pin_PA09 },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCL), (mp_obj_t)&pin_PA09 },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D4), (mp_obj_t)&pin_PA06 },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_TX), (mp_obj_t)&pin_PA06 },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D3), (mp_obj_t)&pin_PA07 },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_RX), (mp_obj_t)&pin_PA07 },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D13),(mp_obj_t)&pin_PA10 },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_APA102_MOSI), (mp_obj_t)&pin_PA04 },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_APA102_SCK), (mp_obj_t)&pin_PA05 },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_APA102_MOSI), (mp_obj_t)&pin_PA00 },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_APA102_SCK), (mp_obj_t)&pin_PA01 },
|
||||
};
|
||||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
||||
|
Loading…
Reference in New Issue
Block a user