I am being a bit lazy. But I figured someone would already know. If not
I will slink away and test myself. Anyhow the main issue is that that
joypad behaves atrociously in opie-reader. I see false positives and
false negatives all the time. Some might remember that this list had a
discussion on it quite a bit of time ago. Well, I can't stand it any
longer so I am reviving the issue.
The joypad works a little strangly in that it has positions at NW, NE,
SE and SW instead of N,E,S,W. This means to register an 'up' key event
the isr has to notice some combination of NW and NE. There is some
clever code in h5400_asic_io.c that tries it's best to recognize this. I
have no idea if it is doing the details right. In fact I can't figure
out how it is working at all. So I have a couple of questions to ask
that I am hoping will lift the fog for me.
- The GPIO joypad interrupts are set up to interrupt on rising and
falling edge and for 'maximum' filtering.
1. What is 'maximum' filtering or what is filtering in this context?
In the case of say the center press of the joypad the code attempts to
register a 'action' key.
2. If someone pressed the center of the joypad I would expect there to
to be a interrupt generated for the rising edge and for the isr to
read a 1 from the proper bit for the center press. Then another
interrupt generated for the falling edge and for the isr to read a
1 again from the proper bit. The isr would use make_keypress for
'action' and 1 for the rising edge and a make_keypress for 'action'
and 0 for the falling edge. Is this sequence of events correct?
- The function gpio_to_keys flips the bits of the value read from the
GPA data register, why? That register shouldn't have anything
different then for application buttons which don't do this to the
value read.
- The map of buttons is written such that if the joypad NW press is done
there is the possibility for both a 'up' and a 'left' key press. Is
this done for a reason? Has the interrupt servicing driven this
decision? Why not just stick to reading two bits at once for each
desired key ie. 'up' looks at NW and NE?
Any answers are appreciated.
Thanks
E
-- Erik Hovland mail: erik AT hovland DOT org web: http://hovland.org/ PGP/GPG public key available on requestReceived on Tue Mar 29 2005 - 15:00:47 EST
This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:20:11 EDT