This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#9639 - Working buttons for e200v2
Attached to Project:
Rockbox
Opened by Dominik Wenger (Domonoky) - Sunday, 14 December 2008, 16:06 GMT+2
Last edited by Dominik Wenger (Domonoky) - Monday, 16 February 2009, 20:51 GMT+2
Opened by Dominik Wenger (Domonoky) - Sunday, 14 December 2008, 16:06 GMT+2
Last edited by Dominik Wenger (Domonoky) - Monday, 16 February 2009, 20:51 GMT+2
|
DetailsThis patch make the Buttons (not scrollwheel) on e200v2 working.
The patch itself is a bit ugly, as i need to disable irqs when sending data to the lcd. |
This task depends upon
Closed by Dominik Wenger (Domonoky)
Monday, 16 February 2009, 20:51 GMT+2
Reason for closing: Fixed
Additional comments about closing: I commited a similar, but improved patch.
Monday, 16 February 2009, 20:51 GMT+2
Reason for closing: Fixed
Additional comments about closing: I commited a similar, but improved patch.
If a bootloader is made with this patch, the display is not initialized properly.
But I wonder what the gains of removing it are. I'm pretty sure domonoky didn't comment those out because the code looks nicer or so.
yes, you are right, i didnt test the bootloader, so i missed that they are needed.
The intention was to get rid of all unneeded and unknown inits (i wondered why the lcd would need some pins on GPIOA when the data transfer is on GPIOB and C). And also some GPIO commands are strange in this init (setting the pin before switching the pin to output ?). It really needs cleanup, and investigation what these GPIO pins really do.
But the real focus in this patch was th Buttons :-)
Maybe you try some other things, for altering example the <nop> loop. I'll let you experiment a bit, but I think I'll commit it anyway tomorrow or so.
Maybe you could also change the delay loop in the dbob function (this one with asm volatile("nop") in it). This delay is what I got by disassembling the Fuze OF, it might very well be, that this delay is off or totally wrong for the e200v2.
Did I get this right? You do not allow REC to be read during startup, but after the 57 ticks? What are the problems with the REC button apart from that?
BTW, your delay loop is effectivly the same as the <nop> loop.
You also said cabbiev2 works without the REC button :/
My early versions of the Fuze scrollwheel code where copied from the e200 clickwheel too. But once I noticed all the wheel acceleration stuff is unneeded, because you cannot get acceleration right without reading the wheel in an interrupt, I stripped all that out and got what's in SVN. Basically, acceleration was actually bad, since the cursor jumped around randomly.
Going by the datasheet, the output cannot alter DBOP_DIN, at least not when the STATUS register says read data valid. I don't think the lcd driver does anything to dbop_din directoy, but you may of course try to block it out and make sure.
Objectively I can tell you several things about the e200v1 scroll code that makes me call it better, at least for my e280v2. The scrolling stops at top and bottom of menus giving it a more finished look. The scrollwheel actually controls the volume on the wps screen. In the debug menu the fuze code was always boosting cpu frequency and the e200 code never does.
"In the debug menu the fuze code was always boosting cpu frequency and the e200 code never does." I don't quite understand.
In the debug menu there's a CPU frequency menu. With the e200 scrollwheel code the frequency is solid at 31000000 and boost_counter is 0. With the fuze scrollwheel code it's continually jumping up to 248000000 and boost_counter increments as you scroll the wheel.
Also "The scrolling stops at top and bottom of menus giving it a more finished look. The scrollwheel actually controls the volume on the wps screen." - This both works on my Fuze.
That's great for you but doesn't help me out with my e280. Neither work on my e280 with the fuze scroll code.
This certainly isn't a my code is better than your code debate because I'm going to lose that one quite quickly.
I think the e200v1 scrollwheel code works better on my e280v2 so that's what I'm going to use for now.