Skip to content

Commit

Permalink
Merge pull request #14203 from leandrolanzieri/pr/kconfig/atmega128rf…
Browse files Browse the repository at this point in the history
…a1_boards_symbols

boards/atmega128rfa1-based: Model features in Kconfig
  • Loading branch information
PeterKietzmann authored Jun 22, 2020
2 parents 332ae60 + 8f8bcda commit cf27fda
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 0 deletions.
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

0 comments on commit cf27fda

Please sign in to comment.