//
// GPIO: configure general-purpose inputs/outputs
//
#include "stm32f3xx_hal.h"
#include "gpio.h"
// Initialize GPIOs
void gpio_init(void)
{
GPIO_InitTypeDef GPIO_InitStruct;
// GPIO Ports Clock Enable
__GPIOA_CLK_ENABLE();
__GPIOB_CLK_ENABLE();
__GPIOF_CLK_ENABLE();
// Configure LED GPIO pins
GPIO_InitStruct.Pin = LED_RED_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
HAL_GPIO_Init(LED_RED_GPIO_Port, &GPIO_InitStruct);
HAL_GPIO_WritePin(LED_RED, 1);
}