Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cpu/atmega_common: implements pseudomodule-based pin change interrupts
- Loading branch information
1 parent
8c4cc54
commit 7bca1cc
Showing
5 changed files
with
324 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
@defgroup boards_common_atmega ATmega common | ||
@ingroup boards | ||
@brief Shared files and configuration for ATmega-based boards | ||
|
||
### Pin Change Interrupts | ||
|
||
Pin Change Interrupts (PCINTs) can be enabled using pseudo modules. To provide | ||
a low-memory overhead implementation, the PCINTs are grouped into **banks**. | ||
Each banks corresponds to one PCINT on the ATmega (PCINT0, ..., PCINT3). | ||
|
||
To enable only a specific bank, simply add `USEMODULE += atmega_pcintN` to your | ||
Makefile. To enable all interrupts you can use `USEMODULE += atmega_pcint`. | ||
|
||
In case you want to add a new CPU, simply provide an `atmega_pcint.h` with your | ||
CPU and adapt your Makefile.dep and Makefile.featues files. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# expand atmega_pcint module | ||
ifneq (,$(filter atmega_pcint,$(USEMODULE))) | ||
USEMODULE += atmega_pcint0 | ||
endif | ||
|
||
# feature for atmega_pcint0 module | ||
ifneq (,$(filter atmega_pcint0,$(USEMODULE))) | ||
FEATURES_REQUIRED += atmega_pcint0 | ||
endif | ||
|
||
# feature for atmega_pcint1 module | ||
ifneq (,$(filter atmega_pcint1,$(USEMODULE))) | ||
FEATURES_REQUIRED += atmega_pcint1 | ||
endif | ||
|
||
# feature for atmega_pcint2 module | ||
ifneq (,$(filter atmega_pcint2,$(USEMODULE))) | ||
FEATURES_REQUIRED += atmega_pcint2 | ||
endif | ||
|
||
# feature for atmega_pcint3 module | ||
ifneq (,$(filter atmega_pcint3,$(USEMODULE))) | ||
FEATURES_REQUIRED += atmega_pcint3 | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
FEATURES_PROVIDED += periph_eeprom | ||
FEATURES_PROVIDED += periph_pm | ||
|
||
FEATURES_PROVIDED += atmega_pcint0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.