- HAL_GPIO_Init (GPIO_TypeDef * GPIOx, GPIO_InitTypeDef * GPIO_Init)
Definition of the structure variable
GPIO_InitTypeDef GPIO_InitStructure;
Enable clock
__HAL_RCC_GPIOA_CLK_ENABLE()
__HAL_RCC_GPIOB_CLK_ENABLE();
GPIO_InitStructure.Mode = GPIO_MODE_AF_PP;
GPIO_InitStructure.Pull = GPIO_PULLUP;
GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_HIGH;