Is calling EXTI_GetITStatus() sometimes unnecessary?
I wonder if I can delete the call to EXTI_GetITStatus() in the following example code?
TheEXTI0_IRQHandler is not used for any other external interrupts. So thecall to
EXTI_GetITStatus() seems unnecessary?
/**
* @brief ISR for EXTI0 detects a rising edge.
*
* This ISR is run when PE0 receives an rising edge. It will increment the counter variable.
*/
void EXTI0_IRQHandler(void)
{
if (EXTI_GetITStatus(EXTI_Line0) != RESET) // Make sure it is an External interrupt line 0 interrupt
{
counter++;
EXTI_ClearITPendingBit(EXTI_Line0); // Clear the pending bit
}
}�?�?�?�?�?�?�?�?�?�?�?�?�?
#stm32