Code Example
while (1)
{
if(HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_0))
{
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_RESET);
}
else
{
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_SET);
}
}
How it works
This STM32 example demonstrates basic peripheral configuration and HAL usage.