From dcd917727155a74a5875df41b0e092673cee2556 Mon Sep 17 00:00:00 2001 From: Robert Hartung Date: Thu, 1 Aug 2019 09:23:58 +0200 Subject: [PATCH] cpu/atmega32u4: pin change interrupts --- cpu/atmega32u4/Makefile.dep | 2 ++ cpu/atmega32u4/Makefile.features | 3 ++- cpu/atmega32u4/include/atmega_pcint.h | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 cpu/atmega32u4/Makefile.dep create mode 100644 cpu/atmega32u4/include/atmega_pcint.h diff --git a/cpu/atmega32u4/Makefile.dep b/cpu/atmega32u4/Makefile.dep new file mode 100644 index 0000000000..ee10d78b29 --- /dev/null +++ b/cpu/atmega32u4/Makefile.dep @@ -0,0 +1,2 @@ +# common Makefile.dep expand the atmega_pcint pseudo module +include $(RIOTCPU)/atmega_common/Makefile.dep diff --git a/cpu/atmega32u4/Makefile.features b/cpu/atmega32u4/Makefile.features index 008260685b..e7319ab5c6 100644 --- a/cpu/atmega32u4/Makefile.features +++ b/cpu/atmega32u4/Makefile.features @@ -1 +1,2 @@ --include $(RIOTCPU)/atmega_common/Makefile.features +# atmega_common provides atmega_pcint0 +include $(RIOTCPU)/atmega_common/Makefile.features diff --git a/cpu/atmega32u4/include/atmega_pcint.h b/cpu/atmega32u4/include/atmega_pcint.h new file mode 100644 index 0000000000..0595cc4614 --- /dev/null +++ b/cpu/atmega32u4/include/atmega_pcint.h @@ -0,0 +1,14 @@ +#ifndef ATMEGA_PCINT_H +#define ATMEGA_PCINT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define ATMEGA_PCINT_MAP_PCINT0 GPIO_PIN(PORT_B, 0), GPIO_PIN(PORT_B, 1), GPIO_PIN(PORT_B, 2), GPIO_PIN(PORT_B, 3), GPIO_PIN(PORT_B, 4), GPIO_PIN(PORT_B, 5), GPIO_PIN(PORT_B, 6), GPIO_PIN(PORT_B, 7) + +#ifdef __cplusplus +} +#endif + +#endif /* ATMEGA_PCINT_H */