Merge pull request #15448 from leandrolanzieri/pr/kconfig/drivers_a

drivers/a*: model modules in Kconfig
This commit is contained in:
benpicco 2020-11-23 16:52:50 +01:00 committed by GitHub
commit a80f0d966a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
41 changed files with 573 additions and 2 deletions

View File

@ -2,7 +2,11 @@
: ${TEST_BOARDS_AVAILABLE:="esp32-wroom-32 samr21-xpro"}
: ${TEST_BOARDS_LLVM_COMPILE:="iotlab-m3 native nrf52dk mulle nucleo-f401re samr21-xpro slstk3402a"}
: ${TEST_KCONFIG_samr21_xpro:="examples/hello-world tests/periph_*"}
: ${TEST_KCONFIG_samr21_xpro:="examples/hello-world tests/periph_*
tests/driver_ad7746 tests/driver_adcxx1c tests/driver_ads101x tests/driver_adt101x
tests/driver_adt7310 tests/driver_adxl345 tests/driver_aip31068 tests/driver_apa102
tests/driver_apds99xx tests/driver_apds99xx_full tests/driver_at tests/driver_at24cxxx
tests/driver_at24mac tests/driver_at25xxx tests/driver_at30tse75x tests/driver_ata8520e"}
: ${TEST_KCONFIG_native:="examples/hello-world tests/periph_*"}
export RIOT_CI_BUILD=1

View File

@ -7,11 +7,14 @@
menu "Drivers"
menu "Actuator Device Drivers"
rsource "aip31068/Kconfig"
rsource "apa102/Kconfig"
rsource "motor_driver/Kconfig"
endmenu # Actuator Device Drivers
menu "Miscellaneous Device Drivers"
rsource "at/Kconfig"
rsource "at24mac/Kconfig"
endmenu # Miscellaneous Device Drivers
rsource "Kconfig.net"
@ -21,7 +24,13 @@ rsource "periph_common/Kconfig"
endmenu # Peripherals drivers
menu "Sensor Device Drivers"
rsource "ad7746/Kconfig"
rsource "adcxx1c/Kconfig"
rsource "ads101x/Kconfig"
rsource "adt7310/Kconfig"
rsource "adxl345/Kconfig"
rsource "apds99xx/Kconfig"
rsource "at30tse75x/Kconfig"
rsource "bmx055/Kconfig"
rsource "fxos8700/Kconfig"
rsource "gp2y10xx/Kconfig"
@ -38,6 +47,9 @@ rsource "tmp00x/Kconfig"
endmenu # Sensor Device Drivers
menu "Storage Device Drivers"
rsource "at24cxxx/Kconfig"
rsource "at25xxx/Kconfig"
rsource "mtd/Kconfig"
rsource "mtd_sdcard/Kconfig"
endmenu # Storage Device Drivers

View File

@ -6,6 +6,7 @@
menu "Network Device Drivers"
rsource "at86rf215/Kconfig"
rsource "ata8520e/Kconfig"
rsource "cc110x/Kconfig"
rsource "dose/Kconfig"
rsource "mrf24j40/Kconfig"

14
drivers/ad7746/Kconfig Normal file
View File

@ -0,0 +1,14 @@
# 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 MODULE_AD7746
bool "AD7746 Capacitance-to-digital converter"
depends on HAS_PERIPH_I2C
depends on TEST_KCONFIG
select MODULE_PERIPH_I2C
help
AD7746 Capacitance-to-digital converter with temperature sensor driver.

40
drivers/adcxx1c/Kconfig Normal file
View File

@ -0,0 +1,40 @@
# 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.
#
choice
bool "ADCXX1C Analog-to-Digital converter"
depends on HAS_PERIPH_GPIO
depends on HAS_PERIPH_GPIO_IRQ
depends on HAS_PERIPH_I2C
depends on TEST_KCONFIG
optional
help
This driver works with adc081c, adc101c and adc121c models. Select one.
config MODULE_ADC081C
bool "ADC081C"
select MODULE_ADCXX1C
config MODULE_ADC101C
bool "ADC101C"
select MODULE_ADCXX1C
config MODULE_ADC121C
bool "ADC121C"
select MODULE_ADCXX1C
endchoice
config MODULE_ADCXX1C
bool
depends on HAS_PERIPH_GPIO
depends on HAS_PERIPH_GPIO_IRQ
depends on HAS_PERIPH_I2C
depends on TEST_KCONFIG
select MODULE_PERIPH_GPIO
select MODULE_PERIPH_GPIO_IRQ
select MODULE_PERIPH_I2C

View File

@ -4,6 +4,21 @@
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
config MODULE_ADS101X
bool "ADS101X Analog-to-Digital converter"
depends on HAS_PERIPH_GPIO
depends on HAS_PERIPH_GPIO_IRQ
depends on HAS_PERIPH_I2C
depends on TEST_KCONFIG
select MODULE_PERIPH_GPIO
select MODULE_PERIPH_GPIO_IRQ
select MODULE_PERIPH_I2C
select MODULE_XTIMER
help
This driver works with the ads1013, ads1014, ads1015, ads1113, ads1114
and ads1115 models.
menuconfig KCONFIG_USEMODULE_ADS101X
bool "Configure ADS101X driver"
depends on USEMODULE_ADS101X

14
drivers/adt7310/Kconfig Normal file
View File

@ -0,0 +1,14 @@
# 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 MODULE_ADT7310
bool "ADT7310 temperature sensor"
depends on HAS_PERIPH_SPI
depends on TEST_KCONFIG
select MODULE_PERIPH_SPI
help
Driver for the Analog Devices ADT7310 temperature sensor.

12
drivers/adxl345/Kconfig Normal file
View File

@ -0,0 +1,12 @@
# 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 MODULE_ADXL345
bool "ADXL345 3-Axis accelerometer"
depends on HAS_PERIPH_I2C
depends on TEST_KCONFIG
select MODULE_PERIPH_I2C

16
drivers/aip31068/Kconfig Normal file
View File

@ -0,0 +1,16 @@
# 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 MODULE_AIP31068
bool "AIP31068 I2C LCD controller"
depends on HAS_PERIPH_I2C
depends on TEST_KCONFIG
select MODULE_XTIMER
select MODULE_PERIPH_I2C
# necessary to fix driver initialization on esp32
# TODO: move this to ESP32
select MODULE_ESP_I2C_HW if CPU_ESP32

12
drivers/apa102/Kconfig Normal file
View File

@ -0,0 +1,12 @@
# 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 MODULE_APA102
bool "APA102 RGB LED"
depends on HAS_PERIPH_GPIO
depends on TEST_KCONFIG
select MODULE_PERIPH_GPIO

59
drivers/apds99xx/Kconfig Normal file
View File

@ -0,0 +1,59 @@
# 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.
#
choice
bool "APDS99XX proximity and ambient light sensor"
depends on HAS_PERIPH_I2C
depends on TEST_KCONFIG
optional
help
The driver can be used with following Broadcom sensors: APDS9900,
APDS9901, APDS9930, APDS9950, APDS9960. Select one model.
The base driver only supports a basic set of functions and has therefore
a small size. The procedure for retrieving new data is polling. Ambient
light and proximity sensing are supported.
The fully functional driver MODULE_APDS99XX_FULL supports all the
features supported by the base driver, as well as all other sensor
features, including interrupts and their configuration. Data-ready
interrupts can be used to retrieve data. In addition, threshold
interrupts can be used and configured.
config MODULE_APDS9900
bool "APDS9900"
select MODULE_APDS99XX
config MODULE_APDS9901
bool "APDS9901"
select MODULE_APDS99XX
config MODULE_APDS9930
bool "APDS9930"
select MODULE_APDS99XX
config MODULE_APDS9950
bool "APDS9950"
select MODULE_APDS99XX
config MODULE_APDS9960
bool "APDS9960"
select MODULE_APDS99XX
endchoice
config MODULE_APDS99XX
bool
depends on HAS_PERIPH_I2C
depends on TEST_KCONFIG
select MODULE_PERIPH_I2C
config MODULE_APDS99XX_FULL
bool "APDS99XX Full functionalities"
depends on MODULE_APDS99XX
depends on HAS_PERIPH_GPIO_IRQ
select MODULE_PERIPH_GPIO_IRQ

View File

@ -4,6 +4,51 @@
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
menuconfig MODULE_AT
bool "AT (Hayes) command set library"
depends on HAS_PERIPH_UART
depends on TEST_KCONFIG
depends on MODULE_ISRPIPE
depends on MODULE_ISRPIPE_READ_TIMEOUT
select MODULE_FMT
select MODULE_PERIPH_UART
if MODULE_AT
config MODULE_AT_URC
bool "Support Unsolicited Result Codes (URC)"
config MODULE_AT_URC_ISR
bool "Process URCs when they arrive"
depends on MODULE_AT_URC
depends on MODULE_EVENT_THREAD
choice
bool "Thread priority"
depends on MODULE_AT_URC_ISR
default MODULE_AT_URC_ISR_MEDIUM
help
To process URCs upon arrival an event thread is used. The
MODULE_EVENT_THREAD symbol should be set. Choose a priority for the
thread that processes the URCs.
config MODULE_AT_URC_ISR_LOW
bool "Low"
select MODULE_EVENT_THREAD_LOW
config MODULE_AT_URC_ISR_MEDIUM
bool "Medium"
select MODULE_EVENT_THREAD_MEDIUM
config MODULE_AT_URC_ISR_HIGHEST
bool "Highest"
select MODULE_EVENT_THREAD_HIGHEST
endchoice
endif # MODULE_AT
menuconfig KCONFIG_USEMODULE_AT
bool "Configure AT driver"
depends on USEMODULE_AT

69
drivers/at24cxxx/Kconfig Normal file
View File

@ -0,0 +1,69 @@
# 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.
#
choice
bool "AT24CXXX EEPROM"
depends on HAS_PERIPH_I2C
depends on TEST_KCONFIG
optional
help
This driver supports the multiple models, select one.
config MODULE_AT24C01
bool "AT24C01"
select MODULE_AT24CXXX
config MODULE_AT24C02
bool "AT24C02"
select MODULE_AT24CXXX
config MODULE_AT24C04
bool "AT24C04"
select MODULE_AT24CXXX
config MODULE_AT24C08A
bool "AT24C08A"
select MODULE_AT24CXXX
config MODULE_AT24C16A
bool "AT24C16A"
select MODULE_AT24CXXX
config MODULE_AT24C32
bool "AT24C32"
select MODULE_AT24CXXX
config MODULE_AT24C64
bool "AT24C64"
select MODULE_AT24CXXX
config MODULE_AT24C128
bool "AT24C128"
select MODULE_AT24CXXX
config MODULE_AT24C256
bool "AT24C256"
select MODULE_AT24CXXX
config MODULE_AT24C512
bool "AT24C512"
select MODULE_AT24CXXX
config MODULE_AT24C1024
bool "AT24C1024"
select MODULE_AT24CXXX
endchoice
config MODULE_AT24CXXX
bool
depends on HAS_PERIPH_I2C
depends on TEST_KCONFIG
select MODULE_PERIPH_I2C
select MODULE_XTIMER
rsource "mtd/Kconfig"

View File

@ -0,0 +1,13 @@
# 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 MODULE_MTD_AT24CXXX
bool "MTD implementation for AT24CXXX"
default y
depends on MODULE_AT24CXXX
depends on MODULE_MTD
depends on TEST_KCONFIG

11
drivers/at24mac/Kconfig Normal file
View File

@ -0,0 +1,11 @@
# 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 MODULE_AT24MAC
bool "AT24MAC unique ID chip"
select MODULE_AT24CXXX
depends on TEST_KCONFIG

18
drivers/at25xxx/Kconfig Normal file
View File

@ -0,0 +1,18 @@
# 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 MODULE_AT25XXX
bool "AT25xxx SPI-EEPROMs"
depends on HAS_PERIPH_SPI
depends on TEST_KCONFIG
select MODULE_PERIPH_SPI
select MODULE_XTIMER
help
This driver also supports M95xxx, 25AAxxx, 25LCxxx, CAT25xxx & BR25Sxxx
families.
rsource "mtd/Kconfig"

View File

@ -0,0 +1,12 @@
# 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 MODULE_MTD_AT25XXX
bool "MTD implementation for AT25XXX"
depends on MODULE_AT25XXX
depends on MODULE_MTD
depends on TEST_KCONFIG

View File

@ -0,0 +1,15 @@
# 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 MODULE_AT30TSE75X
bool "AT30TSE75X temperature sensor"
depends on HAS_PERIPH_I2C
depends on TEST_KCONFIG
select MODULE_PERIPH_I2C
select MODULE_XTIMER
help
AT30TSE75x temperature sensor with serial EEPROM.

18
drivers/ata8520e/Kconfig Normal file
View File

@ -0,0 +1,18 @@
# 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 MODULE_ATA8520E
bool "ATA8520E Sigfox compatible transceiver"
depends on HAS_PERIPH_GPIO
depends on HAS_PERIPH_GPIO_IRQ
depends on HAS_PERIPH_SPI
depends on TEST_KCONFIG
select MODULE_PERIPH_GPIO
select MODULE_PERIPH_GPIO_IRQ
select MODULE_PERIPH_SPI
select MODULE_FMT
select MODULE_XTIMER

10
drivers/mtd/Kconfig Normal file
View File

@ -0,0 +1,10 @@
# 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 MODULE_MTD
bool "Memory Technology Device interface (MTD)"
depends on TEST_KCONFIG

View File

@ -9,7 +9,10 @@ menu "System"
rsource "arduino/Kconfig"
rsource "auto_init/Kconfig"
rsource "benchmark/Kconfig"
rsource "color/Kconfig"
rsource "div/Kconfig"
rsource "embunit/Kconfig"
rsource "event/Kconfig"
rsource "fmt/Kconfig"
rsource "isrpipe/Kconfig"
rsource "net/Kconfig"

10
sys/color/Kconfig Normal file
View File

@ -0,0 +1,10 @@
# 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 MODULE_COLOR
bool "Handling RGB and HSV color"
depends on TEST_KCONFIG

11
sys/embunit/Kconfig Normal file
View File

@ -0,0 +1,11 @@
# 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 MODULE_EMBUNIT
bool "EmbUnit"
help
RIOT Unittests based on the EmbUnit Framework.

46
sys/event/Kconfig Normal file
View File

@ -0,0 +1,46 @@
# 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.
#
menuconfig MODULE_EVENT
bool "Event queue"
depends on TEST_KCONFIG
select MODULE_CORE_THREAD_FLAGS
help
This module offers an event queue framework like libevent or libuev.
An event queue is basically a FIFO queue of events, with some functions
to efficiently and safely handle adding and getting events to / from
such a queue.
if MODULE_EVENT
config MODULE_EVENT_CALLBACK
bool "Support for callback-with-argument event type"
menuconfig MODULE_EVENT_THREAD
bool "Support for event handler threads"
help
There are three threads of different priorities that can be enabled.
if MODULE_EVENT_THREAD
config MODULE_EVENT_THREAD_LOWEST
bool "Lowest priority thread"
config MODULE_EVENT_THREAD_MEDIUM
bool "Medium priority thread"
config MODULE_EVENT_THREAD_HIGHEST
bool "Highest priority thread"
endif # MODULE_EVENT_THREAD
config MODULE_EVENT_TIMEOUT
bool "Support for triggering events after timeout"
select MODULE_XTIMER
endif # MODULE_EVENT

View File

@ -14,4 +14,5 @@ menuconfig MODULE_ISRPIPE
config MODULE_ISRPIPE_READ_TIMEOUT
bool "ISR Pipe read with timeout"
depends on MODULE_ISRPIPE && MODULE_XTIMER
depends on MODULE_ISRPIPE
select MODULE_XTIMER

10
sys/ps/Kconfig Normal file
View File

@ -0,0 +1,10 @@
# 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 MODULE_PS
bool "UNIX like ps command"
depends on TEST_KCONFIG

View File

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

View File

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

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_ADS101X=y

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,20 @@
# this file enables modules defined in Kconfig. Do not use this file for
# application configuration. This is only needed during migration.
# dependencies of AT driver
CONFIG_MODULE_ISRPIPE=y
CONFIG_MODULE_ISRPIPE_READ_TIMEOUT=y
CONFIG_MODULE_AT=y
# support URC processing
CONFIG_MODULE_AT_URC=y
# enable event thread to process URCs upon arrival
CONFIG_MODULE_EVENT=y
CONFIG_MODULE_EVENT_THREAD=y
# support URC upon arrival
CONFIG_MODULE_AT_URC_ISR=y
# enable shell
CONFIG_MODULE_SHELL=y

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_AT24C256=y

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_AT24MAC=y

View File

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

View File

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

View File

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