--- In "bdon003" <> wrote:
>
> I am using the ts-7300 for my senior design project, and I am
> preparing to write a Linux driver for it. Everything on the board
> pretty much how I got it, same kernel and everything. I need to ho
> up a 3x4 Matrix Keypad to the board and have it send an interrupt w
> a key has been pressed. I am going to connect the three column data
Similar to you, I bought a TS-7800 a few weeks ago and I thought that
writing a keypad driver would be a great way to get familiar with the
board and writing drivers for Linux. I figured I would first start
off with a software only solution, then look into using hardware to
actually debounce and latch the keypad data and raise an interrupt
when the data is valid. I'm still working on the former and only
given a little thought to the latter, although the latter approach
is way more interesting to me for my purposes (and I would think
much more efficient).
I'm still tinkering with my software only solution (although it's
basically all there). In this approach I use the Linux timer
facility (i.e., mod_timer()) to poll the DIO memory every 10ms
and employ the algorithm from TS's keypad.c to perform the debounce
(meaning it takes roughly 20ms to make a keypress available).
Now, it's not clear to me how efficient this nor is it clear
to me how to measure the impact on the system (top seems rather
useless in this regard). I thought maybe running the driver
with and without some other CPU bound processes might be
telling, but surely there are tools for just this sort
of thing, no?
Anyway, for those interested the code is here:
http://codeconcepts.com/ts-7800/trunk/tsdio/
Comments and suggestions greatly appreciated!
Greg
FWIW, I plan to put this stuff under the GPL (v3?), but haven't
had time to look into it yet.
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|