This commit is contained in:
hathach
2018-04-10 20:41:04 +07:00
parent a9267cd9ff
commit 58c86bae1d
7 changed files with 40 additions and 44 deletions

View File

@ -397,7 +397,7 @@ static uint32_t slip_uart_open(void)
void tud_cdc_rx_cb(uint8_t port)
{
while ( tud_cdc_available() )
while ( tud_cdc_available() && !rx_buffer_overflowed() )
{
int8_t ch = tud_cdc_read_char();
handle_rx_byte((uint8_t) ch);