1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/atmega256rfr2: pin change interrupts

This commit is contained in:
Robert Hartung 2019-08-01 09:33:49 +02:00
parent 18117b4eb8
commit c8d460eefe
4 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,6 @@
# additional PCINTs for atmega256rfr2
ifneq (,$(filter atmega_pcint,$(USEMODULE)))
USEMODULE += atmega_pcint1
endif
include $(RIOTCPU)/atmega_common/Makefile.dep

View File

@ -1,7 +1,9 @@
include $(RIOTCPU)/atmega_common/Makefile.features
# common feature are defined in atmega_common/Makefile.features
# Only add Additional features
# additional PCINT for atmega256rfr2
FEATURES_PROVIDED += atmega_pcint1
# Various other features (if any)
FEATURES_PROVIDED += periph_cpuid

View File

@ -7,5 +7,10 @@ USEMODULE += periph
RAM_LEN = 32K
ROM_LEN = 256K
# expand atmega_pcint for atmega256rfr2
ifneq (,$(filter atmega_pcint,$(USEMODULE)))
USEMODULE += atmega_pcint1
endif
# CPU depends on the atmega common module, so include it
include $(RIOTCPU)/atmega_common/Makefile.include

View File

@ -0,0 +1,15 @@
#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)
#define ATMEGA_PCINT_MAP_PCINT1 GPIO_PIN(PORT_E, 0), GPIO_UNDEF, GPIO_UNDEF, GPIO_UNDEF, GPIO_UNDEF, GPIO_UNDEF, GPIO_UNDEF, GPIO_UNDEF
#ifdef __cplusplus
}
#endif
#endif /* ATMEGA_PCINT_H */