/**
* @brief Clears the USARTx's pending flags.
* @param usart: Select the USART or the USART peripheral.
* @param usart_flag: specifies the flag to clear.
* This parameter can be any combination of the following values:
* @ARG USART_FLAG_RXNE
* @retval : None
*/
void USART_ClearFlag(USART_TypeDef *usart, uint32_t usart_flag)
{
usart->SR = ~(usart_flag);
}
2.
/**
* @brief Clears the USARTx interrupt pending bits.
* @param usart: Select the USART or the USART peripheral.
* This parameter can be one of the following values:
* USART1.
* @param usart_it: specifies the interrupt pending bit to clear.
* This parameter can be one of the following values:
* @arg USART_IT_RXNE
* @retval : None
*/
void USART_ClearITPendingBit(USART_TypeDef *usart, uint32_t usart_it)
{
usart->SR = ~(usart_it);
}