zephyr/subsys/usb/device_next/Kconfig
Johann Fischer 7ffa6203e1 usb: device_next: allow CDC ACM UART to be initialized and enabled at boot
There are some boards and samples in the tree that use the CDC ACM UART
as the default serial backend, just like a real UART controller would.
The new device stack requires more detailed configuration than the old
one. In order to use the CDC ACM UART as the serial backend with the new
device stack in the same way as with the legacy stack, we need to
provide a solution to initialise and enable the CDC ACM UART at boot
time. We cannot use snippets as they do not support Kconfig files or
source code. Shields would be an option, but they cannot be used for
virtual devices such as the CDC ACM UART. The remaining solution is to
put the code and Kconfig file for it in the subsys directory.

Allow CDC ACM UART instance and USB device stack to be initialized and
enabled at boot time and to use it as serial backend for logging or
shell.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-12 02:22:18 +01:00

62 lines
1.4 KiB
Plaintext

# Copyright (c) 2022 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: Apache-2.0
menuconfig USB_DEVICE_STACK_NEXT
bool "New USB device stack [EXPERIMENTAL]"
select EXPERIMENTAL
select UDC_DRIVER
imply HWINFO
help
New experimental USB device stack.
if USB_DEVICE_STACK_NEXT
module = USBD
module-str = usbd
source "subsys/logging/Kconfig.template.log_config"
config USBD_SHELL
bool "USB device shell"
depends on SHELL
help
Enable USB device shell.
config USBD_THREAD_INIT_PRIO
int
default 90
help
USB device thread initialization priority level.
config USBD_THREAD_STACK_SIZE
int "USB device stack thread stack size"
default 1024
help
USB device stack thread stack size in bytes.
config USBD_MAX_UDC_MSG
int "Maximum number of UDC events"
default 10
help
Maximum number of USB device controller events that can be queued.
config USBD_MSG_SLAB_COUNT
int "Maximum number of USB device notification messages"
range 4 64
default 8
help
Maximum number of USB device notification messages that can be queued.
config USBD_MSG_WORK_DELAY
int "USB device notification messages work delay"
range 1 100
default 1
help
Message work may need to be delayed because the device stack is not
yet ready to publish the message. The delay unit is milliseconds.
rsource "class/Kconfig"
rsource "app/Kconfig.cdc_acm_serial"
endif # USB_DEVICE_STACK_NEXT