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

cpu/nrf52: initial kconfig modeling

This commit is contained in:
Francisco Molina 2021-09-29 10:17:47 +02:00
parent c9de733c52
commit 6b276af790
7 changed files with 136 additions and 0 deletions

View File

@ -84,4 +84,7 @@ config HAS_CPU_NRF52
help
Indicates that the current cpu is 'nrf52'.
rsource "periph/Kconfig"
rsource "vectors/Kconfig"
source "$(RIOTCPU)/nrf5x_common/Kconfig"

23
cpu/nrf52/periph/Kconfig Normal file
View File

@ -0,0 +1,23 @@
# Copyright (c) 2021 Inria
#
# 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
config MODULE_PERIPH_UART_NONBLOCKING
depends on HAS_PERIPH_UART_NONBLOCKING
depends on MODULE_PERIPH_UART
select MODULE_TSRB
config MODULE_PERIPH_SPI
depends on HAS_PERIPH_SPI
select MODULE_PERIPH_GPIO_IRQ if CPU_MODEL_NRF52832XXAA && HAS_PERIPH_GPIO_IRQ
config MODULE_SAUL_NRF_VDDH
bool "Internal Voltage Sensor"
depends on HAS_PERIPH_ADC
endif # TEST_KCONFIG

View File

@ -24,5 +24,6 @@ endif # KCONFIG_USEMODULE_NRF802154
## Related features
config HAS_RADIO_NRF802154
bool
select HAVE_NRF5X_RADIO
help
Indicates that a IEEE 802.15.4 NRF52 radio is present.

11
cpu/nrf52/vectors/Kconfig Normal file
View File

@ -0,0 +1,11 @@
# Copyright (c) 2021 Inria
#
# 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 MODULE_NRF52_VECTORS
bool
depends on TEST_KCONFIG
default y

View File

@ -35,11 +35,13 @@ config HAS_BLE_NIMBLE_NETIF
config HAS_RADIO_NRFBLE
bool
select HAVE_NRF5X_RADIO
help
Indicates that a BLE-compatible nRF radio is present.
config HAS_RADIO_NRFMIN
bool
select HAVE_NRF5X_RADIO
help
Indicates that a radio compatible with the nRF minimal radio driver is
present.
@ -56,4 +58,12 @@ config HAS_VDD_LC_FILTER_REG1
Indicates that a board is equipped with an external LC filter circuit
attached to the CPUs voltage regulator stage 1.
config MODULE_CPU_COMMON
bool
depends on TEST_KCONFIG
default y
rsource "periph/Kconfig.nrf5x"
source "$(RIOTCPU)/cortexm_common/Kconfig"

View File

@ -0,0 +1,36 @@
# Copyright (c) 2021 Inria
#
# 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 HAVE_SAUL_NRF_TEMPERATURE
bool
select MODULE_SAUL_NRF_TEMPERATURE if MODULE_SAUL_DEFAULT && HAS_PERIPH_TEMPERATURE
help
Indicates that a SAUL wrapper to the temperature peripheral is present.
if TEST_KCONFIG
config MODULE_NRF5X_COMMON_PERIPH
bool
default y
help
nrf52 common peripheral code.
config MODULE_VDD_LC_FILTER_REG0
bool
depends on HAS_VDD_LC_FILTER_REG0
default y
help
Use the LC filter attached to the CPUs voltage regulator
config MODULE_VDD_LC_FILTER_REG1
bool
depends on HAS_VDD_LC_FILTER_REG1
default y
help
Use the LC filter attached to the CPUs voltage regulator
endif # TEST_KCONFIG

View File

@ -0,0 +1,52 @@
# Copyright (c) 2021 Inria
#
# 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 HAVE_NRF5X_RADIO
bool
select NRF5X_RADIO if MODULE_NETDEV_DEFAULT
help
Indicates that an NRF5X radio is present.
if TEST_KCONFIG
menuconfig NRF5X_RADIO
bool "nrf5x radio driver"
depends on HAVE_NRF5X_RADIO
depends on TEST_KCONFIG
if NRF5X_RADIO
choice NRF5X_RADIO_BACKEND
bool "nrf5x radio backend"
config MODULE_NRF802154
bool "Implementation of the IEEE 802.15.4 for nRF52 radio"
depends on HAS_RADIO_NRF802154
depends on HAS_PERIPH_TIMER
select MODULE_LUID
select MODULE_PERIPH_TIMER
select MODULE_IEEE802154
config MODULE_NRFBLE
bool "Bluetooth low energy radio driver"
depends on HAS_RADIO_NRFBLE
help
Bluetooth low energy radio driver for nRF5x SoCs
config MODULE_NRFMIN
bool "nrfmin radio driver"
depends on HAS_RADIO_NRFMIN
help
nrfmin radio driver for nRF51 radios
endchoice
endif # NRF5X_RADIO
endif # TEST_KCONFIG
rsource "$(RIOTCPU)/nrf52/radio/nrf802154/Kconfig"