1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/atmega_common: model Kconfig

This commit is contained in:
Leandro Lanzieri 2021-09-30 13:36:20 +02:00
parent b534f26e17
commit b8e2e3ce66
No known key found for this signature in database
GPG Key ID: F4E9A721761C7593
2 changed files with 80 additions and 21 deletions

View File

@ -37,29 +37,17 @@ config CPU_FAM_ATMEGA128
config CPU_FAM
default "atmega128" if CPU_FAM_ATMEGA128
## Declaration of specific features
config HAS_ATMEGA_PCINT0
bool
help
Indicates that the Pin Change Interrupt bank 0 is present.
config HAS_ATMEGA_PCINT1
bool
help
Indicates that the Pin Change Interrupt bank 1 is present.
config HAS_ATMEGA_PCINT2
bool
help
Indicates that the Pin Change Interrupt bank 2 is present.
config HAS_ATMEGA_PCINT3
bool
help
Indicates that the Pin Change Interrupt bank 3 is present.
config ERROR_MODULES_CONFLICT
default "On ATmega, the RTC and RTT use to the same hardware timer." if MODULE_PERIPH_RTC && MODULE_PERIPH_RTT
depends on CPU_COMMON_ATMEGA
config MODULE_ATMEGA_COMMON
bool
depends on CPU_COMMON_ATMEGA
depends on TEST_KCONFIG
default y
help
ATmega common code.
rsource "periph/Kconfig"
source "$(RIOTCPU)/avr8_common/Kconfig"

View File

@ -0,0 +1,71 @@
# Copyright (c) 2021 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.
#
if TEST_KCONFIG && CPU_COMMON_ATMEGA
config MODULE_ATMEGA_COMMON_PERIPH
bool
default y
help
Common ATmega peripheral drivers.
config MODULE_ATMEGA_PCINT
bool
depends on HAS_ATMEGA_PCINT0 || HAS_ATMEGA_PCINT1 || HAS_ATMEGA_PCINT2 || HAS_ATMEGA_PCINT3
help
Say y to enable all the present Pin Change Interrupt banks.
config MODULE_ATMEGA_PCINT0
bool
depends on HAS_ATMEGA_PCINT0
default MODULE_ATMEGA_PCINT
help
Say y to enable PIC bank 0.
config MODULE_ATMEGA_PCINT1
bool
depends on HAS_ATMEGA_PCINT1
default MODULE_ATMEGA_PCINT
help
Say y to enable PIC bank 1.
config MODULE_ATMEGA_PCINT2
bool
depends on HAS_ATMEGA_PCINT2
default MODULE_ATMEGA_PCINT
help
Say y to enable PIC bank 2.
config MODULE_ATMEGA_PCINT3
bool
depends on HAS_ATMEGA_PCINT3
default MODULE_ATMEGA_PCINT
help
Say y to enable PIC bank 3.
endif # TEST_KCONFIG && CPU_COMMON_ATMEGA
## Declaration of specific features
config HAS_ATMEGA_PCINT0
bool
help
Indicates that the Pin Change Interrupt bank 0 is present.
config HAS_ATMEGA_PCINT1
bool
help
Indicates that the Pin Change Interrupt bank 1 is present.
config HAS_ATMEGA_PCINT2
bool
help
Indicates that the Pin Change Interrupt bank 2 is present.
config HAS_ATMEGA_PCINT3
bool
help
Indicates that the Pin Change Interrupt bank 3 is present.