mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #17270 from leandrolanzieri/pr/boards/saml21/model_kconfig
boards/saml21-based: model kconfig
This commit is contained in:
commit
7f649aa505
1
.murdock
1
.murdock
@ -15,6 +15,7 @@ arduino-nano
|
||||
atxmega-a1-xplained
|
||||
atxmega-a3bu-xplained
|
||||
avr-rss2
|
||||
bastwan
|
||||
cc1352-launchpad
|
||||
cc2650-launchpad
|
||||
derfmega128
|
||||
|
@ -21,3 +21,6 @@ config BOARD_BASTWAN
|
||||
select HAS_PERIPH_USBDEV
|
||||
select HAS_RIOTBOOT
|
||||
select HAS_HIGHLEVEL_STDIO
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
select HAVE_SX1276
|
||||
|
@ -15,3 +15,9 @@ FEATURES_PROVIDED += periph_usbdev
|
||||
# Put other features for this board (in alphabetical order)
|
||||
FEATURES_PROVIDED += riotboot
|
||||
FEATURES_PROVIDED += highlevel_stdio
|
||||
|
||||
# This configuration enables modules that are only available when using Kconfig
|
||||
# module modelling
|
||||
ifeq (1, $(TEST_KCONFIG))
|
||||
KCONFIG_ADD_CONFIG += $(BOARDDIR)/bastwan.config
|
||||
endif
|
||||
|
3
boards/bastwan/bastwan.config
Normal file
3
boards/bastwan/bastwan.config
Normal file
@ -0,0 +1,3 @@
|
||||
CONFIG_MODULE_USBUS=y
|
||||
CONFIG_MODULE_USBUS_CDC_ACM=y
|
||||
CONFIG_MODULE_STDIO_CDC_ACM=y
|
@ -22,3 +22,5 @@ config BOARD_SAML21_XPRO
|
||||
select HAS_PERIPH_UART
|
||||
select HAS_PERIPH_USBDEV
|
||||
select HAS_RIOTBOOT
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
|
@ -20,3 +20,5 @@ config BOARD_SAMR30_XPRO
|
||||
select HAS_PERIPH_UART
|
||||
select HAS_PERIPH_USBDEV
|
||||
select HAS_RIOTBOOT
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
|
@ -20,3 +20,6 @@ config BOARD_SAMR34_XPRO
|
||||
select HAS_PERIPH_UART
|
||||
select HAS_PERIPH_USBDEV
|
||||
select HAS_RIOTBOOT
|
||||
|
||||
select HAVE_SX1276
|
||||
select HAVE_SAUL_GPIO
|
||||
|
@ -14,3 +14,9 @@ FEATURES_PROVIDED += periph_usbdev
|
||||
|
||||
# Put other features for this board (in alphabetical order)
|
||||
FEATURES_PROVIDED += riotboot
|
||||
|
||||
# This configuration enables modules that are only available when using Kconfig
|
||||
# module modelling
|
||||
ifeq (1, $(TEST_KCONFIG))
|
||||
KCONFIG_ADD_CONFIG += $(BOARDDIR)/yarm.config
|
||||
endif
|
||||
|
3
boards/yarm/yarm.config
Normal file
3
boards/yarm/yarm.config
Normal file
@ -0,0 +1,3 @@
|
||||
CONFIG_MODULE_USBUS=y
|
||||
CONFIG_MODULE_USBUS_CDC_ACM=y
|
||||
CONFIG_MODULE_STDIO_CDC_ACM=y
|
@ -5,41 +5,52 @@
|
||||
# directory for more details.
|
||||
#
|
||||
|
||||
if TEST_KCONFIG
|
||||
|
||||
choice
|
||||
bool "Semtech SX1272 and SX1276 radios driver"
|
||||
optional
|
||||
menuconfig MODULE_SX127X
|
||||
bool "Semtech SX1272 and SX1276 radios driver" if !(HAVE_SX127X && MODULE_NETDEV_DEFAULT)
|
||||
default y if (HAVE_SX127X && MODULE_NETDEV_DEFAULT)
|
||||
depends on TEST_KCONFIG
|
||||
depends on HAS_PERIPH_GPIO
|
||||
depends on HAS_PERIPH_GPIO_IRQ
|
||||
depends on HAS_PERIPH_SPI
|
||||
depends on HAS_PERIPH_TIMER
|
||||
help
|
||||
Only LoRa long range modem is supported at the moment.
|
||||
|
||||
config MODULE_SX1272
|
||||
bool "SX1272"
|
||||
select MODULE_SX127X
|
||||
|
||||
config MODULE_SX1276
|
||||
bool "SX1276"
|
||||
select MODULE_SX127X
|
||||
|
||||
endchoice
|
||||
|
||||
config MODULE_SX127X
|
||||
bool
|
||||
depends on HAS_PERIPH_GPIO
|
||||
depends on HAS_PERIPH_GPIO_IRQ
|
||||
depends on HAS_PERIPH_SPI
|
||||
|
||||
select MODULE_IOLIST
|
||||
select MODULE_LORA
|
||||
select MODULE_PERIPH_GPIO
|
||||
select MODULE_PERIPH_GPIO_IRQ
|
||||
select MODULE_PERIPH_SPI_GPIO_MODE if HAS_PERIPH_SPI_GPIO_MODE
|
||||
select MODULE_PERIPH_SPI
|
||||
select MODULE_ZTIMER
|
||||
select MODULE_ZTIMER_MSEC
|
||||
select MODULE_IOLIST
|
||||
select MODULE_LORA
|
||||
help
|
||||
Only LoRa long range modem is supported at the moment.
|
||||
|
||||
endif # TEST_KCONFIG
|
||||
choice
|
||||
bool "Radio variant"
|
||||
depends on MODULE_SX127X
|
||||
default MODULE_SX1272 if HAVE_SX1272
|
||||
default MODULE_SX1276 if HAVE_SX1276
|
||||
|
||||
config MODULE_SX1272
|
||||
bool "SX1272"
|
||||
|
||||
config MODULE_SX1276
|
||||
bool "SX1276"
|
||||
|
||||
endchoice
|
||||
|
||||
config HAVE_SX1272
|
||||
bool
|
||||
select HAVE_SX127X
|
||||
help
|
||||
Indicates that an sx1272 radio is present.
|
||||
|
||||
config HAVE_SX1276
|
||||
bool
|
||||
select HAVE_SX127X
|
||||
help
|
||||
Indicates that an sx1276 radio is present.
|
||||
|
||||
config HAVE_SX127X
|
||||
bool
|
||||
help
|
||||
Indicates that an sx127x radio is present.
|
||||
|
@ -108,5 +108,6 @@ config USB_SERIAL_BYTE_LENGTH
|
||||
comment "WARNING: The serial string is empty!"
|
||||
depends on USB_SERIAL_STR = "" && USB_CUSTOM_SERIAL_STR
|
||||
|
||||
rsource "usbus/Kconfig"
|
||||
endif # KCONFIG_USB
|
||||
|
||||
rsource "usbus/Kconfig"
|
||||
|
@ -4,9 +4,30 @@
|
||||
# General Public License v2.1. See the file LICENSE in the top level
|
||||
# directory for more details.
|
||||
#
|
||||
|
||||
menuconfig MODULE_USBUS
|
||||
bool "USB Unified Stack (USBUS)"
|
||||
depends on TEST_KCONFIG
|
||||
depends on HAS_PERIPH_USBDEV || MODULE_USBDEV_MOCK
|
||||
select MODULE_CORE_THREAD_FLAGS
|
||||
select MODULE_EVENT
|
||||
select MODULE_LUID
|
||||
select MODULE_FMT
|
||||
select MODULE_PERIPH_USBDEV if HAS_PERIPH_USBDEV && !MODULE_USBDEV_MOCK
|
||||
|
||||
if MODULE_USBUS
|
||||
|
||||
config MODULE_AUTO_INIT_USBUS
|
||||
bool "Auto initialize USBUS"
|
||||
depends on MODULE_AUTO_INIT
|
||||
default y
|
||||
|
||||
endif # MODULE_USBUS
|
||||
|
||||
menuconfig KCONFIG_USEMODULE_USBUS
|
||||
bool "Configure USB Unified Stack (USBUS)"
|
||||
depends on USEMODULE_USBUS
|
||||
depends on KCONFIG_USB
|
||||
help
|
||||
Configure the USBUS module via Kconfig.
|
||||
|
||||
@ -42,7 +63,8 @@ config USBUS_EP0_SIZE_64
|
||||
|
||||
endchoice
|
||||
|
||||
endif # KCONFIG_USEMODULE_USBUS
|
||||
|
||||
rsource "cdc/Kconfig"
|
||||
rsource "dfu/Kconfig"
|
||||
|
||||
endif # KCONFIG_USEMODULE_USBUS
|
||||
rsource "hid/Kconfig"
|
||||
|
@ -7,6 +7,7 @@
|
||||
menuconfig KCONFIG_USEMODULE_USBUS_CDC_ACM
|
||||
bool "Configure USBUS CDC ACM"
|
||||
depends on USEMODULE_USBUS_CDC_ACM
|
||||
depends on KCONFIG_USEMODULE_USBUS
|
||||
help
|
||||
Configure the USBUS CDC ACM module via Kconfig.
|
||||
|
||||
@ -44,3 +45,18 @@ config USBUS_CDC_ACM_BULK_EP_SIZE_64
|
||||
endchoice
|
||||
|
||||
endif # KCONFIG_USEMODULE_USBUS_CDC_ACM
|
||||
|
||||
config MODULE_USBUS_CDC_ACM
|
||||
bool "USB CDC ACM support"
|
||||
depends on MODULE_USBUS
|
||||
select MODULE_TSRB
|
||||
|
||||
# extend STDIO options
|
||||
choice STDIO_IMPLEMENTATION
|
||||
|
||||
config MODULE_STDIO_CDC_ACM
|
||||
bool "CDC ACM"
|
||||
depends on MODULE_USBUS_CDC_ACM
|
||||
select MODULE_ISRPIPE
|
||||
|
||||
endchoice
|
||||
|
@ -7,6 +7,7 @@
|
||||
menuconfig KCONFIG_USEMODULE_USBUS_CDC_ECM
|
||||
bool "Configure USBUS CDC ECM"
|
||||
depends on USEMODULE_USBUS_CDC_ECM
|
||||
depends on KCONFIG_USEMODULE_USBUS
|
||||
help
|
||||
Configure the USBUS CDC ECM module via Kconfig.
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
menuconfig KCONFIG_USEMODULE_USBUS_DFU
|
||||
bool "Configure USBUS DFU"
|
||||
depends on USEMODULE_USBUS_DFU
|
||||
depends on KCONFIG_USEMODULE_USBUS
|
||||
help
|
||||
Configure the USBUS DFU module via Kconfig.
|
||||
|
||||
|
17
sys/usb/usbus/hid/Kconfig
Normal file
17
sys/usb/usbus/hid/Kconfig
Normal file
@ -0,0 +1,17 @@
|
||||
# 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.
|
||||
#
|
||||
|
||||
menuconfig MODULE_USBUS_HID
|
||||
bool "USB HID support"
|
||||
depends on TEST_KCONFIG
|
||||
depends on MODULE_USBUS
|
||||
select MODULE_ISRPIPE_READ_TIMEOUT
|
||||
|
||||
config USBUS_HID_INTERRUPT_EP_SIZE
|
||||
int "Interrupt endpoint size in bytes"
|
||||
default 64
|
||||
depends on MODULE_USBUS_HID
|
@ -1,6 +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_SX127X=y
|
||||
CONFIG_MODULE_SX1276=y
|
||||
|
||||
CONFIG_MODULE_OD=y
|
||||
|
Loading…
Reference in New Issue
Block a user