summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguo <[email protected]>2021-10-19 15:22:14 +0800
committerGitHub <[email protected]>2021-10-19 15:22:14 +0800
commita03846edf22c5213a769ca36adce9b01fd1dc92a (patch)
tree23ab079a115a01b93083648d0a71abaf5a4d96a1
parent06efd7ccf290dbe200e08a57b8de781109520f11 (diff)
parenta0bdbab7c33ae445b410a4df7bdbe638aa035465 (diff)
Merge pull request #5206 from liukangcc/hal
[update] Fix STM32 USB driver matching hal library version
-rw-r--r--bsp/stm32/libraries/HAL_Drivers/drv_usbd.c2
-rw-r--r--bsp/stm32/stm32f412-st-nucleo/board/.ignore_format.yml6
-rw-r--r--bsp/stm32/stm32f412-st-nucleo/board/CubeMX_Config/Src/main.c2
-rw-r--r--bsp/stm32/stm32f767-st-nucleo/board/.ignore_format.yml6
-rw-r--r--bsp/stm32/stm32f767-st-nucleo/board/CubeMX_Config/Src/main.c2
5 files changed, 15 insertions, 3 deletions
diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_usbd.c b/bsp/stm32/libraries/HAL_Drivers/drv_usbd.c
index d0cb54ef0c..9c29966ed0 100644
--- a/bsp/stm32/libraries/HAL_Drivers/drv_usbd.c
+++ b/bsp/stm32/libraries/HAL_Drivers/drv_usbd.c
@@ -200,7 +200,7 @@ static rt_err_t _init(rt_device_t device)
memset(&pcd->Init, 0, sizeof pcd->Init);
pcd->Init.dev_endpoints = 8;
pcd->Init.speed = USBD_PCD_SPEED;
- pcd->Init.ep0_mps = DEP0CTL_MPS_64;
+ pcd->Init.ep0_mps = EP_MPS_64;
#if !defined(SOC_SERIES_STM32F1)
pcd->Init.phy_itface = USBD_PCD_PHY_MODULE;
#endif
diff --git a/bsp/stm32/stm32f412-st-nucleo/board/.ignore_format.yml b/bsp/stm32/stm32f412-st-nucleo/board/.ignore_format.yml
new file mode 100644
index 0000000000..0d7f3e360c
--- /dev/null
+++ b/bsp/stm32/stm32f412-st-nucleo/board/.ignore_format.yml
@@ -0,0 +1,6 @@
+# files format check exclude path, please follow the instructions below to modify;
+# If you need to exclude an entire folder, add the folder path in dir_path;
+# If you need to exclude a file, add the path to the file in file_path.
+
+dir_path:
+- CubeMX_Config
diff --git a/bsp/stm32/stm32f412-st-nucleo/board/CubeMX_Config/Src/main.c b/bsp/stm32/stm32f412-st-nucleo/board/CubeMX_Config/Src/main.c
index 5db22b0cc4..a704e01e3b 100644
--- a/bsp/stm32/stm32f412-st-nucleo/board/CubeMX_Config/Src/main.c
+++ b/bsp/stm32/stm32f412-st-nucleo/board/CubeMX_Config/Src/main.c
@@ -231,7 +231,7 @@ static void MX_USB_OTG_FS_PCD_Init(void)
hpcd_USB_OTG_FS.Init.dev_endpoints = 6;
hpcd_USB_OTG_FS.Init.speed = PCD_SPEED_FULL;
hpcd_USB_OTG_FS.Init.dma_enable = DISABLE;
- hpcd_USB_OTG_FS.Init.ep0_mps = DEP0CTL_MPS_64;
+ hpcd_USB_OTG_FS.Init.ep0_mps = EP_MPS_64;
hpcd_USB_OTG_FS.Init.phy_itface = PCD_PHY_EMBEDDED;
hpcd_USB_OTG_FS.Init.Sof_enable = DISABLE;
hpcd_USB_OTG_FS.Init.low_power_enable = DISABLE;
diff --git a/bsp/stm32/stm32f767-st-nucleo/board/.ignore_format.yml b/bsp/stm32/stm32f767-st-nucleo/board/.ignore_format.yml
new file mode 100644
index 0000000000..0d7f3e360c
--- /dev/null
+++ b/bsp/stm32/stm32f767-st-nucleo/board/.ignore_format.yml
@@ -0,0 +1,6 @@
+# files format check exclude path, please follow the instructions below to modify;
+# If you need to exclude an entire folder, add the folder path in dir_path;
+# If you need to exclude a file, add the path to the file in file_path.
+
+dir_path:
+- CubeMX_Config
diff --git a/bsp/stm32/stm32f767-st-nucleo/board/CubeMX_Config/Src/main.c b/bsp/stm32/stm32f767-st-nucleo/board/CubeMX_Config/Src/main.c
index e29ee4ef7a..efb80b8ff2 100644
--- a/bsp/stm32/stm32f767-st-nucleo/board/CubeMX_Config/Src/main.c
+++ b/bsp/stm32/stm32f767-st-nucleo/board/CubeMX_Config/Src/main.c
@@ -292,7 +292,7 @@ static void MX_USB_OTG_FS_PCD_Init(void)
hpcd_USB_OTG_FS.Init.dev_endpoints = 6;
hpcd_USB_OTG_FS.Init.speed = PCD_SPEED_FULL;
hpcd_USB_OTG_FS.Init.dma_enable = DISABLE;
- hpcd_USB_OTG_FS.Init.ep0_mps = DEP0CTL_MPS_64;
+ hpcd_USB_OTG_FS.Init.ep0_mps = EP_MPS_64;
hpcd_USB_OTG_FS.Init.phy_itface = PCD_PHY_EMBEDDED;
hpcd_USB_OTG_FS.Init.Sof_enable = ENABLE;
hpcd_USB_OTG_FS.Init.low_power_enable = DISABLE;