Skip to content

Commit

Permalink
drivers: usb: udc: add STM32 UDC driver
Browse files Browse the repository at this point in the history
Add UDC driver for STM32 based MCU, relying on HAL/PCD.

Signed-off-by: Loic Poulain <[email protected]>
  • Loading branch information
Loic Poulain committed Jan 1, 2023
1 parent 217987f commit 90f2f84
Show file tree
Hide file tree
Showing 4 changed files with 479 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 @@ -7,3 +7,4 @@ 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_VIRTUAL udc_virtual.c)
zephyr_library_sources_ifdef(CONFIG_UDC_STM32 udc_stm32.c)
1 change: 1 addition & 0 deletions drivers/usb/udc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ source "subsys/logging/Kconfig.template.log_config"
source "drivers/usb/udc/Kconfig.nrf"
source "drivers/usb/udc/Kconfig.kinetis"
source "drivers/usb/udc/Kconfig.virtual"
source "drivers/usb/udc/Kconfig.stm32"

endif # UDC_DRIVER
12 changes: 12 additions & 0 deletions drivers/usb/udc/Kconfig.stm32
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (c) 2022 Linaro Limited
# SPDX-License-Identifier: Apache-2.0

config UDC_STM32
bool "STM32 USB device controller driver"
imply UDC_WORKQUEUE
select USE_STM32_LL_USB
select USE_STM32_HAL_PCD
select USE_STM32_HAL_PCD_EX
default y
help
STM32 USB device controller driver.
Loading

0 comments on commit 90f2f84

Please sign in to comment.