This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#10116 - USB HID class driver
Attached to Project:
Rockbox
Opened by Tomer Shalev (tomers) - Thursday, 09 April 2009, 20:27 GMT+2
Last edited by Frank Gevaerts (fg) - Sunday, 19 April 2009, 23:18 GMT+2
Opened by Tomer Shalev (tomers) - Thursday, 09 April 2009, 20:27 GMT+2
Last edited by Frank Gevaerts (fg) - Sunday, 19 April 2009, 23:18 GMT+2
|
DetailsThis is part of GSoC 2009.
The first stage is an admission assignment to create a skeleton for a new USB class driver. The final mission is to create a working HID class driver, which make it possible for the DAP to be registered as a sort of keypad, so that pressing the DAP's keys will send key click event to the OS (Volume Up/Down, Mute, etc.) |
This task depends upon
FS#10142 - Sync firmware/export/usb_ch9.h with Linux's ch9.h
FS#10144 - USB header files cosmetics
View Dependency Graph
View Dependency Graph
Closed by Frank Gevaerts (fg)
Sunday, 19 April 2009, 23:18 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed as r20750
Sunday, 19 April 2009, 23:18 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed as r20750
When the DAP connects to a Windows host, it is recognized as a USB Composite Device, which is composed of both Mass Storage device and Human Interface Device.
This work is done as part of GSoC project that I have enrolled for.
Todo:
* Implement sending keystrokes (Volume Up/Down when scrolling the scrollwheel).
* Extract USB class drivers outside rockbox binary (plugin like).
Notice: The patch is still 'dirty'. It's 2:30am, and I'm a bit tired. I'll post a cleaner patch soon.
* reorganisation of usb_core.c
* some cleanup of usb_storage.c and usb_serial.c
* the hid implementation
I think it would be useful for ease of reviewing if those were in separate patches.
Since this is a first "dirty" patch, I don't think it makes much sense for me to go through it in detail yet
Agreed, of course.
I've created the first patch in the series:
FS#10142- Sync firmware/export/usb_ch9.h with Linux's ch9.hI am currently not able to commit it, of course, and also I am not able to make these FS items dependent on each other. Please do so.
FS#10144- USB header files cosmetics.Real code will follow soon...
Have you changed anything from the original patch, besides removing the changes that were already included in the tree?
Tomer
To use it, uncomment USB_HID define in firmware/export/usb_core.h
The class does nothing more than merely enumerating. Still there's HID functionality to implement, such as volume and playback control.
To the commiter (gevaerts): Please close this task once this patch is committed. Later additions to the HID class driver will be done in a separate FS item.