Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"ports/atmel-samd/asf4_conf",
"ports/atmel-samd/external_flash",
"ports/atmel-samd/freetouch",
"ports/atmel-samd/peripherals",
"ports/atmel-samd/QTouch",
"ports/atmel-samd/tools",
"ports/bare-arm",
Expand Down
27 changes: 18 additions & 9 deletions ports/atmel-samd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -242,19 +242,26 @@ SRC_C = \
audio_dma.c \
board_busses.c \
background.c \
clocks.c \
$(CHIP_FAMILY)_clocks.c \
events.c \
fatfs_port.c \
flash_api.c \
mphalport.c \
reset.c \
$(CHIP_FAMILY)_peripherals.c \
peripherals.c \
$(CHIP_FAMILY)_pins.c \
shared_dma.c \
peripherals/clocks.c \
peripherals/dma.c \
peripherals/events.c \
peripherals/external_interrupts.c \
peripherals/sercom.c \
peripherals/timers.c \
peripherals/$(CHIP_FAMILY)/adc.c \
peripherals/$(CHIP_FAMILY)/cache.c \
peripherals/$(CHIP_FAMILY)/clocks.c \
peripherals/$(CHIP_FAMILY)/dma.c \
peripherals/$(CHIP_FAMILY)/events.c \
peripherals/$(CHIP_FAMILY)/external_interrupts.c \
peripherals/$(CHIP_FAMILY)/pins.c \
peripherals/$(CHIP_FAMILY)/sercom.c \
peripherals/$(CHIP_FAMILY)/timers.c \
tick.c \
timers.c \
usb.c \
usb_mass_storage.c \
bindings/samd/__init__.c \
Expand Down Expand Up @@ -301,6 +308,8 @@ SRC_COMMON_HAL = \
microcontroller/Processor.c \
neopixel_write/__init__.c \
os/__init__.c \
rotaryio/__init__.c \
rotaryio/IncrementalEncoder.c \
rtc/__init__.c \
rtc/RTC.c \
storage/__init__.c \
Expand Down Expand Up @@ -391,7 +400,7 @@ ifneq ($(CHIP_VARIANT),SAMD51G18A)
audiobusio/__init__.c \
audiobusio/I2SOut.c \
audiobusio/PDMIn.c
SRC_C += i2s.c
SRC_C += peripherals/i2s.c peripherals/$(CHIP_FAMILY)/i2s.c
endif
endif

Expand Down
6 changes: 3 additions & 3 deletions ports/atmel-samd/audio_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
*/

#include "audio_dma.h"
#include "clocks.h"
#include "events.h"
#include "shared_dma.h"
#include "peripherals/clocks.h"
#include "peripherals/events.h"
#include "peripherals/dma.h"

#include "shared-bindings/audioio/RawSample.h"
#include "shared-bindings/audioio/WaveFile.h"
Expand Down
3 changes: 1 addition & 2 deletions ports/atmel-samd/bindings/samd/Clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
* THE SOFTWARE.
*/

#include "clocks.h"
#include "bindings/samd/Clock.h"

#include "peripherals/clocks.h"
#include "py/obj.h"
#include "py/objproperty.h"
#include "py/runtime.h"
Expand Down
6 changes: 2 additions & 4 deletions ports/atmel-samd/board_busses.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@

#include "shared-bindings/microcontroller/Pin.h"
#include "mpconfigboard.h"
#include "pins.h"
#include "peripherals/pins.h"
#include "py/runtime.h"



#if !defined(DEFAULT_I2C_BUS_SDA) || !defined(DEFAULT_I2C_BUS_SCL)
STATIC mp_obj_t board_i2c(void) {
mp_raise_NotImplementedError("No default I2C bus");
Expand Down Expand Up @@ -112,4 +110,4 @@ MP_DEFINE_CONST_FUN_OBJ_0(board_spi_obj, board_spi);
return uart_singleton;
}
#endif
MP_DEFINE_CONST_FUN_OBJ_0(board_uart_obj, board_uart);
MP_DEFINE_CONST_FUN_OBJ_0(board_uart_obj, board_uart);
2 changes: 0 additions & 2 deletions ports/atmel-samd/boards/arduino_zero/pins.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#include "shared-bindings/board/__init__.h"

#include "samd21_pins.h"
#include "board_busses.h"


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_A1), MP_ROM_PTR(&pin_PB08) },
Expand Down
1 change: 0 additions & 1 deletion ports/atmel-samd/boards/circuitplayground_express/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "hal/include/hal_gpio.h"
#include "shared-bindings/digitalio/DigitalInOut.h"
#include "shared-bindings/neopixel_write/__init__.h"
#include "samd21_pins.h"

void board_init(void)
{
Expand Down
3 changes: 2 additions & 1 deletion ports/atmel-samd/boards/circuitplayground_express/pins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd21_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "hal/include/hal_gpio.h"
#include "shared-bindings/digitalio/DigitalInOut.h"
#include "shared-bindings/neopixel_write/__init__.h"
#include "samd21_pins.h"

void board_init(void)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd21_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
Expand Down
3 changes: 2 additions & 1 deletion ports/atmel-samd/boards/feather_m0_adalogger/pins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd21_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
Expand Down
3 changes: 2 additions & 1 deletion ports/atmel-samd/boards/feather_m0_basic/pins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd21_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
Expand Down
3 changes: 2 additions & 1 deletion ports/atmel-samd/boards/feather_m0_express/pins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd21_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
Expand Down
3 changes: 2 additions & 1 deletion ports/atmel-samd/boards/feather_m0_rfm69/pins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd21_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
Expand Down
3 changes: 2 additions & 1 deletion ports/atmel-samd/boards/feather_m0_rfm9x/pins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd21_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
Expand Down
3 changes: 2 additions & 1 deletion ports/atmel-samd/boards/feather_m0_supersized/pins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd21_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
Expand Down
3 changes: 2 additions & 1 deletion ports/atmel-samd/boards/feather_m4_express/pins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd51_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
Expand Down
3 changes: 2 additions & 1 deletion ports/atmel-samd/boards/gemma_m0/pins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd21_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
Expand Down
3 changes: 2 additions & 1 deletion ports/atmel-samd/boards/itsybitsy_m0_express/pins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd21_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
Expand Down
3 changes: 2 additions & 1 deletion ports/atmel-samd/boards/itsybitsy_m4_express/pins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd51_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

// This mapping only includes functional names because pins broken
Expand Down
3 changes: 2 additions & 1 deletion ports/atmel-samd/boards/metro_m0_express/pins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd21_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
Expand Down
3 changes: 2 additions & 1 deletion ports/atmel-samd/boards/metro_m4_express/pins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd51_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

// This mapping only includes functional names because pins broken
Expand Down
72 changes: 0 additions & 72 deletions ports/atmel-samd/boards/metro_m4_express_revb/mpconfigboard.h

This file was deleted.

11 changes: 0 additions & 11 deletions ports/atmel-samd/boards/metro_m4_express_revb/mpconfigboard.mk

This file was deleted.

48 changes: 0 additions & 48 deletions ports/atmel-samd/boards/metro_m4_express_revb/pins.c

This file was deleted.

3 changes: 2 additions & 1 deletion ports/atmel-samd/boards/pirkey_m0/pins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd21_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
Expand Down
3 changes: 2 additions & 1 deletion ports/atmel-samd/boards/trinket_m0/pins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd21_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
Expand Down
3 changes: 2 additions & 1 deletion ports/atmel-samd/boards/trinket_m0_haxpress/pins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd21_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
Expand Down
3 changes: 2 additions & 1 deletion ports/atmel-samd/boards/ugame10/pins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "samd21_pins.h"
#include "shared-bindings/board/__init__.h"

#include "board_busses.h"

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
Expand Down
2 changes: 1 addition & 1 deletion ports/atmel-samd/common-hal/analogio/AnalogIn.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "py/binary.h"
#include "py/mphal.h"

#include "peripherals.h"
#include "peripherals/adc.h"
#include "shared-bindings/analogio/AnalogIn.h"

#include "atmel_start_pins.h"
Expand Down
Loading