atsam: Add support for the SAM3X8C micro-controller

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-01-18 10:07:57 -05:00
parent 7327394c50
commit eb7842c221
4 changed files with 8 additions and 1 deletions

View File

@ -44,7 +44,7 @@ MCU_PINS = {
"at90usb1286": port_pins(6), "at90usb646": port_pins(6), "at90usb1286": port_pins(6), "at90usb646": port_pins(6),
"atmega32u4": port_pins(6), "atmega32u4": port_pins(6),
"atmega1280": port_pins(12), "atmega2560": port_pins(12), "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), "sam4s8c": port_pins(3, 32), "sam4e8e" : port_pins(5, 32),
"samd21g": port_pins(2, 32), "samd21g": port_pins(2, 32),
"stm32f103": port_pins(5, 16), "stm32f103": port_pins(5, 16),

View File

@ -20,6 +20,9 @@ choice
config MACH_SAM3X8E config MACH_SAM3X8E
bool "SAM3x8e (Arduino Due)" bool "SAM3x8e (Arduino Due)"
select MACH_SAM3X select MACH_SAM3X
config MACH_SAM3X8C
bool "SAM3x8c (Printrboard G2)"
select MACH_SAM3X
config MACH_SAM4S8C config MACH_SAM4S8C
bool "SAM4s8c (Duet Maestro)" bool "SAM4s8c (Duet Maestro)"
select MACH_SAM4S select MACH_SAM4S
@ -42,6 +45,7 @@ config MACH_SAM4E
config MCU config MCU
string string
default "sam3x8e" if MACH_SAM3X8E default "sam3x8e" if MACH_SAM3X8E
default "sam3x8c" if MACH_SAM3X8C
default "sam4s8c" if MACH_SAM4S8C default "sam4s8c" if MACH_SAM4S8C
default "sam4e8e" if MACH_SAM4E8E default "sam4e8e" if MACH_SAM4E8E

View File

@ -15,6 +15,7 @@ CFLAGS-$(CONFIG_MACH_SAM3X) += -Ilib/sam3x/include
CFLAGS-$(CONFIG_MACH_SAM4S) += -Ilib/sam4s/include CFLAGS-$(CONFIG_MACH_SAM4S) += -Ilib/sam4s/include
CFLAGS-$(CONFIG_MACH_SAM4E) += -Ilib/sam4e/include CFLAGS-$(CONFIG_MACH_SAM4E) += -Ilib/sam4e/include
CFLAGS-$(CONFIG_MACH_SAM3X8E) += -D__SAM3X8E__ CFLAGS-$(CONFIG_MACH_SAM3X8E) += -D__SAM3X8E__
CFLAGS-$(CONFIG_MACH_SAM3X8C) += -D__SAM3X8C__
CFLAGS-$(CONFIG_MACH_SAM4S8C) += -D__SAM4S8C__ CFLAGS-$(CONFIG_MACH_SAM4S8C) += -D__SAM4S8C__
CFLAGS-$(CONFIG_MACH_SAM4E8E) += -D__SAM4E8E__ CFLAGS-$(CONFIG_MACH_SAM4E8E) += -D__SAM4E8E__
CFLAGS += -mthumb $(CFLAGS-y) -Ilib/cmsis-core CFLAGS += -mthumb $(CFLAGS-y) -Ilib/cmsis-core

View File

@ -14,6 +14,8 @@
static Pio * const digital_regs[] = { static Pio * const digital_regs[] = {
#if CONFIG_MACH_SAM3X8E #if CONFIG_MACH_SAM3X8E
PIOA, PIOB, PIOC, PIOD PIOA, PIOB, PIOC, PIOD
#elif CONFIG_MACH_SAM3X8C
PIOA, PIOB
#elif CONFIG_MACH_SAM4S8C #elif CONFIG_MACH_SAM4S8C
PIOA, PIOB, PIOC PIOA, PIOB, PIOC
#elif CONFIG_MACH_SAM4E8E #elif CONFIG_MACH_SAM4E8E