Skip to content

Commit 3d23c44

Browse files
committed
chore(U0): support USB device
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 92dbb3f commit 3d23c44

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libraries/SrcWrapper/inc/stm32_def.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@
9494
#define RCC_CR_HSIDY_Pos RCC_CR_HSIRDY_Pos
9595
#endif
9696

97-
/* STM32G0xx and some STM32U5xx defined USB_DRD_FS */
97+
/* STM32G0xx, STM32U0xx and some STM32U5xx defined USB_DRD_FS */
9898
#if !defined(USB) && defined(USB_DRD_FS)
9999
#define USB USB_DRD_FS
100100
#define PinMap_USB PinMap_USB_DRD_FS
101-
#if defined(STM32H5xx) || defined(STM32U5xx)
101+
#if defined(STM32H5xx) || defined(STM32U0xx) || defined(STM32U5xx)
102102
#define USB_BASE USB_DRD_BASE
103103
#if !defined(__HAL_RCC_USB_CLK_ENABLE)
104104
#define __HAL_RCC_USB_CLK_ENABLE __HAL_RCC_USB_FS_CLK_ENABLE

libraries/USBDevice/inc/usbd_conf.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ extern "C" {
7474
#elif defined(STM32G0xx)
7575
#define USB_IRQn USB_UCPD1_2_IRQn
7676
#define USB_IRQHandler USB_UCPD1_2_IRQHandler
77-
#elif defined(STM32H5xx)
77+
#elif defined(STM32H5xx) || defined(STM32U0xx)
7878
#define USB_IRQn USB_DRD_FS_IRQn
7979
#define USB_IRQHandler USB_DRD_FS_IRQHandler
8080
#elif defined(STM32U5xx) && !defined(USB_DRD_FS)

0 commit comments

Comments
 (0)