cancel
Showing results for 
Search instead for 
Did you mean: 

can someone help me find the equivalent of the EXTI_GetITStatus (EXTI_Line0) instruction with the stm32 HAL library

AGHAZ
Associate II
 
1 ACCEPTED SOLUTION

Accepted Solutions
John Craven
Senior

__HAL_GPIO_EXTI_GET_IT

View solution in original post

6 REPLIES 6
John Craven
Senior

__HAL_GPIO_EXTI_GET_IT

HAL uses macros for most status gets, IT sets and clears, when it seems missing in context sensitive editor always try __HAL_***_

Piranha
Chief II

HAL_EXTI_GetPending() does exactly the same.

I use neither SPL, nor HAL, but it took me only few minutes to find it out. The super "secret magic" formula - looking at register code and thinking!

void EXTI0_IRQHandler(void)

{

 /* EXTI line interrupt detected */

 if(__HAL_GPIO_EXTI_GET_IT(GPIO_PIO_0) != RESET)

 {

  __HAL_GPIO_EXTI_CLEAR_IT(GPIO_PIO_0);

 // ... Do processing

 }

}

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

thanks :)

thank you so much :)