mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/atmega1281: pin change interrupts
This commit is contained in:
parent
7bca1cc5d5
commit
0fc55cdaf9
@ -1 +1,3 @@
|
||||
-include $(RIOTCPU)/atmega_common/Makefile.features
|
||||
FEATURES_PROVIDED += atmega_pcint1 atmega_pcint2
|
||||
|
||||
include $(RIOTCPU)/atmega_common/Makefile.features
|
||||
|
@ -4,5 +4,10 @@ USEMODULE += atmega_common
|
||||
RAM_LEN = 8K
|
||||
ROM_LEN = 128K
|
||||
|
||||
# expand atmega_pcint for additional PCINTs of atmega1281
|
||||
ifneq (,$(filter atmega_pcint,$(USEMODULE)))
|
||||
USEMODULE += atmega_pcint1 atmega_pcint2
|
||||
endif
|
||||
|
||||
# CPU depends on the atmega common module, so include it
|
||||
include $(RIOTCPU)/atmega_common/Makefile.include
|
||||
|
16
cpu/atmega1281/include/atmega_pcint.h
Normal file
16
cpu/atmega1281/include/atmega_pcint.h
Normal file
@ -0,0 +1,16 @@
|
||||
#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_PIN(PORT_J, 0), GPIO_PIN(PORT_J, 1), GPIO_PIN(PORT_J, 2), GPIO_PIN(PORT_J, 3), GPIO_PIN(PORT_J, 4), GPIO_PIN(PORT_J, 5), GPIO_PIN(PORT_J, 6)
|
||||
#define ATMEGA_PCINT_MAP_PCINT2 GPIO_PIN(PORT_K, 0), GPIO_PIN(PORT_K, 1), GPIO_PIN(PORT_K, 2), GPIO_PIN(PORT_K, 3), GPIO_PIN(PORT_K, 4), GPIO_PIN(PORT_K, 5), GPIO_PIN(PORT_K, 6), GPIO_PIN(PORT_K, 7)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ATMEGA_PCINT_H */
|
Loading…
Reference in New Issue
Block a user