diff --git a/klippy/pins.py b/klippy/pins.py index 0b6bc5ff..abca279e 100644 --- a/klippy/pins.py +++ b/klippy/pins.py @@ -44,7 +44,7 @@ MCU_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), diff --git a/src/atsam/Kconfig b/src/atsam/Kconfig index 9aec3821..03a86858 100644 --- a/src/atsam/Kconfig +++ b/src/atsam/Kconfig @@ -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 @@ -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 diff --git a/src/atsam/Makefile b/src/atsam/Makefile index 76f7d86f..894b8198 100644 --- a/src/atsam/Makefile +++ b/src/atsam/Makefile @@ -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 diff --git a/src/atsam/gpio.c b/src/atsam/gpio.c index 7de11ab6..5308e546 100644 --- a/src/atsam/gpio.c +++ b/src/atsam/gpio.c @@ -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