mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +08:00
arch/arm/src/stm32h5/stm32_usbdrdhost.c: Fixed Hub support
Fixed a few bugs in the initial stm32_usbdrdhost.c implementation when using a USB hub. Fixed fault when freeing control endpoints. Fixed crash when disconnecting devices from hubs due ot use after free. Signed-off-by: daniellizewski <daniellizewski@geotab.com>
This commit is contained in:
committed by
Xiang Xiao
parent
3e570aa219
commit
1632beaede
@@ -54,4 +54,5 @@ CONFIG_STM32H5_USE_HSE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_USART3_SERIAL_CONSOLE=y
|
||||
CONFIG_USBHOST_HUB=y
|
||||
CONFIG_USBHOST_MSC=y
|
||||
|
||||
@@ -151,6 +151,16 @@ int stm32_usbhost_initialize(void)
|
||||
|
||||
uinfo("Register class drivers\n");
|
||||
|
||||
#ifdef CONFIG_USBHOST_HUB
|
||||
/* Initialize USB hub class support */
|
||||
|
||||
ret = usbhost_hub_initialize();
|
||||
if (ret < 0)
|
||||
{
|
||||
uerr("ERROR: usbhost_hub_initialize failed: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USBHOST_MSC
|
||||
/* Register the USB mass storage class class */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user