Jeff 发表于 2015-10-19 20:21:32

How to use GPIO Intterupts?

Hi I'am Jeff from Korea.

I want to use GPIO Interrupts for GPIO0_B5 / GPIO_A3 by Input Button.

When I use an interrupt for GPIO0_A7_U, it works fine.
If I push the button once , "Interrupt Service Routine (ISR)" works once.
But If I use it to GPIO0_B5_D, "ISR" works continuously.
I think it happens because GPIO Interrupts only work when it's ACTIVE_LOW.

Here is my question.
How can I use the "ISR" when GPIO working "Rising Edge" or "Falling Edge"

plz help!

thank you!

暴走的阿Sai 发表于 2015-10-20 09:40:11

When you use request_irq,you can try IRQF_TRIGGER_RISING or IRQF_TRIGGER_FALLING
like this:
request_irq(client->irq, gsl_ts_irq, IRQF_TRIGGER_RISING, client->name, ts);
页: [1]
查看完整版本: How to use GPIO Intterupts?