Question
External Interrupts: Which Pin lauches the interrupt ?
Posted on March 06, 2014 at 16:02
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
#input-pin #interrupts #stm8