AnsweredAssumed Answered

External Interrupts: Which Pin lauches the interrupt ?

Question asked by StephB on Mar 6, 2014
Latest reply on Oct 31, 2014 by kirichok.sergey
Hello,

I have 2 pins on the same port B defined to launch interrupt on RISE.
When the interrupt is launched, how can I test which pin causes the interrupt launch ?

GPIO_Init(GPIOB, GPIO_PIN_5, GPIO_MODE_IN_FL_IT);
GPIO_Init(GPIOB, GPIO_PIN_6, GPIO_MODE_IN_FL_IT);
 
EXTI_SetExtIntSensitivity(EXTI_PORT_GPIOB, EXTI_SENSITIVITY_RISE_ONLY);


INTERRUPT_HANDLER(EXTI_PORTB_IRQHandler, 4)
{
  if(rise_of_PB5) // how can I test if a rise of PB5 (and not PB6) launches the interrupt ???
  {
    //
  }
  if(rise_of_PB6) // how can I test if a rise of PB6 (and not PB5) launches the interrupt ???
  {
    //
  }
}

Thanks in advance

Outcomes