Rockbox

Tasklist

FS#9645 - Working buttons for Fuze

Attached to Project: Rockbox
Opened by Thomas Martitz (kugel.) - Monday, 15 December 2008, 00:33 GMT
Last edited by Björn Stenberg (zagor) - Wednesday, 31 December 2008, 21:03 GMT
Task Type Patches
Category Drivers
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch enables at least some of the buttons for the main build.

It's based on domonoky's buttons for e200v2, but does it a bit better (imho), as it's
a) only changing the afsel and dir for the pins we need for the buttons -- and this GREATLY improves reliability of the lcd, as in it's working perfectly instead of showing crazy stuff on the screen (and doing this also avoids changing lcd_update_rect to lcd_update)
b) it uses mutex instead of disabling irqs. NOTE: The lcd_mutex comes from http://www.rockbox.org/tracker/task/9623 , so apply that one too. This mutex is needed anyway, else the buttons reads are going to mess up the lcd. This combo is tested and works well (for me of course).

I decided to remove the HAVE_SCROLLWHEEL define for now, until the scrollwheel actually works. The reason is that those defines disturb creating a reduced keymap which uses up/down to browse in lists.

I also added a reduced keymap, for testing purpose. It's lousy based on the c200 keymap, and lacks some features, but it makes browsing possible (and playing music). Add it to SOURCES (and remove the regular keymap) in case you use it.
This task depends upon

Closed by  Björn Stenberg (zagor)
Wednesday, 31 December 2008, 21:03 GMT
Reason for closing:  Accepted
Additional comments about closing:  Commited in r19629.
Comment by Eric Shattow (lucent) - Monday, 15 December 2008, 08:30 GMT
Tested r19442 with keymap-fuze-reduced.c, applied button-fuze.c.vc.diff and lcd-fuze.c.vc.diff ( FS#9623 ) on Fuze 8GB hardware. Display is reliable, button presses working for up / down / left / right / select.
Comment by Thomas Martitz (kugel.) - Monday, 15 December 2008, 11:35 GMT
Thanks for the feedback!

Does anyone have objections against this patch? I'd also be interested if the way I did it works well for e200v2 too.

BTW: I've so far not experienced any missed button press.
Comment by Thomas Martitz (kugel.) - Monday, 15 December 2008, 19:27 GMT
Remove lcd_mutex, it's apparently not needed.
Also updated some comments (and the copyright notice).
Comment by Eric Shattow (lucent) - Tuesday, 16 December 2008, 08:21 GMT
Cleaned up patch a bit and limited its scope to just fixing up the button code, does not touch scrollwheel or keymap. Tested successfully on 8GB Fuze in bootloader and normal builds.
Comment by Thomas Martitz (kugel.) - Tuesday, 16 December 2008, 19:14 GMT
make keymap usable for FM radio.

Note: this one is only supposed to make the Fuze/e200v2 usable. It's by no means meant to be a final keymap!
Comment by Eric Shattow (lucent) - Monday, 22 December 2008, 09:19 GMT
Tested patch (not listed above, attached for reference) as mentioned on IRC against r19555 to enable scrollwheel. Working on 8GB Fuze hardware are Scrollwheel (usable but it twitches a bit), Up / Down / Left / Right / Hold / Power buttons, and I don't know if "Home" button is mapped but it doesn't seem to do anything. Leaving comment here due to not being on IRC at the same time, anticipate this task to be updated soon by author.
Comment by Thomas Martitz (kugel.) - Wednesday, 24 December 2008, 05:19 GMT
Just as a note to the above patch: Yes, Home button is still not known how to read. And the scrollwheel is far from working reliable. We need to find a way to trigger an IRQ from the wheel, it won't get good using the tick task only.
Comment by Gabe Cook (gabe565) - Friday, 26 December 2008, 22:57 GMT
I tested it on my 8 GB Fuze, and the buttons work fine, except home of course. The scrollwheel, like Kugel said, is not very reliable. To move just one down or up, I have to carefully turn it. Great job so far, though!
Comment by Thomas Martitz (kugel.) - Wednesday, 31 December 2008, 00:13 GMT
Update: Wheel is working acceptable, still no Home button.

Reverted to e200 keymap, so that everything is usable (replaced Rec with Home).

This can go in.
Comment by Thomas Martitz (kugel.) - Wednesday, 31 December 2008, 01:26 GMT
This one works slightly better.
Comment by Thomas Martitz (kugel.) - Wednesday, 31 December 2008, 01:48 GMT
Get rid of some oops/unrelated change, sorry :/

Loading...