2 Replies Latest reply on Jun 9, 2014 6:29 PM by brch_2116806

    How to identify GPIO interrupt source pin?

      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!