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:
parent
f5ef4c4288
commit
fcd21f10d5
4 changed files with 1166 additions and 0 deletions
|
@ -26,4 +26,9 @@ zephyr_library_sources_ifdef(
|
||||||
class/loopback.c
|
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)
|
zephyr_linker_sources(DATA_SECTIONS usbd_data.ld)
|
||||||
|
|
|
@ -3,3 +3,4 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
rsource "Kconfig.loopback"
|
rsource "Kconfig.loopback"
|
||||||
|
rsource "Kconfig.cdc_acm"
|
||||||
|
|
29
subsys/usb/device_next/class/Kconfig.cdc_acm
Normal file
29
subsys/usb/device_next/class/Kconfig.cdc_acm
Normal 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
|
1131
subsys/usb/device_next/class/usbd_cdc_acm.c
Normal file
1131
subsys/usb/device_next/class/usbd_cdc_acm.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue