Skip to content

Commit 8348b8b

Browse files
Added board definitions
1 parent 9ba4104 commit 8348b8b

4 files changed

Lines changed: 120 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
#include "supervisor/board.h"
8+
9+
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
#pragma once
3+
4+
#define MICROPY_HW_BOARD_NAME "Microchip Curiosity CircuitPython Nano"
5+
#define MICROPY_HW_MCU_NAME "same51j20"
6+
#define CIRCUITPY_MCU_FAMILY samd51
7+
8+
#define MICROPY_HW_LED_STATUS (&pin_PB22)
9+
#define MICROPY_HW_NEOPIXEL (&pin_PB22)
10+
11+
#define EXTERNAL_FLASH_QSPI_DUAL
12+
13+
#define BOARD_HAS_CRYSTAL 1
14+
15+
// USB is always used internally so skip the pin objects for it.
16+
#define IGNORE_PIN_PA24 1
17+
#define IGNORE_PIN_PA25 1
18+
19+
#define DEFAULT_I2C_BUS_SCL (&pin_PB31)
20+
#define DEFAULT_I2C_BUS_SDA (&pin_PB30)
21+
22+
#define DEFAULT_SPI_BUS_SCK (&pin_PBA17)
23+
#define DEFAULT_SPI_BUS_MOSI (&pin_PA16)
24+
#define DEFAULT_SPI_BUS_MISO (&pin_PA18)
25+
26+
#define DEFAULT_UART_BUS_RX (&pin_PA23)
27+
#define DEFAULT_UART_BUS_TX (&pin_PA22)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
USB_VID = 0x04D8
2+
USB_PID = 0xE52B
3+
USB_PRODUCT = "Microchip Curiosity CircuitPython Nano"
4+
USB_MANUFACTURER = "Microchip Technology Inc"
5+
6+
CHIP_VARIANT = SAME51J20A
7+
CHIP_FAMILY = same51
8+
9+
QSPI_FLASH_FILESYSTEM = 1
10+
EXTERNAL_FLASH_DEVICES = "GD25Q16C,W25Q16JVxQ,SST26VF032B"
11+
LONGINT_IMPL = MPZ
12+
13+
CIRCUITPY__EVE = 1
14+
CIRCUITPY_BITMAPFILTER = 0
15+
CIRCUITPY_CANIO = 1
16+
CIRCUITPY_FLOPPYIO = 0
17+
CIRCUITPY_SYNTHIO = 0
18+
CIRCUITPY_GIFIO = 0
19+
CIRCUITPY_JPEGIO = 0
20+
21+
CIRCUITPY_LTO_PARTITION = one
22+
23+
# We don't have room for the fonts for terminalio for certain languages,
24+
# so turn off terminalio, and if it's off and displayio is on,
25+
# force a clean build.
26+
# Note that we cannot test $(CIRCUITPY_DISPLAYIO) directly with an
27+
# ifeq, because it's not set yet.
28+
ifneq (,$(filter $(TRANSLATION),ja ko ru))
29+
CIRCUITPY_TERMINALIO = 0
30+
RELEASE_NEEDS_CLEAN_BUILD = $(CIRCUITPY_DISPLAYIO)
31+
endif
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
#include "shared-bindings/board/__init__.h"
8+
9+
static const mp_rom_map_elem_t board_module_globals_table[] = {
10+
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
11+
12+
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA15) },
13+
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA20) },
14+
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA21) },
15+
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA27) },
16+
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PB14) },
17+
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PB15) },
18+
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PB16) },
19+
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB17) },
20+
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PB22) },
21+
{ MP_ROM_QSTR(MP_QSTR_NEOPIX), MP_ROM_PTR(&pin_PB22) },
22+
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PB23) },
23+
{ MP_ROM_QSTR(MP_QSTR_VREF), MP_ROM_PTR(&pin_PA03) },
24+
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PB04) },
25+
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB05) },
26+
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB06) },
27+
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PB07) },
28+
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PB08) },
29+
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PB09) },
30+
{ MP_ROM_QSTR(MP_QSTR_DAC), MP_ROM_PTR(&pin_PA02) },
31+
{ MP_ROM_QSTR(MP_QSTR_CAP1), MP_ROM_PTR(&pin_PB09) },
32+
{ MP_ROM_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR(&pin_PB12) },
33+
{ MP_ROM_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR(&pin_PB13) },
34+
{ MP_ROM_QSTR(MP_QSTR_CAN_STDBY), MP_ROM_PTR(&pin_PB17) },
35+
{ MP_ROM_QSTR(MP_QSTR_LCD_CS), MP_ROM_PTR(&pin_PA07) },
36+
{ MP_ROM_QSTR(MP_QSTR_LCD_MOSI), MP_ROM_PTR(&pin_PA04) },
37+
{ MP_ROM_QSTR(MP_QSTR_LCD_SCK), MP_ROM_PTR(&pin_PA05) },
38+
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PB30) },
39+
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PB31) },
40+
{ MP_ROM_QSTR(MP_QSTR_BLE_TX), MP_ROM_PTR(&pin_PA12) },
41+
{ MP_ROM_QSTR(MP_QSTR_BLE_RX), MP_ROM_PTR(&pin_PA13) },
42+
{ MP_ROM_QSTR(MP_QSTR_BLE_CLR), MP_ROM_PTR(&pin_PA14) },
43+
{ MP_ROM_QSTR(MP_QSTR_SD_MOSI), MP_ROM_PTR(&pin_PA16) },
44+
{ MP_ROM_QSTR(MP_QSTR_SD_MISO), MP_ROM_PTR(&pin_PA18) },
45+
{ MP_ROM_QSTR(MP_QSTR_SD_SCK), MP_ROM_PTR(&pin_PA17) },
46+
{ MP_ROM_QSTR(MP_QSTR_SPARE_0), MP_ROM_PTR(&pin_PB00) },
47+
{ MP_ROM_QSTR(MP_QSTR_SPARE_1), MP_ROM_PTR(&pin_PB01) },
48+
{ MP_ROM_QSTR(MP_QSTR_SPARE_2), MP_ROM_PTR(&pin_PB02) },
49+
{ MP_ROM_QSTR(MP_QSTR_SPARE_3), MP_ROM_PTR(&pin_PB03) },
50+
{ MP_ROM_QSTR(MP_QSTR_DEBUG_TX), MP_ROM_PTR(&pin_PA22) },
51+
{ MP_ROM_QSTR(MP_QSTR_DEBUG_RX), MP_ROM_PTR(&pin_PA23) },
52+
};
53+
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);

0 commit comments

Comments
 (0)