rename board bdmicro_vina_m0 to bdmicro_vina_d21 and update boardfiles appropriately

This commit is contained in:
Brian Dean 2020-09-16 16:27:24 -04:00
parent c55deb54f0
commit 847d609ddc
5 changed files with 38 additions and 38 deletions

View File

@ -177,7 +177,7 @@ jobs:
- "arduino_nano_33_iot" - "arduino_nano_33_iot"
- "arduino_zero" - "arduino_zero"
- "bast_pro_mini_m0" - "bast_pro_mini_m0"
- "bdmicro_vina_m0" - "bdmicro_vina_d21"
- "bless_dev_board_multi_sensor" - "bless_dev_board_multi_sensor"
- "blm_badge" - "blm_badge"
- "capablerobot_usbhub" - "capablerobot_usbhub"

View File

@ -1,34 +1,31 @@
#define MICROPY_HW_BOARD_NAME "BDMICRO Vina M0" #define MICROPY_HW_BOARD_NAME "BDMICRO VINA-D21"
#define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_HW_MCU_NAME "samd21g18"
#define MICROPY_HW_LED_STATUS (&pin_PA28)
#define MICROPY_HW_LED_TX &pin_PA27
#define MICROPY_HW_LED_RX &pin_PA31
// Clock rates are off: Salae reads 12MHz which is the limit even though we set it to the safer 8MHz.
#define SPI_FLASH_BAUDRATE (8000000)
#define SPI_FLASH_MOSI_PIN &pin_PB22
#define SPI_FLASH_MISO_PIN &pin_PB03
#define SPI_FLASH_SCK_PIN &pin_PB23
#define SPI_FLASH_CS_PIN &pin_PA13
// These are pins not to reset. // These are pins not to reset.
#define MICROPY_PORT_A (0) #define MICROPY_PORT_A (0)
#define MICROPY_PORT_B (0) #define MICROPY_PORT_B (0)
#define MICROPY_PORT_C (0) #define MICROPY_PORT_C (0)
#define BOARD_HAS_CRYSTAL 0 #define SPI_FLASH_CS_PIN &pin_PA13
#define SPI_FLASH_MISO_PIN &pin_PB03
#define SPI_FLASH_MOSI_PIN &pin_PB22
#define SPI_FLASH_SCK_PIN &pin_PB23
#define DEFAULT_I2C_BUS_SCL (&pin_PA23) // Clock rates are off: Salae reads 12MHz which is the limit even though we set it to the safer 8MHz.
#define DEFAULT_I2C_BUS_SDA (&pin_PA22) #define SPI_FLASH_BAUDRATE (8000000)
#define DEFAULT_SPI_BUS_SCK (&pin_PB11) #define BOARD_HAS_CRYSTAL 1
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
#define DEFAULT_SPI_BUS_MISO (&pin_PA12)
#define DEFAULT_UART_BUS_RX (&pin_PA11)
#define DEFAULT_UART_BUS_TX (&pin_PA10) #define DEFAULT_UART_BUS_TX (&pin_PA10)
#define DEFAULT_UART_BUS_RX (&pin_PA11)
#define DEFAULT_SPI_BUS_MISO (&pin_PA12)
#define DEFAULT_I2C_BUS_SDA (&pin_PA22)
#define DEFAULT_I2C_BUS_SCL (&pin_PA23)
#define MICROPY_HW_LED_TX (&pin_PA27)
#define MICROPY_HW_LED_STATUS (&pin_PA28)
#define MICROPY_HW_LED_RX (&pin_PA31)
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
#define DEFAULT_SPI_BUS_SCK (&pin_PB11)
// USB is always used internally so skip the pin objects for it. // USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA24 1

View File

@ -1,19 +1,22 @@
USB_VID = 0x31e2 USB_VID = 0x31e2
USB_PID = 0x2002 USB_PID = 0x2001
USB_PRODUCT = "Vina M0" USB_PRODUCT = "VINA-D21"
USB_MANUFACTURER = "BDMICRO LLC" USB_MANUFACTURER = "BDMICRO LLC"
CHIP_VARIANT = SAMD21G18A CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21 CHIP_FAMILY = samd21
SPI_FLASH_FILESYSTEM = 1 SPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICE_COUNT = 2
EXTERNAL_FLASH_DEVICES = "MX25L51245G" EXTERNAL_FLASH_DEVICES = "MX25L51245G","GD25S512MD"
LONGINT_IMPL = MPZ LONGINT_IMPL = MPZ
CIRCUITPY_BITBANGIO = 0 CIRCUITPY_BITBANGIO = 0
CIRCUITPY_COUNTIO = 0
CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_I2CPERIPHERAL = 0
CIRCUITPY_VECTORIO = 0 CIRCUITPY_VECTORIO = 0
CFLAGS_INLINE_LIMIT = 50 CFLAGS_INLINE_LIMIT = 60
SUPEROPT_GC = 0 SUPEROPT_GC = 0
CFLAGS_BOARD = --param max-inline-insns-auto=15

View File

@ -1,8 +1,6 @@
#include "shared-bindings/board/__init__.h" #include "shared-bindings/board/__init__.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = { STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_RTC_INT), MP_ROM_PTR(&pin_PA00) },
{ MP_ROM_QSTR(MP_QSTR_RTC_CLK), MP_ROM_PTR(&pin_PA01) },
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) },
@ -13,8 +11,11 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA10) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA18) },
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA16) },
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA14) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA14) },
{ MP_ROM_QSTR(MP_QSTR_RTC_TS), MP_ROM_PTR(&pin_PA14) },
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA09) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA15) }, { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA15) },
@ -22,18 +23,17 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA21) }, { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA21) },
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA06) }, { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA18) }, { MP_ROM_QSTR(MP_QSTR_LED_STATUS), MP_ROM_PTR(&pin_PA28) },
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA16) }, { MP_ROM_QSTR(MP_QSTR_LED_TX), MP_ROM_PTR(&pin_PA27) },
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) },
{ MP_ROM_QSTR(MP_QSTR_PGM_LED), MP_ROM_PTR(&pin_PA28) },
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA12) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) },
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) },
{ MP_ROM_QSTR(MP_QSTR_LED_RX), MP_ROM_PTR(&pin_PA31) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
}; };
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);