diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-03-12 12:08:05 -0400 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2019-03-17 19:38:18 -0400 |
commit | 8f541d090ed6c21e2487047df97a46f98a93a941 (patch) | |
tree | 2a2b8766dd55723972903518410392e4518b5eb4 /src | |
parent | db6e2d4c9ef1e2f8f231821f7506252a406ea2f0 (diff) | |
download | kutter-8f541d090ed6c21e2487047df97a46f98a93a941.tar.gz kutter-8f541d090ed6c21e2487047df97a46f98a93a941.tar.xz kutter-8f541d090ed6c21e2487047df97a46f98a93a941.zip |
avr: Use enumerations for pin mappings
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/avr/gpio.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/avr/gpio.c b/src/avr/gpio.c index 6ff21c26..03d6aff5 100644 --- a/src/avr/gpio.c +++ b/src/avr/gpio.c @@ -12,6 +12,24 @@ #include "pgm.h" // PROGMEM #include "sched.h" // sched_shutdown +#ifdef PINA +DECL_ENUMERATION_RANGE("pin", "PA0", GPIO('A', 0), 8); +#endif +DECL_ENUMERATION_RANGE("pin", "PB0", GPIO('B', 0), 8); +DECL_ENUMERATION_RANGE("pin", "PC0", GPIO('C', 0), 8); +DECL_ENUMERATION_RANGE("pin", "PD0", GPIO('D', 0), 8); +#ifdef PINE +DECL_ENUMERATION_RANGE("pin", "PE0", GPIO('E', 0), 8); +DECL_ENUMERATION_RANGE("pin", "PF0", GPIO('F', 0), 8); +#endif +#ifdef PING +DECL_ENUMERATION_RANGE("pin", "PG0", GPIO('G', 0), 8); +DECL_ENUMERATION_RANGE("pin", "PH0", GPIO('H', 0), 8); +DECL_ENUMERATION_RANGE("pin", "PJ0", GPIO('J', 0), 8); +DECL_ENUMERATION_RANGE("pin", "PK0", GPIO('K', 0), 8); +DECL_ENUMERATION_RANGE("pin", "PL0", GPIO('L', 0), 8); +#endif + volatile uint8_t * const digital_regs[] PROGMEM = { #ifdef PINA &PINA, |