From 390e24fbe57c3b7c0afc1e39206272d2f9d956bc Mon Sep 17 00:00:00 2001 From: sakumisu <1203593632@qq.com> Date: Mon, 15 Jul 2024 18:08:24 +0800 Subject: [PATCH] fix typo --- platform/rtthread/usb_check.c | 4 ++-- port/dwc2/usb_hc_dwc2.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/platform/rtthread/usb_check.c b/platform/rtthread/usb_check.c index d4baf03e..de0d4802 100644 --- a/platform/rtthread/usb_check.c +++ b/platform/rtthread/usb_check.c @@ -7,11 +7,11 @@ #endif #if IDLE_THREAD_STACK_SIZE < 2048 -#error "IDLE_THREAD_STACK_SIZE must be greater than 2048" +#error "IDLE_THREAD_STACK_SIZE must be greater than or equal to 2048" #endif #if RT_TIMER_THREAD_STACK_SIZE < 2048 -#error "RT_TIMER_THREAD_STACK_SIZE must be greater than 2048" +#error "RT_TIMER_THREAD_STACK_SIZE must be greater than or equal to 2048" #endif #endif diff --git a/port/dwc2/usb_hc_dwc2.c b/port/dwc2/usb_hc_dwc2.c index ddcbaf28..6e39b574 100644 --- a/port/dwc2/usb_hc_dwc2.c +++ b/port/dwc2/usb_hc_dwc2.c @@ -627,6 +627,7 @@ int usbh_roothub_control(struct usbh_bus *bus, struct usb_setup_packet *setup, u case HUB_PORT_FEATURE_C_SUSPEND: break; case HUB_PORT_FEATURE_POWER: + dwc2_drivebus(bus, 0); break; case HUB_PORT_FEATURE_C_CONNECTION: g_dwc2_hcd[bus->hcd.hcd_id].port_csc = 0; @@ -652,7 +653,7 @@ int usbh_roothub_control(struct usbh_bus *bus, struct usb_setup_packet *setup, u case HUB_PORT_FEATURE_SUSPEND: break; case HUB_PORT_FEATURE_POWER: - USB_OTG_HPRT &= ~USB_OTG_HPRT_PPWR; + dwc2_drivebus(bus, 1); break; case HUB_PORT_FEATURE_RESET: usbh_reset_port(bus, port);