Question
flush usart receive buffer
Posted on November 14, 2014 at 01:07
Hello,
I need a way to flush the usart2 receive buffer . Will the following line do the trick or is it necessary to do something with the received rubbish bytes? // If buffer contains garbage, do nothing while (USART_GetFlagStatus(USART2, USART_FLAG_RXNE) == SET); Kind Regards Bob