Skip to content

Commit

Permalink
drivers: udc: add USB device controller driver skeleton
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jfischer-no committed May 10, 2023
1 parent 0724453 commit e1f89b0
Show file tree
Hide file tree
Showing 5 changed files with 447 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/udc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ zephyr_library()
zephyr_library_sources(udc_common.c)
zephyr_library_sources_ifdef(CONFIG_UDC_NRF udc_nrf.c)
zephyr_library_sources_ifdef(CONFIG_UDC_KINETIS udc_kinetis.c)
zephyr_library_sources_ifdef(CONFIG_UDC_SKELETON udc_skeleton.c)
zephyr_library_sources_ifdef(CONFIG_UDC_VIRTUAL udc_virtual.c)
1 change: 1 addition & 0 deletions drivers/usb/udc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ source "subsys/logging/Kconfig.template.log_config"

source "drivers/usb/udc/Kconfig.nrf"
source "drivers/usb/udc/Kconfig.kinetis"
source "drivers/usb/udc/Kconfig.skeleton"
source "drivers/usb/udc/Kconfig.virtual"

endif # UDC_DRIVER
23 changes: 23 additions & 0 deletions drivers/usb/udc/Kconfig.skeleton
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (c) 2023 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

config UDC_SKELETON
bool "Skeleton for an USB device controller driver"
default y
depends on DT_HAS_ZEPHYR_UDC_SKELETON_ENABLED
help
Skeleton for an USB device controller driver.

config UDC_SKELETON_STACK_SIZE
int "UDC controller driver internal thread stack size"
depends on UDC_SKELETON
default 512
help
Skeleton device controller driver internal thread stack size.

config UDC_SKELETON_THREAD_PRIORITY
int "Skeleton controller driver thread priority"
depends on UDC_SKELETON
default 8
help
Skeleton device controller driver thread priority.
Loading

0 comments on commit e1f89b0

Please sign in to comment.