Skip to content

Commit

Permalink
atsam: Add support for the SAM3X8C micro-controller
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin O'Connor <[email protected]>
  • Loading branch information
KevinOConnor committed Jan 22, 2019
1 parent 7327394 commit eb7842c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion klippy/pins.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def beaglebone_pins():
"at90usb1286": port_pins(6), "at90usb646": port_pins(6),
"atmega32u4": port_pins(6),
"atmega1280": port_pins(12), "atmega2560": port_pins(12),
"sam3x8e": port_pins(4, 32),
"sam3x8e": port_pins(4, 32), "sam3x8c": port_pins(2, 32),
"sam4s8c": port_pins(3, 32), "sam4e8e" : port_pins(5, 32),
"samd21g": port_pins(2, 32),
"stm32f103": port_pins(5, 16),
Expand Down
4 changes: 4 additions & 0 deletions src/atsam/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ choice
config MACH_SAM3X8E
bool "SAM3x8e (Arduino Due)"
select MACH_SAM3X
config MACH_SAM3X8C
bool "SAM3x8c (Printrboard G2)"
select MACH_SAM3X
config MACH_SAM4S8C
bool "SAM4s8c (Duet Maestro)"
select MACH_SAM4S
Expand All @@ -42,6 +45,7 @@ config MACH_SAM4E
config MCU
string
default "sam3x8e" if MACH_SAM3X8E
default "sam3x8c" if MACH_SAM3X8C
default "sam4s8c" if MACH_SAM4S8C
default "sam4e8e" if MACH_SAM4E8E

Expand Down
1 change: 1 addition & 0 deletions src/atsam/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ CFLAGS-$(CONFIG_MACH_SAM3X) += -Ilib/sam3x/include
CFLAGS-$(CONFIG_MACH_SAM4S) += -Ilib/sam4s/include
CFLAGS-$(CONFIG_MACH_SAM4E) += -Ilib/sam4e/include
CFLAGS-$(CONFIG_MACH_SAM3X8E) += -D__SAM3X8E__
CFLAGS-$(CONFIG_MACH_SAM3X8C) += -D__SAM3X8C__
CFLAGS-$(CONFIG_MACH_SAM4S8C) += -D__SAM4S8C__
CFLAGS-$(CONFIG_MACH_SAM4E8E) += -D__SAM4E8E__
CFLAGS += -mthumb $(CFLAGS-y) -Ilib/cmsis-core
Expand Down
2 changes: 2 additions & 0 deletions src/atsam/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
static Pio * const digital_regs[] = {
#if CONFIG_MACH_SAM3X8E
PIOA, PIOB, PIOC, PIOD
#elif CONFIG_MACH_SAM3X8C
PIOA, PIOB
#elif CONFIG_MACH_SAM4S8C
PIOA, PIOB, PIOC
#elif CONFIG_MACH_SAM4E8E
Expand Down

0 comments on commit eb7842c

Please sign in to comment.