This commit is contained in:
sakumisu 2024-07-15 18:08:24 +08:00
parent ba02a48873
commit 390e24fbe5
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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);