From 44e0a837a89c6872a9b413c4171a01c4a2595730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=81yszczek?= Date: Wed, 17 Aug 2016 20:20:15 +0200 Subject: [PATCH] Add usb mouse and hub support --- configs/stm32butterfly2/src/stm32_usbhost.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/configs/stm32butterfly2/src/stm32_usbhost.c b/configs/stm32butterfly2/src/stm32_usbhost.c index aff168ac91..6bbefec07d 100644 --- a/configs/stm32butterfly2/src/stm32_usbhost.c +++ b/configs/stm32butterfly2/src/stm32_usbhost.c @@ -127,10 +127,23 @@ int stm32_usbhost_initialize(void) #ifdef CONFIG_USBHOST_HIDKBD if ((rv = usbhost_kbdinit()) < 0) { - uerr("ERROR: Failed to register the KBD class\n"); + uerr("ERROR: Failed to register the KBD class: %d\n", rv); } #endif +#ifdef CONFIG_USBHOST_HIDMOUSE + if ((rv = usbhost_mouse_init()) < 0) + { + uerr("ERROR: Failed to register the mouse class: %d\n", rv); + } +#endif + +#ifdef CONFIG_USBHOST_HUB + if ((rv = usbhost_hub_initialize()) < 0) + { + uerr("ERROR: Failed to register hub class: %d\n", rv); + } +#endif if ((g_usbconn = stm32_otgfshost_initialize(0))) {