cancel
Showing results for 
Search instead for 
Did you mean: 

GPIO HAL pointer at function argument

StanCosgrove
Associate II

Hi, i m reading the general HAL GPIO file, what does the 2 pointers here do? can anyone kindly advise? i see a lot of STM header and device file with these... 

void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
{
uint32_t position = 0x00U;
uint32_t iocurrent;
uint32_t temp;

EXTI_Core_TypeDef *EXTI_CurrentCPU;

#if defined(DUAL_CORE) && defined(CORE_CM4)

EXTI_CurrentCPU = EXTI_D2; /* EXTI for CM4 CPU */

#else
EXTI_CurrentCPU = EXTI_D1; /* EXTI for CM7 CPU */
#endif

.....

6 REPLIES 6
TDK
Guru

GPIOx is a pointer to the GPIO port, e.g. GPIOA.

GPIO_Init is a pointer to the initialization structure, which holds in the information on which pins you want configured and how to configure them.

 

If you feel a post has answered your question, please click "Accept as Solution".
Pavel A.
Evangelist III

Why you don't ask what is EXTI_Core? 🙂

yes, i would like to know whats  EXTI_Core and EXTI_CurrentCPU too...Anyone can kinldy advise?

aren't you gona reply this?? 

TDK
Guru

Pretty sure he was joking...

You can look up these things on your own. Function definitions, structures, HAL examples all exist.

If you feel a post has answered your question, please click "Accept as Solution".
Pavel A.
Evangelist III

Thank you Tim 🙂