Hi:
You do not really need a device driver for your keypad if you are
going to implement it in the ARM side.(I do not think there has a
interrupt line for the keypad header).(mmap is good enough).
Use the FPGA is the best option you could take if you really wanna
learn how to write drive a device driver or interrupt hander.
You would better have a look at opencore project (ts-7300 opencore)
first. The opencore has only one interrupt line that linked to the ARM
processor. I think it is line 40 (if i have remembered it right).
There is another book that I would suggest you to read - (Linux Device
Driver 2 edition). Chapter 7 and Chapter 9 are what you are looking for.
I have done a project related to what you are looking for, a keypad
wired with the FPGA, and interrupt driven from the ARM side. Feel free
to let me know if you need any helps and problems.(You may have a look
my source codes for the device driver (interrupt hander) that I have
written (hardly commented any. haha).
Thanks
Henry
--- 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 is
> pretty much how I got it, same kernel and everything. I need to hook
> up a 3x4 Matrix Keypad to the board and have it send an interrupt when
> a key has been pressed. I am going to connect the three column data
> lines from the keypad to interrupt-enabled I/O pins on one of the
> headers, and then the row data lines will be connected to the same
> header but without interrupts enabled. Will I need to worry about
> debounce control inside the handler? What I obviously don't want is
> more than one interrupt to be sent for only one key press. I am still
> doing some more reading on drivers but my plan is:
> 1. Disable interrupts associated with the keypad
> 2. Read from the header what key was pressed and store it in the next
> cell of an array
> 3. Signal that a tasklet needs to be run to do the overall
> processing/checking of the entered code so far
> 4. Increment the counter keeping track of the next available cell in
> the array
> 5. Re-enable the disabled interrupts
>
> Will this solve my problem? It seems that if the time it takes for
> the key to settle is longer than the time it takes to do those five
> steps, then I would need to do some adjusting. What is a better way
> to do this? Thanks for any help
>
------------------------------------
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/
|