ts-7000
[Top] [All Lists]

Re: [ts-7000] 2.6.27.4 matt kernel's keypad question

To:
Subject: Re: [ts-7000] 2.6.27.4 matt kernel's keypad question
From: Matthieu Crapet <>
Date: Wed, 03 Dec 2008 07:30:53 +0100
Hi,

The drive is a regular input device driver.
It you are using my LCD console driver, you have nothing to do, the 
/dev/input/inputX will be handled.

On another way, you can compile your kernel with "Event interface" 
option and you will be able to read keys from userland. In short way:

#include <linux/input.h>

struct input_event event;
fd = open("/dev/input/event0");
read(fd, &event, sizeof(event));
if (event.type == EV_KEY) {
  Printf ("EV_EY: C:%u V:%u\n", event.code, event.value);
}
close(fd);

Best regards,
Matthieu



denx_ts wrote:
>
> Hi All,
>
> I have a silly question regading the 4x4 keypad kernel module from
> matt: how can I use it? I can inserted the modules (ep93xx_keypad and
> ts72xx_dio_4x4) but I can't find any usage example for it. As I
> realized it doesn't work as a standard keyboard, or maybe I did
> something wrong. The only change what I've find is the following lines
> in the /proc/interrupts file:
> 72: 3 GPIO kp-row0
> 73: 5 GPIO kp-row1
> 76: 3 GPIO kp-row2
> 78: 6 GPIO kp-row3
>
> Can I register it as a char device? Or is there any other way to use
> it in a program?
>
> Thanks for the answers in advance.
>
> Cheers,
> denx
>
>  


------------------------------------

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/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU