1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00

Merge pull request #17277 from leandrolanzieri/pr/cpu/qn908x/model_kconfig

cpu/qn908x: model kconfig
This commit is contained in:
Francisco 2021-12-01 01:03:30 +01:00 committed by GitHub
commit cb07027b39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 60 additions and 1 deletions

View File

@ -39,6 +39,7 @@ nucleo-l152re
nucleo-l433rc
nucleo-l552ze-q
p-nucleo-wb55
qn9080dk
remote-revb
same54-xpro
samr21-xpro

View File

@ -7,4 +7,11 @@
config BOARD_COMMON_QN908X
bool
depends on CPU_FAM_QN908X
select MODULE_BOARD_COMMON_QN908X if TEST_KCONFIG
# Add common board support here.
config MODULE_BOARDS_COMMON_QN908X
bool
depends on TEST_KCONFIG
help
Common code for qn908x boards.

View File

@ -24,4 +24,8 @@ config BOARD_QN9080DK
select HAS_PERIPH_UART
select HAS_PERIPH_UART_MODECFG
select HAVE_SAUL_GPIO
select HAVE_MMA8X5X
select HAVE_MTD_SPI_NOR
source "$(RIOTBOARD)/common/qn908x/Kconfig"

View File

@ -19,6 +19,12 @@ config CPU_FAM_QN908X
select HAS_PERIPH_WDT
select HAS_PERIPH_WDT_CB
select MODULE_VENDOR if TEST_KCONFIG
# The clock functionality is used by most modules, including cpu.c even when
# no peripheral module is being used.
select MODULE_VENDOR_FSL_CLOCK if TEST_KCONFIG
select MODULE_PERIPH_GPIO_MUX if TEST_KCONFIG
## CPU Models
# For cpus QN9080CHN (revision C) and QN9080DHN (revision D)
config CPU_MODEL_QN9080XHN
@ -50,5 +56,7 @@ config HAS_CPU_QN908X
# Other cpu configuration
rsource "Kconfig.clk"
rsource "periph/Kconfig"
rsource "vendor/Kconfig"
source "$(RIOTCPU)/cortexm_common/Kconfig"

View File

@ -10,7 +10,7 @@ USEMODULE += vendor_fsl_clock
# All peripherals use gpio_mux.h
USEMODULE += periph_gpio_mux
ifneq (,$(filter periph_uart periph_i2c,$(USEMODULE)))
ifneq (,$(filter periph_uart periph_i2c periph_spi,$(USEMODULE)))
USEMODULE += periph_flexcomm
endif

19
cpu/qn908x/periph/Kconfig Normal file
View File

@ -0,0 +1,19 @@
# 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.
#
config MODULE_PERIPH_FLEXCOMM
bool
depends on TEST_KCONFIG
default y if MODULE_PERIPH_UART || MODULE_PERIPH_I2C || MODULE_PERIPH_SPI
help
Flexcomm interrupt dispatch driver.
config MODULE_PERIPH_GPIO_MUX
bool
depends on TEST_KCONFIG
help
Common Pin MUX functions for qn908x CPUs.

18
cpu/qn908x/vendor/Kconfig vendored Normal file
View File

@ -0,0 +1,18 @@
# 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.
#
config MODULE_VENDOR
bool
depends on TEST_KCONFIG
help
qn908x vendor-specific code.
config MODULE_VENDOR_FSL_CLOCK
bool
depends on MODULE_VENDOR
help
qn908x vendor-specific FSL Clock code.

View File

@ -14,6 +14,8 @@ ifneq (,$(filter periph_init, $(USEMODULE)))
PERIPH_IGNORE_MODULES := \
periph_init% \
periph_common \
periph_flexcomm \
periph_gpio_mux \
periph_rtc_ms \
periph_rtc_rtt \
periph_clic \