summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTinic Uro <[email protected]>2024-05-29 12:54:15 -0700
committerTinic Uro <[email protected]>2024-05-29 12:54:15 -0700
commit4938128cccd3a76907caf546eacee41e53b989e7 (patch)
tree399bb021dbc7cc387f222bfb516ef0e58e5baad5
parentd10b65ada4be7d5754b3128e80a9b4db72bdb23f (diff)
Make it compile for STM32U545.
-rw-r--r--src/portable/synopsys/dwc2/dwc2_stm32.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/portable/synopsys/dwc2/dwc2_stm32.h b/src/portable/synopsys/dwc2/dwc2_stm32.h
index 3237a50f6..9957976a5 100644
--- a/src/portable/synopsys/dwc2/dwc2_stm32.h
+++ b/src/portable/synopsys/dwc2/dwc2_stm32.h
@@ -89,6 +89,12 @@ extern "C" {
#define USB_OTG_FS_PERIPH_BASE USB_OTG_FS_BASE
#define EP_MAX_FS 6
#define EP_FIFO_SIZE_FS 1280
+ #define USB_OTG_FS_IRQN OTG_FS_IRQn
+ #elif defined(USB_DRD_FS)
+ #define USB_OTG_FS_PERIPH_BASE USB_DRD_BASE
+ #define EP_MAX_FS 6
+ #define EP_FIFO_SIZE_FS 1280
+ #define USB_OTG_FS_IRQN USB_IRQn
#else
#define USB_OTG_HS_PERIPH_BASE USB_OTG_HS_BASE
#define EP_MAX_HS 9
@@ -109,7 +115,7 @@ extern "C" {
// - Port0 to OTG_FS, and Port1 to OTG_HS
static const dwc2_controller_t _dwc2_controller[] = {
#ifdef USB_OTG_FS_PERIPH_BASE
- { .reg_base = USB_OTG_FS_PERIPH_BASE, .irqnum = OTG_FS_IRQn, .ep_count = EP_MAX_FS, .ep_fifo_size = EP_FIFO_SIZE_FS },
+ { .reg_base = USB_OTG_FS_PERIPH_BASE, .irqnum = USB_OTG_FS_IRQN, .ep_count = EP_MAX_FS, .ep_fifo_size = EP_FIFO_SIZE_FS },
#endif
#ifdef USB_OTG_HS_PERIPH_BASE