mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
STM32F4-Discover: Add missing logic to register the hub class
This commit is contained in:
@@ -166,8 +166,8 @@ void stm32_usbinitialize(void)
|
|||||||
int stm32_usbhost_initialize(void)
|
int stm32_usbhost_initialize(void)
|
||||||
{
|
{
|
||||||
int pid;
|
int pid;
|
||||||
#if defined(CONFIG_USBHOST_MSC) || defined(CONFIG_USBHOST_HIDKBD) || \
|
#if defined(CONFIG_USBHOST_HUB) || defined(CONFIG_USBHOST_MSC) || \
|
||||||
defined(CONFIG_USBHOST_HIDMOUSE)
|
defined(CONFIG_USBHOST_HIDKBD) || defined(CONFIG_USBHOST_HIDMOUSE)
|
||||||
int ret;
|
int ret;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -177,7 +177,19 @@ int stm32_usbhost_initialize(void)
|
|||||||
|
|
||||||
uvdbg("Register class drivers\n");
|
uvdbg("Register class drivers\n");
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_HUB
|
||||||
|
/* Initialize USB hub class support */
|
||||||
|
|
||||||
|
ret = usbhost_hub_initialize();
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
udbg("ERROR: usbhost_hub_initialize failed: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_USBHOST_MSC
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
|
/* Initialize the mass storage class */
|
||||||
|
|
||||||
ret = usbhost_storageinit();
|
ret = usbhost_storageinit();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
@@ -186,6 +198,8 @@ int stm32_usbhost_initialize(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_USBHOST_HIDKBD
|
#ifdef CONFIG_USBHOST_HIDKBD
|
||||||
|
/* Initialize the HID keyboard class */
|
||||||
|
|
||||||
ret = usbhost_kbdinit();
|
ret = usbhost_kbdinit();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
@@ -194,6 +208,8 @@ int stm32_usbhost_initialize(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_USBHOST_HIDMOUSE
|
#ifdef CONFIG_USBHOST_HIDMOUSE
|
||||||
|
/* Initialize the HID mouse class */
|
||||||
|
|
||||||
ret = usbhost_mouse_init();
|
ret = usbhost_mouse_init();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user