Showing with 2,899 additions and 410 deletions.
  1. +4 −0 .github/workflows/build.yml
  2. +1 −0 conf.py
  3. +2 −4 docs/shared_bindings_matrix.py
  4. +9 −13 locale/circuitpython.pot
  5. +0 −7 ports/atmel-samd/boards/capablerobot_usbhub/board.c
  6. +2 −2 ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk
  7. +3 −2 ports/atmel-samd/boards/capablerobot_usbhub/pins.c
  8. +1 −1 ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h
  9. +1 −1 ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h
  10. +1 −1 ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h
  11. +23 −0 ports/atmel-samd/boards/feather_m4_express/pins.c
  12. +107 −0 ports/atmel-samd/boards/openbook_m4/board.c
  13. +28 −0 ports/atmel-samd/boards/openbook_m4/mpconfigboard.h
  14. +14 −0 ports/atmel-samd/boards/openbook_m4/mpconfigboard.mk
  15. +71 −0 ports/atmel-samd/boards/openbook_m4/pins.c
  16. +39 −0 ports/atmel-samd/boards/seeeduino_xiao/board.c
  17. +20 −0 ports/atmel-samd/boards/seeeduino_xiao/mpconfigboard.h
  18. +13 −0 ports/atmel-samd/boards/seeeduino_xiao/mpconfigboard.mk
  19. +54 −0 ports/atmel-samd/boards/seeeduino_xiao/pins.c
  20. +3 −0 ports/atmel-samd/common-hal/busio/I2C.c
  21. +2 −2 ports/atmel-samd/common-hal/nvm/ByteArray.c
  22. +8 −4 ports/cxd56/Makefile
  23. +3 −0 ports/cxd56/mkspk/.gitignore
  24. +51 −0 ports/cxd56/mkspk/Makefile
  25. +517 −0 ports/cxd56/mkspk/clefia.c
  26. +65 −0 ports/cxd56/mkspk/clefia.h
  27. +383 −0 ports/cxd56/mkspk/mkspk.c
  28. +83 −0 ports/cxd56/mkspk/mkspk.h
  29. +2 −0 ports/mimxrt10xx/common-hal/busio/I2C.c
  30. +2 −2 ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/pins.c
  31. +1 −2 ports/nrf/Makefile
  32. +2 −0 ports/nrf/background.c
  33. +40 −0 ports/nrf/boards/aramcon_badge_2019/board.c
  34. +31 −0 ports/nrf/boards/aramcon_badge_2019/mpconfigboard.h
  35. +14 −0 ports/nrf/boards/aramcon_badge_2019/mpconfigboard.mk
  36. +34 −0 ports/nrf/boards/aramcon_badge_2019/pins.c
  37. +99 −0 ports/nrf/boards/ohs2020_badge/board.c
  38. +57 −0 ports/nrf/boards/ohs2020_badge/mpconfigboard.h
  39. +10 −0 ports/nrf/boards/ohs2020_badge/mpconfigboard.mk
  40. +18 −0 ports/nrf/boards/ohs2020_badge/pins.c
  41. +6 −0 ports/nrf/common-hal/_bleio/Adapter.c
  42. +1 −0 ports/nrf/common-hal/_bleio/Characteristic.c
  43. +63 −21 ports/nrf/common-hal/_bleio/Connection.c
  44. +10 −2 ports/nrf/common-hal/_bleio/Connection.h
  45. +1 −0 ports/nrf/common-hal/_bleio/__init__.c
  46. +3 −3 ports/nrf/common-hal/_bleio/__init__.h
  47. +309 −0 ports/nrf/common-hal/_bleio/bonding.c
  48. +85 −0 ports/nrf/common-hal/_bleio/bonding.h
  49. +2 −0 ports/nrf/common-hal/busio/I2C.c
  50. +6 −8 ports/nrf/common-hal/nvm/ByteArray.c
  51. +18 −2 ports/nrf/common-hal/os/__init__.c
  52. +1 −2 ports/nrf/mpconfigport.h
  53. +44 −5 ports/nrf/peripherals/nrf/nvm.c
  54. +5 −0 ports/nrf/peripherals/nrf/nvm.h
  55. +102 −100 ports/stm32f4/common-hal/busio/I2C.c
  56. +194 −102 ports/stm32f4/common-hal/busio/SPI.c
  57. +41 −20 ports/stm32f4/common-hal/busio/UART.c
  58. +122 −70 ports/stm32f4/common-hal/pulseio/PWMOut.c
  59. +1 −3 ports/stm32f4/mpconfigport.mk
  60. +4 −1 py/circuitpy_mpconfig.h
  61. +7 −0 py/circuitpy_mpconfig.mk
  62. +4 −0 py/gc.c
  63. +2 −0 py/gc.h
  64. +1 −10 py/objnamedtuple.c
  65. +0 −1 py/objnamedtuple.h
  66. +6 −1 py/objtuple.c
  67. +2 −2 py/py.mk
  68. +3 −0 py/vstr.c
  69. +19 −6 shared-bindings/_bleio/Adapter.c
  70. +8 −6 shared-bindings/_bleio/Adapter.h
  71. +0 −1 shared-bindings/_bleio/Characteristic.c
  72. +4 −3 shared-bindings/os/__init__.c
  73. +7 −0 tests/basics/subscr_tuple.py
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:
fail-fast: false
matrix:
board:
- "aramcon_badge_2019"
- "arduino_mkr1300"
- "arduino_mkrzero"
- "arduino_nano_33_ble"
Expand Down Expand Up @@ -125,6 +126,8 @@ jobs:
- "metro_nrf52840_express"
- "mini_sam_m4"
- "monster_m4sk"
- "ohs2020_badge"
- "openbook_m4"
- "particle_argon"
- "particle_boron"
- "particle_xenon"
Expand All @@ -144,6 +147,7 @@ jobs:
- "pyruler"
- "robohatmm1_m4"
- "sam32"
- "seeeduino_xiao"
- "serpente"
- "shirtty"
- "snekboard"
Expand Down
1 change: 1 addition & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
"ports/cc3200",
"ports/cc3200/FreeRTOS",
"ports/cc3200/hal",
"ports/cxd56/mkspk",
"ports/cxd56/spresense-exported-sdk",
"ports/esp32",
"ports/esp8266/boards",
Expand Down
6 changes: 2 additions & 4 deletions docs/shared_bindings_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def get_excluded_boards(base):
board_is_excluded = True

# check if module is specifically disabled for this board
re_pattern = "CIRCUITPY_{}\s=\s(\w)".format(module.upper())
re_pattern = r"CIRCUITPY_{}\s=\s(\w)".format(module.upper())
find_module = re.search(re_pattern, contents)
if not find_module:
if base[module]["default_value"].isdigit():
Expand All @@ -204,9 +204,7 @@ def get_excluded_boards(base):
]):
check_dependent_modules[module] = base[module]["default_value"]
else:
if (find_module.group(1) == "0" and
find_module.group(1) != base[module]["default_value"]):
board_is_excluded = True
board_is_excluded = find_module.group(1) == "0"

if board_is_excluded:
if board_chip in base[module]["excluded"]:
Expand Down
22 changes: 9 additions & 13 deletions locale/circuitpython.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-01-07 14:31-0800\n"
"POT-Creation-Date: 2020-01-13 18:15-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -513,21 +513,21 @@ msgstr ""
msgid "Could not initialize UART"
msgstr ""

#: shared-module/audiomp3/MP3File.c
#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate decoder"
msgstr ""

#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
#: shared-module/audiomp3/MP3File.c
#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate first buffer"
msgstr ""

#: shared-module/audiomp3/MP3File.c
#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate input buffer"
msgstr ""

#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
#: shared-module/audiomp3/MP3File.c
#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate second buffer"
msgstr ""

Expand Down Expand Up @@ -620,7 +620,7 @@ msgstr ""
msgid "Failed sending command."
msgstr ""

#: ports/nrf/sd_mutex.c
#: ports/nrf/sd.c ports/nrf/sd_mutex.c
#, c-format
msgid "Failed to acquire mutex, err 0x%04x"
msgstr ""
Expand All @@ -643,11 +643,11 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""

#: shared-module/audiomp3/MP3File.c
#: shared-module/audiomp3/MP3Decoder.c
msgid "Failed to parse MP3 file"
msgstr ""

#: ports/nrf/sd_mutex.c
#: ports/nrf/sd.c ports/nrf/sd_mutex.c
#, c-format
msgid "Failed to release mutex, err 0x%04x"
msgstr ""
Expand All @@ -660,10 +660,6 @@ msgstr ""
msgid "File exists"
msgstr ""

#: ports/nrf/common-hal/nvm/ByteArray.c
msgid "Flash write failed"
msgstr ""

#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
Expand Down Expand Up @@ -1776,7 +1772,7 @@ msgstr ""
msgid "extra positional arguments given"
msgstr ""

#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr ""
Expand Down
7 changes: 0 additions & 7 deletions ports/atmel-samd/boards/capablerobot_usbhub/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@
#include "common-hal/microcontroller/Pin.h"

void board_init(void) {
// Don't reset:
// - USB Host Enable Pin
// - reset pin of the USB Hub
//
// If either are reset, USB devices will disconnect when the MCU restarts
never_reset_pin_number(PIN_PA07);
never_reset_pin_number(PIN_PB08);
}

bool board_requests_safe_mode(void) {
Expand Down
4 changes: 2 additions & 2 deletions ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ CHIP_VARIANT = SAMD51G19A
CHIP_FAMILY = samd51

QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = GD25Q16C
EXTERNAL_FLASH_DEVICE_COUNT = 2
EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JV_IQ"
LONGINT_IMPL = MPZ

# No I2S on SAMD51G
Expand Down
5 changes: 3 additions & 2 deletions ports/atmel-samd/boards/capablerobot_usbhub/pins.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA16) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA17) },

{ MP_OBJ_NEW_QSTR(MP_QSTR_USBHEN), MP_ROM_PTR(&pin_PA07) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_USBRST), MP_ROM_PTR(&pin_PB08) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_USBHOSTEN), MP_ROM_PTR(&pin_PA07) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_USBRESET), MP_ROM_PTR(&pin_PB08) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_USBBCEN), MP_ROM_PTR(&pin_PB22) },

{ MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define BOARD_USER_SAFE_MODE_ACTION "pressing both buttons at start up"

// Increase stack size slightly due to CPX library import nesting
#define CIRCUITPY_DEFAULT_STACK_SIZE (4504)
#define CIRCUITPY_DEFAULT_STACK_SIZE (4760) //divisible by 8

#define DEFAULT_I2C_BUS_SCL (&pin_PB03)
#define DEFAULT_I2C_BUS_SDA (&pin_PB02)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define BOARD_USER_SAFE_MODE_ACTION "pressing both buttons at start up"

// Increase stack size slightly due to CPX library import nesting
#define CIRCUITPY_DEFAULT_STACK_SIZE (4504)
#define CIRCUITPY_DEFAULT_STACK_SIZE (4760) // divisible by 8

#define DEFAULT_I2C_BUS_SCL (&pin_PB03)
#define DEFAULT_I2C_BUS_SDA (&pin_PB02)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define BOARD_USER_SAFE_MODE_ACTION "pressing both buttons at start up"

// Increase stack size slightly due to CPX library import nesting.
#define CIRCUITPY_DEFAULT_STACK_SIZE (4504) // divisible by 8
#define CIRCUITPY_DEFAULT_STACK_SIZE (4760) // divisible by 8

#define DEFAULT_I2C_BUS_SCL (&pin_PB03)
#define DEFAULT_I2C_BUS_SDA (&pin_PB02)
Expand Down
23 changes: 23 additions & 0 deletions ports/atmel-samd/boards/feather_m4_express/pins.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,38 @@

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) },

{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) },
{ MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_PA05) },

{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB08) },
{ MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_PB08) },

{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PB09) },
{ MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_PB09) },

{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA04) },
{ MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_PA04) },

{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_PA06) },

{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_PA17) },

{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB23) },
{ MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_PB23) },

{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB22) },
{ MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_PB22) },

{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB17) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB17) },

{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PB16) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB16) },

{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA13) },
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA14) },
Expand All @@ -24,9 +44,12 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA21) },
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA22) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA23) },

{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PB03) },

{ MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_PB01) },
{ MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_PB01) },

{ 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) },
Expand Down
107 changes: 107 additions & 0 deletions ports/atmel-samd/boards/openbook_m4/board.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Joey Castillo
*
* 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 "boards/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"
#include "shared-bindings/busio/SPI.h"
#include "shared-bindings/displayio/FourWire.h"
#include "shared-bindings/time/__init__.h"
#include "shared-module/displayio/__init__.h"
#include "shared-module/displayio/mipi_constants.h"
#include "tick.h"

displayio_fourwire_obj_t board_display_obj;

#define DELAY 0x80
#define HEIGHT 400
#define WIDTH 300

uint8_t start_sequence[] = {
0x01, 0x04, 0x03, 0x00, 0x2b, 0x2b, // power setting
0x06, 0x03, 0x17, 0x17, 0x17, // booster soft start
0x04, 0x80, 0xc8, // power on and wait 200 ms
0x00, 0x01, 0x0f, // panel setting
0x61, 0x04, (HEIGHT >> 8) & 0xFF, HEIGHT & 0xFF, (WIDTH >> 8) & 0xFF, WIDTH & 0xFF // Resolution
};

uint8_t stop_sequence[] = {
0x50, 0x01, 0xf7, // CDI setting
0x02, 0x80, 0xf0 // Power off
};

void board_init(void) {
busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus;
common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL);
common_hal_busio_spi_never_reset(spi);

displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus;
bus->base.type = &displayio_fourwire_type;
common_hal_displayio_fourwire_construct(bus,
spi,
&pin_PB05, // EPD_DC Command or data
&pin_PB07, // EPD_CS Chip select
&pin_PA00, // EPD_RST Reset
1000000);

displayio_epaperdisplay_obj_t* display = &displays[0].epaper_display;
display->base.type = &displayio_epaperdisplay_type;
common_hal_displayio_epaperdisplay_construct(display,
bus,
start_sequence,
sizeof(start_sequence),
stop_sequence,
sizeof(stop_sequence),
400, // width
300, // height
400, // RAM width
300, // RAM height
0, // colstart
0, // rowstart
0, // rotation
NO_COMMAND, // set_column_window_command
NO_COMMAND, // set_row_window_command
NO_COMMAND, // set_current_column_command
NO_COMMAND, // set_current_row_command
0x13, // write_black_ram_command
false, // black_bits_inverted
NO_COMMAND, // write_color_ram_command (can add this for grayscale eventually)
false, // color_bits_inverted
0x000000, // highlight_color
0x12, // refresh_display_command
40, // refresh_time
&pin_PA01, // busy_pin
false, // busy_state
5, // seconds_per_frame
false); // chip_select (don't always toggle chip select)
}

bool board_requests_safe_mode(void) {
return false;
}

void reset_board(void) {
}
28 changes: 28 additions & 0 deletions ports/atmel-samd/boards/openbook_m4/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#define MICROPY_HW_BOARD_NAME "The Open Book Feather"
#define MICROPY_HW_MCU_NAME "samd51j19"

#define CIRCUITPY_MCU_FAMILY samd51

#define MICROPY_HW_LED_STATUS (&pin_PA23)

// These are pins not to reset.
// QSPI Data pins
#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11)
// DotStar pins, QSPI CS, and QSPI SCK
#define MICROPY_PORT_B (PORT_PB10 | PORT_PB11)
#define MICROPY_PORT_C (0)
#define MICROPY_PORT_D (0)

#define DEFAULT_I2C_BUS_SCL (&pin_PA13)
#define DEFAULT_I2C_BUS_SDA (&pin_PA12)

#define DEFAULT_SPI_BUS_SCK (&pin_PA17)
#define DEFAULT_SPI_BUS_MOSI (&pin_PB23)
#define DEFAULT_SPI_BUS_MISO (&pin_PB22)

#define DEFAULT_UART_BUS_RX (&pin_PB17)
#define DEFAULT_UART_BUS_TX (&pin_PB16)

// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1
14 changes: 14 additions & 0 deletions ports/atmel-samd/boards/openbook_m4/mpconfigboard.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
USB_VID = 0x239A
USB_PID = 0x807E
USB_PRODUCT = "The Open Book Feather"
USB_MANUFACTURER = "Oddly Specific Objects"

CHIP_VARIANT = SAMD51J19A
CHIP_FAMILY = samd51

QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = GD25Q16C
LONGINT_IMPL = MPZ

CIRCUITPY_GAMEPADSHIFT = 1
Loading