From 5bc436283de2d3a560412e2eee1bd5c0f9ee6331 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 20 Sep 2013 15:23:00 -0600 Subject: [PATCH] SAMA5 + HID Keyboard. Fixes to initialize the HID keyboard class --- configs/sama5d3x-ek/src/sam_usb.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/configs/sama5d3x-ek/src/sam_usb.c b/configs/sama5d3x-ek/src/sam_usb.c index 8c180ad05b..5efc5ad7e6 100644 --- a/configs/sama5d3x-ek/src/sam_usb.c +++ b/configs/sama5d3x-ek/src/sam_usb.c @@ -309,7 +309,9 @@ int sam_usbhost_initialize(void) int ret; /* First, register all of the class drivers needed to support the drivers - * that we care about: + * that we care about + * + * Register theUSB host Mass Storage Class: */ ret = usbhost_storageinit(); @@ -318,6 +320,22 @@ int sam_usbhost_initialize(void) udbg("ERROR: Failed to register the mass storage class: %d\n", ret); } + /* Register the USB host HID keyboard class driver */ + + ret = usbhost_kbdinit(); + if (ret != OK) + { + udbg("ERROR: Failed to register the KBD class\n"); + } + + /* Then get an instance of the USB host interface. + * + * REVISIT: This logic needs to be modified. There must be a call-out to + * platform specific logic to get the connection hangle. usbhost_initialize() + * is not longer common to all platforms and is no longer prototyped in + * include/nuttx/usb/usbhost.h. + */ + #ifdef CONFIG_SAMA5_OHCI /* Get an instance of the USB OHCI interface */