summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-06-06 13:25:48 +0700
committerhathach <[email protected]>2022-06-06 13:25:48 +0700
commit1b086729452c67e3e78a736506732ca013959572 (patch)
tree976ba139650e5643bf7aafb9e004ffa94fde3d0e
parent7187cd9a8528bfe2b570567ca2d0a2ae36b7c478 (diff)
more ci fix
-rw-r--r--hw/bsp/imxrt/family.c4
-rw-r--r--src/portable/synopsys/dwc2/dwc2_stm32.h5
2 files changed, 6 insertions, 3 deletions
diff --git a/hw/bsp/imxrt/family.c b/hw/bsp/imxrt/family.c
index e5f630108..fc6e9e266 100644
--- a/hw/bsp/imxrt/family.c
+++ b/hw/bsp/imxrt/family.c
@@ -34,13 +34,13 @@
#include "clock_config.h"
-#ifdef BOARD_TUD_RHPORT
+#if defined(BOARD_TUD_RHPORT) && CFG_TUD_ENABLED
#define PORT_SUPPORT_DEVICE(_n) (BOARD_TUD_RHPORT == _n)
#else
#define PORT_SUPPORT_DEVICE(_n) 0
#endif
-#ifdef BOARD_TUH_RHPORT
+#if defined(BOARD_TUH_RHPORT) && CFG_TUH_ENABLED
#define PORT_SUPPORT_HOST(_n) (BOARD_TUH_RHPORT == _n)
#else
#define PORT_SUPPORT_HOST(_n) 0
diff --git a/src/portable/synopsys/dwc2/dwc2_stm32.h b/src/portable/synopsys/dwc2/dwc2_stm32.h
index 709428f7f..b500ddc46 100644
--- a/src/portable/synopsys/dwc2/dwc2_stm32.h
+++ b/src/portable/synopsys/dwc2/dwc2_stm32.h
@@ -47,6 +47,7 @@
#include "stm32f4xx.h"
#define EP_MAX_FS USB_OTG_FS_MAX_IN_ENDPOINTS
#define EP_FIFO_SIZE_FS USB_OTG_FS_TOTAL_FIFO_SIZE
+
#define EP_MAX_HS USB_OTG_HS_MAX_IN_ENDPOINTS
#define EP_FIFO_SIZE_HS USB_OTG_HS_TOTAL_FIFO_SIZE
@@ -54,6 +55,7 @@
#include "stm32h7xx.h"
#define EP_MAX_FS 9
#define EP_FIFO_SIZE_FS 4096
+
#define EP_MAX_HS 9
#define EP_FIFO_SIZE_HS 4096
@@ -64,6 +66,7 @@
#include "stm32f7xx.h"
#define EP_MAX_FS 6
#define EP_FIFO_SIZE_FS 1280
+
#define EP_MAX_HS 9
#define EP_FIFO_SIZE_HS 4096
@@ -77,7 +80,7 @@
#endif
// OTG HS always has higher number of endpoints than FS
-#ifdef EP_MAX_HS
+#ifdef USB_OTG_HS_PERIPH_BASE
#define DWC2_EP_MAX EP_MAX_HS
#else
#define DWC2_EP_MAX EP_MAX_FS