Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards/atmega128rfa1-based: Model features in Kconfig #14203

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions boards/derfmega128/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) 2020 HAW Hamburg
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.

config BOARD
default "derfmega128" if BOARD_DERFMEGA128

config BOARD_DERFMEGA128
bool
default y
select CPU_MODEL_ATMEGA128RFA1
select HAS_PERIPH_ADC
select HAS_PERIPH_I2C
select HAS_PERIPH_RTC
select HAS_PERIPH_RTT
select HAS_PERIPH_SPI
select HAS_PERIPH_TIMER
select HAS_PERIPH_UART
21 changes: 21 additions & 0 deletions boards/microduino-corerf/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (c) 2020 HAW Hamburg
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.


config BOARD
default "microduino-corerf" if BOARD_MICRODUINO_CORERF

config BOARD_MICRODUINO_CORERF
bool
default y
select CPU_MODEL_ATMEGA128RFA1
select HAS_PERIPH_ADC
select HAS_PERIPH_I2C
select HAS_PERIPH_RTC
select HAS_PERIPH_RTT
select HAS_PERIPH_SPI
select HAS_PERIPH_TIMER
select HAS_PERIPH_UART
28 changes: 28 additions & 0 deletions cpu/atmega128rfa1/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (c) 2020 HAW Hamburg
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#

## CPU Models
config CPU_MODEL_ATMEGA128RFA1
bool
select CPU_FAM_ATMEGA128
select HAS_CPU_ATMEGA128RFA1
select HAS_ATMEGA_PCINT1

## Definition of specific features
config HAS_CPU_ATMEGA128RFA1
bool
help
Indicates that a 'atmega128rfa1' cpu is being used.

## Common CPU symbols
config CPU_MODEL
default "atmega128rfa1" if CPU_MODEL_ATMEGA128RFA1

config CPU
default "atmega128rfa1" if CPU_MODEL_ATMEGA128RFA1

source "$(RIOTCPU)/atmega_common/Kconfig"
9 changes: 9 additions & 0 deletions cpu/atmega_common/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,22 @@ config CPU_COMMON_ATMEGA
select HAS_PERIPH_WDT
select HAS_PUF_SRAM

# Define ATMega128 family here as it is used by different CPUs
config CPU_FAM_ATMEGA128
bool
select CPU_COMMON_ATMEGA
select CPU_CORE_AVR

## Common CPU symbols
config CPU_ARCH
default "avr8" if CPU_ARCH_AVR8

config CPU_CORE
default "avr" if CPU_CORE_AVR

config CPU_FAM
default "atmega128" if CPU_FAM_ATMEGA128

## Declaration of specific features
config HAS_ARCH_AVR8
bool
Expand Down
2 changes: 2 additions & 0 deletions tests/kconfig_features/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ BOARD_WHITELIST += arduino-duemilanove \
cc1352p-launchpad \
cc2650-launchpad \
cc2650stk \
derfmega128 \
ikea-tradfri \
microduino-corerf \
samr21-xpro \
slstk3401a \
slstk3402a \
Expand Down