Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal code review request #2

Merged
merged 19 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
26e838b
added board configurations for RAPID-0 CDH, ADCS, and EPS boards. rev…
anniexiang01 May 20, 2024
0ae5be8
corrected board family on rapid0_adcs mpconfigboard.mk file
anniexiang01 May 21, 2024
a73df58
Updated USB VID, PID, and PRODUCT to reflect sublicense given by Micr…
anniexiang01 May 21, 2024
d4df61e
updated adcs board files to be based on the bdmicro vina d51, new bui…
anniexiang01 May 24, 2024
dcc97d7
fixed rapid0-cdh pin error
anniexiang01 May 25, 2024
1fc4d72
haha! adcs works now
Randall-Scharpf Oct 18, 2024
2ba0b56
add annie's new rapid-0 firmware build workflow
Randall-Scharpf Oct 31, 2024
a7b3de4
add SPITarget interface (HAL still unimplemented)
Randall-Scharpf Nov 1, 2024
289f420
implement the spitarget methods
Randall-Scharpf Nov 1, 2024
616ec37
fix the type of self within spitarget
Randall-Scharpf Nov 1, 2024
114d49e
fix import errors and transfer_close return typing
Randall-Scharpf Nov 1, 2024
5657f8a
fix typing and naming mismatches
Randall-Scharpf Nov 1, 2024
1aad399
ok this is the one
Randall-Scharpf Nov 1, 2024
ff2fb90
fix function name mismatch between call and declaration
Randall-Scharpf Nov 1, 2024
dd7056b
return none from bound functions
Randall-Scharpf Nov 1, 2024
1875e70
fix buffer mishandling in spitarget bindings
Randall-Scharpf Nov 5, 2024
0a68f43
remove busio.SPI
Randall-Scharpf Nov 6, 2024
ea344c3
repair constructors referencing old API
Randall-Scharpf Nov 6, 2024
100a045
remove asynchronous interface under busio.SPI
Randall-Scharpf Nov 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/build-rapid-0.yaml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't want this to be merged to main

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will remove in merge commit

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build RAPID-0 Boards

on:
push:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
board: [rapid0_adcs, rapid0_cdh, rapid0_eps]
steps:
- name: Set up repository
uses: actions/checkout@v4
with:
submodules: false
show-progress: false
fetch-depth: 1
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Set up ports
id: set-up-port
uses: ./.github/actions/deps/ports
with:
board: ${{ matrix.board }}
- name: Set up submodules
id: set-up-submodules
uses: ./.github/actions/deps/submodules
with:
action: cache
version: true
- name: Set up external
uses: ./.github/actions/deps/external
with:
action: cache
port: ${{ steps.set-up-port.outputs.port }}
- name: Set up mpy-cross
if: steps.set-up-submodules.outputs.frozen == 'True'
uses: ./.github/actions/mpy_cross
with:
cp-version: ${{ steps.set-up-submodules.outputs.version }}
download: false
- name: Build boards
run: make -j4 -C ports/atmel-samd BOARD=${{ matrix.board }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.board }}
path: ports/atmel-samd/build-${{ matrix.board }}/firmware.*
overwrite: true

18 changes: 18 additions & 0 deletions build-rapid0-mac

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to merge our custom build scripts to main? we don't want to merge it to adafruit, and we aren't even using it anymore

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will remove in merge commit

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
if echo $PATH | grep "gcc-arm-none-eabi" >/dev/null; then
true
else
export PATH=/Volumes/Circuit_Python_Case_Sensitive_Disk/bruinspace-circuitpython/gcc-arm-none-eabi-10-2020-q4-major/bin:$PATH
fi

cd ports/atmel-samd
make --debug -j8 BOARD=rapid0_adcs
make --debug -j8 BOARD=rapid0_cdh
make --debug -j8 BOARD=rapid0_eps
cd ../..

echo "Compilation complete! Press ^C to confirm and exit."

while true; do
afplay /System/Library/Sounds/Ping.aiff
sleep 5s
done
17 changes: 17 additions & 0 deletions build-rapid0-ubuntu

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(same comment as mac script, also should remove the "build-samd51-interpreter" and "build-samd51-interpreter-mac" scripts on main)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will remove in merge commit

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
if echo $PATH | grep "gcc-arm-none-eabi" >/dev/null
then
true
else
export PATH=/mnt/d/Files/Documents/School/UCLA/Organizations/BruinSpace/Rapid-CDH/gcc-arm-none-eabi-10-2020-q4-major/bin:$PATH
fi
cd ports/atmel-samd
make --debug -j8 BOARD=rapid0_adcs
make --debug -j8 BOARD=rapid0_cdh
make --debug -j8 BOARD=rapid0_eps
cd ../..
echo "Compilation complete! Press ^C to confirm and exit."
while true;
do
paplay /usr/share/sounds/freedesktop/stereo/complete.oga
sleep 5s
done
1 change: 1 addition & 0 deletions docs/porting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ as a natural "TODO" list. An example minimal build list is shown below:
CIRCUITPY_FRAMEBUFFERIO = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_I2CTARGET = 0
CIRCUITPY_SPITARGET = 0
# Requires SPI, PulseIO (stub ok):
CIRCUITPY_DISPLAYIO = 0
Expand Down
2 changes: 1 addition & 1 deletion ports/atmel-samd/boards/hallowing_m4_express/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ uint8_t display_init_sequence[] = {
void board_init(void) {
fourwire_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;
busio_spi_obj_t *spi = &bus->inline_bus;
common_hal_busio_spi_construct(spi, &pin_PA01, &pin_PA00, NULL, NULL, false, false);
common_hal_busio_spi_construct(spi, &pin_PA01, &pin_PA00, NULL, false);
common_hal_busio_spi_never_reset(spi);

bus->base.type = &fourwire_fourwire_type;
Expand Down
2 changes: 1 addition & 1 deletion ports/atmel-samd/boards/metro_m4_express/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#define MICROPY_HW_NEOPIXEL (&pin_PB22)

#define BOARD_HAS_CRYSTAL 0
#define BOARD_HAS_CRYSTAL 1

#define DEFAULT_I2C_BUS_SCL (&pin_PB03)
#define DEFAULT_I2C_BUS_SDA (&pin_PB02)
Expand Down
1 change: 0 additions & 1 deletion ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C, W25Q16JVxQ"
LONGINT_IMPL = MPZ

CIRCUITPY__EVE = 1
CIRCUITPY_CANIO = 0
CIRCUITPY_FLOPPYIO = 0
CIRCUITPY_JPEGIO = 0
CIRCUITPY_SYNTHIO = 0
Expand Down
2 changes: 1 addition & 1 deletion ports/atmel-samd/boards/monster_m4sk/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ uint8_t display_init_sequence[] = {
void board_init(void) {
fourwire_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;
busio_spi_obj_t *spi = &bus->inline_bus;
common_hal_busio_spi_construct(spi, &pin_PA13, &pin_PA12, NULL, NULL, false, false);
common_hal_busio_spi_construct(spi, &pin_PA13, &pin_PA12, NULL, false);
common_hal_busio_spi_never_reset(spi);

bus->base.type = &fourwire_fourwire_type;
Expand Down
2 changes: 1 addition & 1 deletion ports/atmel-samd/boards/openbook_m4/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ uint8_t refresh_sequence[] = {
void board_init(void) {
fourwire_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;
busio_spi_obj_t *spi = &bus->inline_bus;
common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL, NULL, false, false);
common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL, false);
common_hal_busio_spi_never_reset(spi);

bus->base.type = &fourwire_fourwire_type;
Expand Down
2 changes: 1 addition & 1 deletion ports/atmel-samd/boards/pewpew_lcd/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ uint8_t display_init_sequence[] = {
void board_init(void) {
fourwire_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;
busio_spi_obj_t *spi = &bus->inline_bus;
common_hal_busio_spi_construct(spi, &pin_PA23, &pin_PA22, NULL, NULL, false, false);
common_hal_busio_spi_construct(spi, &pin_PA23, &pin_PA22, NULL, false);
common_hal_busio_spi_never_reset(spi);

bus->base.type = &fourwire_fourwire_type;
Expand Down
2 changes: 1 addition & 1 deletion ports/atmel-samd/boards/pewpew_m4/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ uint8_t display_init_sequence[] = {
void board_init(void) {
fourwire_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;
busio_spi_obj_t *spi = &bus->inline_bus;
common_hal_busio_spi_construct(spi, &pin_PA13, &pin_PA15, NULL, NULL, false, false);
common_hal_busio_spi_construct(spi, &pin_PA13, &pin_PA15, NULL, false);
common_hal_busio_spi_never_reset(spi);

bus->base.type = &fourwire_fourwire_type;
Expand Down
2 changes: 1 addition & 1 deletion ports/atmel-samd/boards/pybadge/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ uint8_t display_init_sequence[] = {
void board_init(void) {
fourwire_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;
busio_spi_obj_t *spi = &bus->inline_bus;
common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL, NULL, false, false);
common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL, false);
common_hal_busio_spi_never_reset(spi);

bus->base.type = &fourwire_fourwire_type;
Expand Down
2 changes: 1 addition & 1 deletion ports/atmel-samd/boards/pygamer/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ uint8_t display_init_sequence[] = {
void board_init(void) {
fourwire_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;
busio_spi_obj_t *spi = &bus->inline_bus;
common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL, NULL, false, false);
common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL, false);
common_hal_busio_spi_never_reset(spi);

bus->base.type = &fourwire_fourwire_type;
Expand Down
29 changes: 29 additions & 0 deletions ports/atmel-samd/boards/rapid0_adcs/board.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

#include "supervisor/board.h"

// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
45 changes: 45 additions & 0 deletions ports/atmel-samd/boards/rapid0_adcs/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#define MICROPY_HW_BOARD_NAME "RAPID-0 ADCS"
#define MICROPY_HW_MCU_NAME "samd51n20"

#define CIRCUITPY_MCU_FAMILY samd51

// This is for Rev F which is green

// #define MICROPY_HW_LED_TX (&pin_PA27)
// #define MICROPY_HW_LED_RX (&pin_PB06)

// #define MICROPY_HW_LED_STATUS (&pin_PA16)

// #define MICROPY_HW_NEOPIXEL (&pin_PB22)

#define BOARD_HAS_CRYSTAL 0

#define CAMERA_I2C_SCL (&pin_PB03)
#define CAMERA_I2C_SDA (&pin_PB02)

#define CAMERA_SPI_SCK (&pin_PA05)
#define CAMERA_SPI_MISO (&pin_PA04)
#define CAMERA_SPI_MOSI (&pin_PA07)
#define CAMERA_SPI_CS (&pin_PA06)

#define INTERSUBSYSTEM_SPI_SCK (&pin_PB17)
#define INTERSUBSYSTEM_SPI_MISO (&pin_PA21)
#define INTERSUBSYSTEM_SPI_MOSI (&pin_PB16)

#define ADCS_SPI_CS (&pin_PA20)
#define EPS_SPI_CS (&pin_PB00)
#define PAYLOAD_SPI_CS (&pin_PB01)

// #define DEFAULT_I2C_BUS_SCL (&pin_PB03)
// #define DEFAULT_I2C_BUS_SDA (&pin_PB02)

// #define DEFAULT_SPI_BUS_SCK (&pin_PA13)
// #define DEFAULT_SPI_BUS_MOSI (&pin_PA12)
// #define DEFAULT_SPI_BUS_MISO (&pin_PA14)

// #define DEFAULT_UART_BUS_RX (&pin_PA23)
// #define DEFAULT_UART_BUS_TX (&pin_PA22)

// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1
27 changes: 27 additions & 0 deletions ports/atmel-samd/boards/rapid0_adcs/mpconfigboard.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
USB_VID = 0x04D8
USB_PID = 0xE5B3
USB_PRODUCT = "RAPID-0"
USB_MANUFACTURER = "Bruin Spacecraft Group"

CHIP_VARIANT = SAMD51N20A
CHIP_FAMILY = samd51

QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = "GD25Q16C"
LONGINT_IMPL = MPZ

CIRCUITPY__EVE = 1
CIRCUITPY_CANIO = 0
CIRCUITPY_FLOPPYIO = 0
CIRCUITPY_JPEGIO = 0
CIRCUITPY_SYNTHIO = 0

# We don't have room for the fonts for terminalio for certain languages,
# so turn off terminalio, and if it's off and displayio is on,
# force a clean build.
# Note that we cannot test $(CIRCUITPY_DISPLAYIO) directly with an
# ifeq, because it's not set yet.
ifneq (,$(filter $(TRANSLATION),ja ko ru))
CIRCUITPY_TERMINALIO = 0
RELEASE_NEEDS_CLEAN_BUILD = $(CIRCUITPY_DISPLAYIO)
endif
66 changes: 66 additions & 0 deletions ports/atmel-samd/boards/rapid0_adcs/pins.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#include "shared-bindings/board/__init__.h"

// This mapping only includes functional names because pins broken
// out on connectors are labeled with their MCU name available from
// microcontroller.pin.
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS

{ MP_OBJ_NEW_QSTR(MP_QSTR_CAMERA_I2C_SCL), MP_ROM_PTR(&pin_PB03) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_CAMERA_I2C_SDA), MP_ROM_PTR(&pin_PB02) },

{ MP_OBJ_NEW_QSTR(MP_QSTR_CAMERA_SPI_SCK), MP_ROM_PTR(&pin_PA05) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_CAMERA_SPI_MISO), MP_ROM_PTR(&pin_PA04) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_CAMERA_SPI_MOSI), MP_ROM_PTR(&pin_PA07) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_CAMERA_SPI_CS), MP_ROM_PTR(&pin_PA06) },

{ MP_OBJ_NEW_QSTR(MP_QSTR_INTERSUBSYSTEM_SPI_SCK), MP_ROM_PTR(&pin_PB17) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_INTERSUBSYSTEM_SPI_MISO), MP_ROM_PTR(&pin_PA21) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_INTERSUBSYSTEM_SPI_MOSI), MP_ROM_PTR(&pin_PB16) },

{ MP_OBJ_NEW_QSTR(MP_QSTR_ADCS_SPI_CS), MP_ROM_PTR(&pin_PA20) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_EPS_SPI_CS), MP_ROM_PTR(&pin_PB00) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_PAYLOAD_SPI_CS), MP_ROM_PTR(&pin_PB01) },

// { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA06) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA04) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PB08) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PB09) },

// { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA23) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA23) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA22) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA22) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PB17) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PB16) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PB13) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PB14) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PB15) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB12) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA21) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA20) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA18) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA19) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA17) },

// { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA16) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA16) },

// { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PB02) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PB03) },

// { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PB22) },

// { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA13) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA12) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA14) },

// { MP_OBJ_NEW_QSTR(MP_QSTR_LED_RX), MP_ROM_PTR(&pin_PB06) },
// { MP_OBJ_NEW_QSTR(MP_QSTR_LED_TX), MP_ROM_PTR(&pin_PA27) },
// { 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_UART), MP_ROM_PTR(&board_uart_obj) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
29 changes: 29 additions & 0 deletions ports/atmel-samd/boards/rapid0_cdh/board.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

#include "supervisor/board.h"

// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
Loading