zephyr/subsys/usb/device_next/Kconfig
Johann Fischer 6ea06038d9 usb: device_next: allow message callback to be executed from USBD thread
Allowing message callback execution from the USBD thread saves about 800
bytes. For small devices, the option can be useful to reduce flash/RAM
usage, those with enough resources should not bother about it.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-03 14:48:29 +01:00

103 lines
2.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"
choice USBD_MAX_SPEED_CHOICE
prompt "Max supported connection speed"
default USBD_MAX_SPEED_HIGH if UDC_DRIVER_HAS_HIGH_SPEED_SUPPORT
default USBD_MAX_SPEED_FULL
config USBD_MAX_SPEED_HIGH
bool "High-Speed"
depends on UDC_DRIVER_HAS_HIGH_SPEED_SUPPORT
config USBD_MAX_SPEED_FULL
bool "Full-Speed"
depends on !UDC_DRIVER_HIGH_SPEED_SUPPORT_ENABLED
endchoice
config USBD_MAX_SPEED
int
default 0 if USBD_MAX_SPEED_FULL
default 1 if USBD_MAX_SPEED_HIGH
config USBD_BOS_SUPPORT
bool "USB device BOS support"
default y
help
BOS support can be disabled if the application does not use a BOS
descriptor.
config USBD_VREQ_SUPPORT
bool "USB device vendor request support"
default y
help
Allow the application to register a handler for the vendor request
with the recipient device.
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_DEFERRED_MODE
bool "Execute message callback from system workqueue"
default y
help
Execute message callback from system workqueue. If disabled, message
callback will be executed in the device stack context.
config USBD_MSG_WORK_DELAY
int "USB device notification messages work delay" if USBD_MSG_DEFERRED_MODE
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