diff --git a/klippy/pins.py b/klippy/pins.py index 8263f455..4f22d48a 100644 --- a/klippy/pins.py +++ b/klippy/pins.py @@ -38,8 +38,6 @@ def beaglebone_pins(): return gpios MCU_PINS = { - "sam3x8e": port_pins(4, 32), "sam3x8c": port_pins(2, 32), - "sam4s8c": port_pins(3, 32), "sam4e8e" : port_pins(5, 32), "samd21g18a": port_pins(2, 32), "samd21e18a": port_pins(2, 32), "samd51g19a": port_pins(2, 32), "samd51j19a": port_pins(3, 32), "samd51n19a": port_pins(3, 32), "samd51p20a": port_pins(4, 32), diff --git a/src/atsam/gpio.c b/src/atsam/gpio.c index 768a3949..2af2bfc0 100644 --- a/src/atsam/gpio.c +++ b/src/atsam/gpio.c @@ -11,15 +11,28 @@ #include "internal.h" // gpio_peripheral #include "sched.h" // sched_shutdown +DECL_ENUMERATION_RANGE("pin", "PA0", GPIO('A', 0), 32); +DECL_ENUMERATION_RANGE("pin", "PB0", GPIO('B', 0), 32); +#ifdef PIOC +DECL_ENUMERATION_RANGE("pin", "PC0", GPIO('C', 0), 32); +#endif +#ifdef PIOD +DECL_ENUMERATION_RANGE("pin", "PD0", GPIO('D', 0), 32); +#endif +#ifdef PIOE +DECL_ENUMERATION_RANGE("pin", "PE0", GPIO('E', 0), 32); +#endif + 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 - PIOA, PIOB, PIOC, PIOD, PIOE + PIOA, PIOB, +#ifdef PIOC + PIOC, +#endif +#ifdef PIOD + PIOD, +#endif +#ifdef PIOE + PIOE, #endif };