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/
|