1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:32:45 +01:00

cpu/avr8_common: Differentiate avr8 cpu cores

Current there is no way to split code between ATmega and ATxmega in
drivers.  This differentiate AVR8 cores into MEGAs and XMEGAs.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit is contained in:
Gerson Fernando Budke 2021-02-05 19:09:29 -03:00
parent facede13fd
commit 70c597620f
5 changed files with 15 additions and 8 deletions

View File

@ -4,11 +4,16 @@
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
config HAS_CPU_CORE_ATMEGA
bool
select CPU_ARCH_AVR8
select HAS_CPP
config CPU_COMMON_ATMEGA
bool
select CPU_CORE_AVR
select HAS_CPU_CORE_ATMEGA
select HAS_ATMEGA_PCINT0
select HAS_CPP
select HAS_DBGPIN
select HAS_PERIPH_CPUID
select HAS_PERIPH_EEPROM

View File

@ -3,6 +3,7 @@ include $(RIOTCPU)/avr8_common/Makefile.features
# common feature are defined in avr8_common/Makefile.features
# Only add Additional features
FEATURES_PROVIDED += cpu_core_atmega
FEATURES_PROVIDED += atmega_pcint0
FEATURES_PROVIDED += dbgpin
FEATURES_PROVIDED += periph_cpuid

View File

@ -6,12 +6,15 @@
# directory for more details.
#
config CPU_COMMON_ATXMEGA
config HAS_CPU_CORE_ATXMEGA
bool
select CPU_ARCH_AVR8
select CPU_CORE_AVR
select HAS_CPU_ATXMEGA
select HAS_CPP
config CPU_COMMON_ATXMEGA
bool
select HAS_CPU_CORE_ATXMEGA
select HAS_PERIPH_CPUID
select HAS_PERIPH_GPIO
select HAS_PERIPH_GPIO_IRQ

View File

@ -3,6 +3,7 @@ include $(RIOTCPU)/avr8_common/Makefile.features
# common feature are defined in avr8_common/Makefile.features
# Only add Additional features
FEATURES_PROVIDED += cpu_core_atxmega
FEATURES_PROVIDED += periph_cpuid
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
FEATURES_PROVIDED += periph_nvm

View File

@ -5,15 +5,12 @@
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
config CPU_ARCH_AVR8
bool
select HAS_ARCH_8BIT
select HAS_ARCH_AVR8
config CPU_CORE_AVR
bool
select CPU_ARCH_AVR8
## Common CPU symbols
config CPU_ARCH
default "avr8" if CPU_ARCH_AVR8