Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Tomer Shalev - 2009-06-13
Last edited by Frank Gevaerts - 2009-07-18

FS#10326 - USB HID sample application

This patch adds a USB HID sample application (remote_control) which enable the user to send HID messages in charging only mode.

The remote control application has three modes:

- Desktop:

  • Escape
  • Alt-Tab
  • Shift Alt-Tab
  • Windows
  • F10
  • Page Up
  • Page Down

- Presentation

  • Next Slide
  • Prev Slide
  • Start Slideshow
  • Stop Slideshow
  • Leave Slideshow
  • Black Screen
  • White Screen

- Media Player

  • Play
  • Stop
  • Next
  • Previous
  • Volume Up
  • Volume Down
  • Mute

Note: This is a work in progress and major parts of the code does not work yet.
It is submitted in order to share my work and receive feedback, as well as helping me debug the application.

The patch contains the following changes:

- Add HID keyboard enumeration, and allow sending keyboard key codes (Status: enumerates, but Windows does not respond to sent keys).
- Add usb_hid_send command to the plugin’s API - Fix #include issue
- Modify signature of usb_hid_send to allow passing usage page
- Move large enum structure into a list of #define’s
- Use BIT_N macro when possible
- Add buf_dump to dump a buffer into log (please consider using it in other places for debugging. I don’t know where is the appropriate place to put it)
- Make coding convention in usb_hid.c consistent in the entire file
- Fix endpoints allocation bug in firmware/target/arm/usb-drv-arc.c

Closed by  Frank Gevaerts
2009-07-18 12:58
Reason for closing:  Accepted
Additional comments about closing:  

Committed as r21953

Admin
Frank Gevaerts commented on 2009-06-13 16:00

I've traced what happens when I connect and then try to send the "desktop" keys one by one. You need the GraphicUSB software from http://www.mqp.com/dnld.htm to view this

   HID.mqu (221.2 KiB)
Admin
Frank Gevaerts commented on 2009-06-13 17:28

Here are the others. Presentation separately in presentation.mqu, and all items in all.mqu

Tomer Shalev commented on 2009-06-20 21:04

The attached patch is a working HID sample application. Enjoy!

Taylore commented on 2009-06-21 20:33

hmm.. this looks cool :) but when im building it it stops with an error 1 with usb.o .. then it goes to "rm" some pictures(bitmaps). ive you need more help diagnosing ill give you more, info… thank you in advance..

Tomer Shalev commented on 2009-06-22 05:04
hmm.. this looks cool :) but when im building it it stops with an error 1 with usb.o .. then it goes to "rm" some pictures(bitmaps). ive you need more help diagnosing ill give you more, info… thank you in advance..

Please try:
$ rm -rf build && mkdir build && cd build/ && printf "50\na\nl\n\n" | ../tools/configure && make

Let me know if it works for you. If so, try to build for your own platworm (passing "50" to ../tools/configure means Sansa e200, change it accordingly).

If you still encounter any errors, please provide the output, and additional information, such as 'uname -a'.

Tomer Shalev commented on 2009-07-16 12:23

Updated patch.
Removed irrelevant change to API (control max packet size).
Add 'HID_' prefix to #defines in usb_hid_usage_tables.h

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing