Handle usart errors.
This commit is contained in:
parent
ca364a889e
commit
45e322b9a3
|
@ -247,7 +247,10 @@ void usbuart_usb_in_cb(usbd_device *dev, uint8_t ep)
|
||||||
*/
|
*/
|
||||||
void USBUSART_ISR(void)
|
void USBUSART_ISR(void)
|
||||||
{
|
{
|
||||||
|
uint32_t err = USART_SR(USBUSART);
|
||||||
char c = usart_recv(USBUSART);
|
char c = usart_recv(USBUSART);
|
||||||
|
if (err & (USART_SR_ORE | USART_SR_FE))
|
||||||
|
return;
|
||||||
|
|
||||||
/* Turn on LED */
|
/* Turn on LED */
|
||||||
gpio_set(LED_PORT_UART, LED_UART);
|
gpio_set(LED_PORT_UART, LED_UART);
|
||||||
|
|
Loading…
Reference in New Issue