2023-09-14 01:47 AM
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
.....
2023-09-14 06:42 AM
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.
2023-09-14 08:10 AM
Why you don't ask what is EXTI_Core? :)
2023-09-14 05:39 PM
yes, i would like to know whats EXTI_Core and EXTI_CurrentCPU too...Anyone can kinldy advise?
2023-09-17 06:10 PM
aren't you gona reply this??
2023-09-17 06:24 PM
Pretty sure he was joking...
You can look up these things on your own. Function definitions, structures, HAL examples all exist.
2023-09-18 03:10 AM
Thank you Tim :)