From 7a48b1f0d191093caa59c4fcb5c4f85fa2e53323 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 13 Sep 2022 11:04:48 +0700 Subject: [PATCH] re-added code in pr 1438 to fix compile with h7 with 1 usb otg --- src/portable/synopsys/dwc2/dwc2_stm32.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/portable/synopsys/dwc2/dwc2_stm32.h b/src/portable/synopsys/dwc2/dwc2_stm32.h index 1187e0d6e..337f611d8 100644 --- a/src/portable/synopsys/dwc2/dwc2_stm32.h +++ b/src/portable/synopsys/dwc2/dwc2_stm32.h @@ -64,6 +64,10 @@ // NOTE: H7 with only 1 USB port: H72x / H73x / H7Ax / H7Bx // USB_OTG_FS_PERIPH_BASE and OTG_FS_IRQn not defined + #if (! defined USB2_OTG_FS) + #define USB_OTG_FS_PERIPH_BASE USB1_OTG_HS_PERIPH_BASE + #define OTG_FS_IRQn OTG_HS_IRQn + #endif #elif CFG_TUSB_MCU == OPT_MCU_STM32F7 #include "stm32f7xx.h"