• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Drivers
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Version 3.2
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by tomers - 2009-04-09
Last edited by fg - 2009-04-19

FS#10116 - USB HID class driver

This 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.)

The task depends upon
ID Project Summary Priority Severity Assigned To Progress
10142 Rockbox  FS#10142 - Sync firmware/export/usb_ch9.h with Linux's ch9.h  Very Low Low
10144 Rockbox  FS#10144 - USB header files cosmetics  Very Low Low
Closed by  fg
2009-04-19 21:18
Reason for closing:  Accepted
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Committed as r20750

The attached patch is a working HID class driver for Sansa-E200V1 (should work on other targets too).
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.

* 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.

fg commented on 2009-04-17 23:45

Nice! I'll have a close look at it soon, but I need to sleep first as well :)

fg commented on 2009-04-18 14:30

It looks like you have several more or less independent parts in this patch :
* 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

I think it would be useful for ease of reviewing if those were in separate patches.

Agreed, of course.

I've created the first patch in the series:
 FS#10142  - Sync firmware/export/usb_ch9.h with Linux's ch9.h

I 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.

Added:  FS#10144  - USB header files cosmetics.
Real code will follow soon…

This is a cleaned version of the patch (works on the Onda VX747 too).

mcuelenaere: Today I am about to commit (with the help of gevaerts) the rest of the patch, so I hope you did not wasted too much time on it.

Have you changed anything from the original patch, besides removing the changes that were already included in the tree?


No, I haven't changed anything; I just left out the irrelevant changes.

This patch is ready to commit. It compiles fine, and the HID class driver enumerates well on Windows Vista. tested on Sansa e200v1.

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.


Available keyboard shortcuts


Task Details

Task Editing