mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
Merge pull request #19007 from gschorcht/pkg/tinyusb_stdio_kconfig
pkg/tinyusb: add Kconfig support for stdio_tinyusb_cdc_acm
This commit is contained in:
commit
b0da17b4ef
@ -1,5 +1,11 @@
|
||||
ifeq (,$(filter-out stdio_cdc_acm,$(filter stdio_% slipdev_stdio,$(USEMODULE))))
|
||||
# Use stdio_cdc_acm only if no other stdio is requested explicitly.
|
||||
USEMODULE += stdio_cdc_acm
|
||||
ifneq (,$(filter tinyusb_device,$(USEMODULE)))
|
||||
# Use stdio_tinyusb_cdc_acm only if no other stdio is requested explicitly
|
||||
# and tinyusb_device is used for any other reason
|
||||
USEMODULE += stdio_tinyusb_cdc_acm
|
||||
else
|
||||
# Use stdio_cdc_acm only if no other stdio is requested explicitly.
|
||||
USEMODULE += stdio_cdc_acm
|
||||
endif
|
||||
FEATURES_REQUIRED += highlevel_stdio
|
||||
endif
|
||||
|
@ -18,9 +18,6 @@ config BOARD_COMMON_WEACT_F4X1CX
|
||||
select HAS_PERIPH_USBDEV
|
||||
select HAS_HIGHLEVEL_STDIO
|
||||
|
||||
# Put other features for this board (in alphabetical order)
|
||||
select HAS_TINYUSB_DEVICE
|
||||
|
||||
# Clock configuration
|
||||
select BOARD_HAS_HSE
|
||||
select BOARD_HAS_LSE
|
||||
|
@ -12,8 +12,6 @@ FEATURES_PROVIDED += periph_usbdev
|
||||
|
||||
# Various other features (if any)
|
||||
FEATURES_PROVIDED += highlevel_stdio
|
||||
FEATURES_PROVIDED += tinyusb_device
|
||||
|
||||
|
||||
# This configuration enables modules that are only available when using Kconfig
|
||||
# module modelling
|
||||
|
@ -33,7 +33,7 @@ config BOARD_STM32F723E_DISCO
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
select HAVE_FT5X06
|
||||
select MODULE_PERIPH_UART_HW_FC if TEST_KCONFIG && HAS_PERIPH_UART_HW_FC
|
||||
select MODULE_PERIPH_UART_HW_FC if TEST_KCONFIG && HAS_PERIPH_UART_HW_FC && MODULE_PERIPH_UART
|
||||
# Workaround due to stdout only working with stdin enabled
|
||||
select MODULE_STDIN if TEST_KCONFIG
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
USEMODULE += periph_uart_hw_fc
|
||||
ifneq (,$(filter periph_uart,$(USEMODULE)))
|
||||
USEMODULE += periph_uart_hw_fc
|
||||
endif
|
||||
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_gpio
|
||||
|
@ -226,3 +226,5 @@ config TUSBD_USE_CUSTOM_DESC
|
||||
|
||||
endif # MODULE_TINYUSB_DEVICE
|
||||
endif # PACKAGE_TINYUSB
|
||||
|
||||
rsource "cdc_acm_stdio/Kconfig"
|
||||
|
@ -9,6 +9,7 @@ USEMODULE += tinyusb_hw
|
||||
DEFAULT_MODULE += auto_init_tinyusb
|
||||
|
||||
ifneq (,$(filter stdio_tinyusb_cdc_acm, $(USEMODULE)))
|
||||
USEMODULE += stdio_available
|
||||
USEMODULE += tinyusb_class_cdc
|
||||
USEMODULE += tinyusb_device
|
||||
endif
|
||||
|
18
pkg/tinyusb/cdc_acm_stdio/Kconfig
Normal file
18
pkg/tinyusb/cdc_acm_stdio/Kconfig
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2022 Gunar Schorcht
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# extend STDIO options
|
||||
|
||||
choice STDIO_IMPLEMENTATION
|
||||
|
||||
config MODULE_STDIO_TINYUSB_CDC_ACM
|
||||
bool "CDC ACM (tinyUSB)"
|
||||
depends on MODULE_TINYUSB_DEVICE
|
||||
select MODULE_STDIO_AVAILABLE
|
||||
select MODULE_TINYUSB_CLASS_CDC
|
||||
|
||||
endchoice
|
@ -56,7 +56,7 @@ choice STDIO_IMPLEMENTATION
|
||||
|
||||
config MODULE_STDIO_CDC_ACM
|
||||
bool "CDC ACM"
|
||||
depends on MODULE_USBUS_CDC_ACM
|
||||
depends on MODULE_USBUS_CDC_ACM && !MODULE_TINYUSB_DEVICE
|
||||
select MODULE_ISRPIPE
|
||||
select MODULE_STDIO_AVAILABLE
|
||||
|
||||
|
5
tests/pkg_tinyusb_cdc_acm_stdio/app.config.test
Normal file
5
tests/pkg_tinyusb_cdc_acm_stdio/app.config.test
Normal file
@ -0,0 +1,5 @@
|
||||
CONFIG_PACKAGE_TINYUSB=y
|
||||
CONFIG_MODULE_STDIO_TINYUSB_CDC_ACM=y
|
||||
CONFIG_MODULE_SHELL=y
|
||||
CONFIG_MODULE_SHELL_CMDS_DEFAULT=y
|
||||
CONFIG_MODULE_PS=y
|
Loading…
Reference in New Issue
Block a user