tow devices share one interrupt
gaober
gaober_bupt at ...176...
Sat May 11 13:42:14 CEST 2013
hi!
i have 5 gpio keys,they are from module GPIO2,and share the same IRQ line MA_IRQ_30.how can i implement the gipo key driver?
i use code below to init gpio and irq
void _init_gpio(int gpio)
{
// Configure GPIO
_gpio.direction_input(gpio);
_gpio.debouncing_time(gpio, 31*100);
_gpio.debounce_enable(gpio, 1);
_gpio.falling_detect(gpio, 1);
_gpio.irq_enable(gpio, 1);
}
the "int gpio" will be 32,33,36,37,38
when i use
_gpio.irq_sigh(_sig_rec.manage(&_sig_ctx), gpio);
problem shows:should i use it only once or fifth?
if i use it only once,how can i determine which gpio trigger the irq?may be use function _gpio.datain(init gpio) to detect it?
another question:
my touchsreen and the 5 gpio keys share the same IRQ line MA_IRQ_30.how can deal with the tow kinds of driver?
in/os/drivers/input/,make two directoris named ft5406 and gpio_keys?when the irq comes?what will it be?which void handle_event() will execute?
thanks very much!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genode.org/pipermail/users/attachments/20130511/55cbe9ae/attachment.html>
More information about the users
mailing list