usb: device_next: add experimental CDC ACM implementation

Add experimental CDC ACM implementation for new USB device stack.
It currently implements only UART IRQ API support and is WIP.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
Johann Fischer 2022-10-10 18:02:36 +02:00 committed by Carles Cufí
commit fcd21f10d5
4 changed files with 1166 additions and 0 deletions

View file

@ -26,4 +26,9 @@ zephyr_library_sources_ifdef(
class/loopback.c
)
zephyr_library_sources_ifdef(
CONFIG_USBD_CDC_ACM_CLASS
class/usbd_cdc_acm.c
)
zephyr_linker_sources(DATA_SECTIONS usbd_data.ld)

View file

@ -3,3 +3,4 @@
# SPDX-License-Identifier: Apache-2.0
rsource "Kconfig.loopback"
rsource "Kconfig.cdc_acm"

View file

@ -0,0 +1,29 @@
# Copyright (c) 2022 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: Apache-2.0
config USBD_CDC_ACM_CLASS
bool "USB CDC ACM implementation [EXPERIMENTAL]"
depends on SERIAL
depends on DT_HAS_ZEPHYR_CDC_ACM_UART_ENABLED
select SERIAL_HAS_DRIVER
select SERIAL_SUPPORT_INTERRUPT
select RING_BUFFER
select UART_INTERRUPT_DRIVEN
help
USB device CDC ACM class implementation.
if USBD_CDC_ACM_CLASS
config USBD_CDC_ACM_STACK_SIZE
int "USB CDC ACM workqueue stack size"
default 1024
help
USB CDC ACM workqueue stack size.
module = USBD_CDC_ACM
module-str = usbd cdc_acm
default-count = 1
source "subsys/logging/Kconfig.template.log_config"
endif

File diff suppressed because it is too large Load diff