Skip to content

Commit 1a30cd8

Browse files
jfischer-nocarlescufi
authored andcommitted
drivers: udc: add USB device controller driver skeleton
Add a USB device controller driver skeleton to use as a starting point for implementing a specific driver. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
1 parent 7ba5ecf commit 1a30cd8

File tree

5 files changed

+447
-0
lines changed

5 files changed

+447
-0
lines changed

drivers/usb/udc/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ zephyr_library()
66
zephyr_library_sources(udc_common.c)
77
zephyr_library_sources_ifdef(CONFIG_UDC_NRF udc_nrf.c)
88
zephyr_library_sources_ifdef(CONFIG_UDC_KINETIS udc_kinetis.c)
9+
zephyr_library_sources_ifdef(CONFIG_UDC_SKELETON udc_skeleton.c)
910
zephyr_library_sources_ifdef(CONFIG_UDC_VIRTUAL udc_virtual.c)

drivers/usb/udc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ source "subsys/logging/Kconfig.template.log_config"
4949

5050
source "drivers/usb/udc/Kconfig.nrf"
5151
source "drivers/usb/udc/Kconfig.kinetis"
52+
source "drivers/usb/udc/Kconfig.skeleton"
5253
source "drivers/usb/udc/Kconfig.virtual"
5354

5455
endif # UDC_DRIVER

drivers/usb/udc/Kconfig.skeleton

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (c) 2023 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config UDC_SKELETON
5+
bool "Skeleton for an USB device controller driver"
6+
default y
7+
depends on DT_HAS_ZEPHYR_UDC_SKELETON_ENABLED
8+
help
9+
Skeleton for an USB device controller driver.
10+
11+
config UDC_SKELETON_STACK_SIZE
12+
int "UDC controller driver internal thread stack size"
13+
depends on UDC_SKELETON
14+
default 512
15+
help
16+
Skeleton device controller driver internal thread stack size.
17+
18+
config UDC_SKELETON_THREAD_PRIORITY
19+
int "Skeleton controller driver thread priority"
20+
depends on UDC_SKELETON
21+
default 8
22+
help
23+
Skeleton device controller driver thread priority.

0 commit comments

Comments
 (0)