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

Merge pull request #17274 from fjmolinas/pr_kconfig_nrf51

cpu/nrf51: model kconfig
This commit is contained in:
Leandro Lanzieri 2021-11-26 12:55:27 +01:00 committed by GitHub
commit d962787043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 75 additions and 70 deletions

View File

@ -22,6 +22,7 @@ dwm1001
hifive1
mbed_lpc1768
mega-xplained
microbit
native
nrf52840dk
nucleo-f072rb

View File

@ -16,5 +16,6 @@ config BOARD_AIRFY_BEACON
select HAS_PERIPH_I2C
select HAS_PERIPH_SPI
select HAS_PERIPH_UART
select MODULE_BOARDS_COMMON_NRF51 if TEST_KCONFIG
source "$(RIOTBOARD)/common/nrf51/Kconfig"

View File

@ -16,4 +16,8 @@ config BOARD_CALLIOPE_MINI
select HAS_PERIPH_UART
select HAS_PERIPH_PWM
select HAVE_SAUL_GPIO
select HAVE_BMX055
source "$(RIOTBOARD)/common/microbit/Kconfig"
source "$(RIOTBOARD)/common/nrf51/Kconfig"

View File

@ -1,6 +1,6 @@
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
USEMODULE += bmx055
endif
include $(RIOTBOARD)/common/microbit/Makefile.dep
include $(RIOTBOARD)/common/nrf51/Makefile.dep

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_MICROBIT
bool "BBC micro:bit specific LED matrix handling"
select MODULE_ZTIMER
select MODULE_ZTIMER_USEC
select MODULE_MINEPLEX

View File

@ -3,3 +3,7 @@ ifneq (,$(filter microbit,$(USEMODULE)))
USEMODULE += ztimer_usec
USEMODULE += mineplex
endif
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
endif

View File

@ -8,3 +8,15 @@ config BOARD_COMMON_NRF51
bool
select HAS_PERIPH_RTT
select HAS_PERIPH_TIMER
select HAVE_SAUL_NRF_TEMPERATURE
config MODULE_BOARDS_COMMON_NRF51
bool
depends on TEST_KCONFIG
help
Common code of NRF51 boards
choice NRF5X_RADIO_BACKEND
default MODULE_NRFMIN
endchoice

View File

@ -18,4 +18,5 @@ config BOARD_MICROBIT_V2
select HAS_PERIPH_UART
select HAS_VDD_LC_FILTER_REG1
source "$(RIOTBOARD)/common/microbit/Kconfig"
source "$(RIOTBOARD)/common/nrf52/Kconfig"

View File

@ -1,6 +1,2 @@
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
endif
include $(RIOTBOARD)/common/microbit/Makefile.dep
include $(RIOTBOARD)/common/nrf52/Makefile.dep

View File

@ -15,4 +15,8 @@ config BOARD_MICROBIT
select HAS_PERIPH_I2C
select HAS_PERIPH_UART
select HAVE_SAUL_GPIO
select HAVE_MMA8X5X
source "$(RIOTBOARD)/common/microbit/Kconfig"
source "$(RIOTBOARD)/common/nrf51/Kconfig"

View File

@ -1,5 +1,4 @@
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
USEMODULE += mma8x5x
endif

View File

@ -18,4 +18,8 @@ config BOARD_NRF51DK
select HAS_PERIPH_UART_HW_FC
select HAS_VDD_LC_FILTER_REG1
select HAVE_SAUL_GPIO
select MODULE_PERIPH_UART_HW_FC if TEST_KCONFIG && HAS_PERIPH_UART_HW_FC
source "$(RIOTBOARD)/common/nrf51/Kconfig"

View File

@ -15,4 +15,6 @@ config BOARD_NRF51DONGLE
select HAS_PERIPH_UART
select HAS_PERIPH_UART_HW_FC
select MODULE_PERIPH_UART_HW_FC if TEST_KCONFIG && HAS_PERIPH_UART_HW_FC
source "$(RIOTBOARD)/common/nrf51/Kconfig"

View File

@ -16,5 +16,6 @@ config BOARD_YUNJIA_NRF51822
select HAS_PERIPH_I2C
select HAS_PERIPH_SPI
select HAS_PERIPH_UART
select MODULE_BOARDS_COMMON_NRF51 if TEST_KCONFIG
source "$(RIOTBOARD)/common/nrf51/Kconfig"

View File

@ -52,5 +52,6 @@ endif # KCONFIG_USEMODULE_BMX055
config HAVE_BMX055
bool
select MODULE_BMX055 if MODULE_SAUL_DEFAULT
help
Indicates that a BMX055 9-axis sensor is present.

View File

@ -32,3 +32,9 @@ config MMA8X5X_I2C_ADDRESS
Default value corresponds to SA0 connected to VCC.
endif # KCONFIG_USEMODULE_MMA8X5X
config HAVE_MMA8X5X
bool
select MODULE_MMA8X5X if MODULE_SAUL_DEFAULT
help
Indicates that a MMA8x5x is present

View File

@ -51,4 +51,13 @@ config MODULE_PERIPH_INIT_LPUART
depends on MODULE_PERIPH_LPUART
default y if MODULE_PERIPH_INIT
config MODULE_PERIPH_UART_HW_FC
bool
depends on HAS_PERIPH_UART_HW_FC
config MODULE_PERIPH_INIT_UART_HW_FC
bool
depends on MODULE_PERIPH_UART_HW_FC
default y if MODULE_PERIPH_INIT
endif # MODULE_PERIPH_UART

View File

@ -10,6 +10,7 @@ BOARD_INSUFFICIENT_MEMORY := \
atmega328p-xplained-mini \
atxmega-a3bu-xplained \
bluepill-stm32f030c8 \
calliope-mini \
derfmega128 \
hifive1 \
hifive1b \

View File

@ -7,6 +7,7 @@ BOARD_INSUFFICIENT_MEMORY := \
calliope-mini \
cc2650-launchpad \
cc2650stk \
calliope-mini \
hifive1 \
i-nucleo-lrwan1 \
im880b \

View File

@ -12,6 +12,7 @@ BOARD_INSUFFICIENT_MEMORY := \
blackpill \
bluepill \
bluepill-stm32f030c8 \
calliope-mini \
derfmega128 \
hifive1 \
hifive1b \

View File

@ -7,6 +7,7 @@ BOARD_PROVIDES_NETIF := \
avr-rss2 \
b-l072z-lrwan1 \
cc2538dk \
calliope-mini \
derfmega128 \
derfmega256 \
dwm1001 \

View File

@ -1,10 +0,0 @@
BOARD ?= calliope-mini
include ../Makefile.tests_common
# This test application is for the Calliope mini only
BOARD_WHITELIST := calliope-mini
# We want to test the Calliope mini support module
USEMODULE += microbit
include $(RIOTBASE)/Makefile.include

View File

@ -1,13 +0,0 @@
Background
==========
The Calliope mini board comes with its own little utility library, that makes
some of the boards unique feature like the 5x5 LED matrix usable to RIOT.
This test application is therefore specialized for only that board and its
purpose is to test and showcase the board specific utility library.
Expected result
===============
When running this application, you should see the string
`Welcome RIOT @ Calliope mini!` scrolling by on the boards LED matrix.

View File

@ -1,40 +0,0 @@
/*
* Copyright (C) 2016 Freie Universität Berlin
*
* 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.
*/
/**
* @ingroup tests
* @{
*
* @file
* @brief Test the Calliope mini support library
*
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
*
* @}
*/
#include <stdio.h>
#include "timex.h"
#include "microbit.h"
#define DELAY (120 * US_PER_MS)
int main(void)
{
puts("Welcome to RIOT!\n");
puts("Please refer to the README.md for more information about this app\n");
microbit_matrix_init();
while (1) {
microbit_matrix_shift_str("Welcome RIOT @ Calliope mini!", DELAY);
}
return 0;
}

View File

@ -3,7 +3,7 @@ BOARD ?= microbit
include ../Makefile.tests_common
# This test application is for the BBC micro:bit only
BOARD_WHITELIST := microbit microbit-v2
BOARD_WHITELIST := microbit microbit-v2 calliope-mini
# We want to test the microbit support module
USEMODULE += microbit

View File

@ -0,0 +1,3 @@
# this file enables modules defined in Kconfig. Do not use this file for
# application configuration. This is only needed during migration.
CONFIG_MODULE_MICROBIT=y

View File

@ -12,6 +12,7 @@ BOARD_INSUFFICIENT_MEMORY := \
atxmega-a3bu-xplained \
b-l072z-lrwan1 \
bluepill-stm32f030c8 \
calliope-mini \
derfmega128 \
hifive1 \
hifive1b \

View File

@ -0,0 +1,3 @@
CONFIG_MODULE_SAUL_DEFAULT=y
CONFIG_MODULE_SAUL=y
CONFIG_MODULE_XTIMER=y

View File

@ -6,6 +6,7 @@ BOARD_INSUFFICIENT_MEMORY := \
arduino-uno \
atmega328p \
atmega328p-xplained-mini \
calliope-mini \
cc2650stk \
maple-mini \
mbed_lpc1768 \