Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattheweshleman/589f4e3243b29499b4df6e3b55884fbd to your computer and use it in GitHub Desktop.
Save mattheweshleman/589f4e3243b29499b4df6e3b55884fbd to your computer and use it in GitHub Desktop.
loopingForStatus
//https://github.com/STMicroelectronics/STM32CubeF7/blob/master/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_uart.c
HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout(UART_HandleTypeDef *huart, uint32_t Flag, FlagStatus Status,
uint32_t Tickstart, uint32_t Timeout)
{
/* Wait until flag is set */
while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status)
{
/* Check for the Timeout */
//removed for this example
}
return HAL_OK;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment