Basic HID keyboard funcionality. More testing is needed

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3260 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-01-19 04:17:45 +00:00
parent 09107aa9ff
commit f389facd71
4 changed files with 286 additions and 99 deletions
+4 -3
View File
@@ -1423,13 +1423,14 @@
* include/nuttx/usb -- rename usb_storage.h to storage.h.
* arch/arm/src/lpc17xx/lpc17_usbhost.c -- Add support for low-speed devices.
* drivers/usbhost/usbhost_skeleton.c -- Template for new class drivers
* include/nuttx/usb/hid.h and drivers/usbhost/usbhost_hidkbd.c -- Initial
files for HID keyboard support. These are mostly empty files on the
initial checkin.
* include/nuttx/usb/hid.h and drivers/usbhost/usbhost_hidkbd.c -- New
files for HID keyboard support.
* arch/arm/src/lpc17xx/lpc17_usbhost.c -- Will now handle multiple
concurrent transfers on different endpoints (still only one TD per
endpoint). All methods are protected from re-entrancy; lots of re-
structuring in preparation for interrupt endpoint support.
* arch/arm/src/lpc17xx/lpc17_usbhost.c -- Add support for periodic
interrupt transfers.
* examples/hidkbd - Added a simple test for the USB host HID keyboard
class driver.
* configs/olimex-lpc1766stk/hidkbd - Added a configuration to build the
+14 -13
View File
@@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
<p>Last Updated: January 15, 2011</p>
<p>Last Updated: January 18, 2011</p>
</td>
</tr>
</table>
@@ -547,7 +547,7 @@
<td><br></td>
<td>
<p>
<li>Device-dependent USB class drivers available for USB mass storage.</li>
<li>Device-dependent USB class drivers available for USB mass storage and HID keyboard.</li>
</p>
</tr>
@@ -2104,17 +2104,18 @@ nuttx-5.17 2011-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
* include/nuttx/usb -- rename usb_storage.h to storage.h.
* arch/arm/src/lpc17xx/lpc17_usbhost.c -- Add support for low-speed devices.
* drivers/usbhost/usbhost_skeleton.c -- Template for new class drivers
* include/nuttx/usb/hid.h and drivers/usbhost/usbhost_hidkbd.c -- Initial
files for HID keyboard support. These are mostly empty files on the
initial checkin.
* arch/arm/src/lpc17xx/lpc17_usbhost.c -- Will now handle multiple
concurrent transfers on different endpoints (still only one TD per
endpoint). All methods are protected from re-entrancy; lots of re-
structuring in preparation for interrupt endpoint support.
* examples/hidkbd - Added a simple test for the USB host HID keyboard
class driver.
* configs/olimex-lpc1766stk/hidkbd - Added a configuration to build the
USB host HID keyboard class driver test for the LPC17xx.
* include/nuttx/usb/hid.h and drivers/usbhost/usbhost_hidkbd.c -- New
files for HID keyboard support.
* arch/arm/src/lpc17xx/lpc17_usbhost.c -- Will now handle multiple
concurrent transfers on different endpoints (still only one TD per
endpoint). All methods are protected from re-entrancy; lots of re-
structuring in preparation for interrupt endpoint support.
* arch/arm/src/lpc17xx/lpc17_usbhost.c -- Add support for periodic
interrupt transfers.
* examples/hidkbd - Added a simple test for the USB host HID keyboard
class driver.
* configs/olimex-lpc1766stk/hidkbd - Added a configuration to build the
USB host HID keyboard class driver test for the LPC17xx.
pascal-2.1 2010-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
File diff suppressed because it is too large Load Diff
+4 -2
View File
@@ -46,6 +46,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <sched.h>
#include <errno.h>
#include <nuttx/usb/usbhost.h>
@@ -200,10 +201,11 @@ int user_start(int argc, char *argv[])
do
{
printf("Opening device %s\n", CONFIG_EXAMPLES_HIDKBD_DEVNAME);
fflush(stdout);
fd = open(CONFIG_EXAMPLES_HIDKBD_DEVNAME, O_RDONLY);
if (fd < 0)
{
printf("Failed: %d\n", errno);
fflush(stdout);
sleep(3);
}
}
@@ -228,7 +230,7 @@ int user_start(int argc, char *argv[])
}
while (nbytes >= 0);
printf("Closing device %s\n", CONFIG_EXAMPLES_HIDKBD_DEVNAME);
printf("Closing device %s: %d\n", CONFIG_EXAMPLES_HIDKBD_DEVNAME, (int)nbytes);
fflush(stdout);
close(fd);
}