How to identify GPIO interrupt source pin?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

I'm going to use several GPIO pin as Data Input with interrupt by register handler in following function.

gpio_registerForInterrupt(interrupt_handler_mask, application_gpio_interrupt_handler);

Then, in the application_gpio_interrupt_handler(), as the document example is:

void application_gpio_interrupt_handler(void* parameter)

Question 1:

Can the "parameter" be used to identify the pin which trigger an interrupt? and identify that is triggered at falling edge or rising edge?

Or is there any API to identify it? I found gpio_getPortInterruptStatus but not sure this is. 

Question 2:

Do the handler need to clear interrupt by gpio_clearPortInterruptStatus before exit the handler?

Thank you!

0 Likes
1 Solution
Anonymous
Not applicable

Hello Brian,

Please see the following post for help: how to identify GPIO interrupt source pin?

Let me know if this answers your questions.

Thank you.

JT

View solution in original post

2 Replies
Anonymous
Not applicable

Hello Brian,

Please see the following post for help: how to identify GPIO interrupt source pin?

Let me know if this answers your questions.

Thank you.

JT

Anonymous
Not applicable

Sure, it is helpful. I've validated on my system.

Brian

0 Likes