File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -307,6 +307,17 @@ static void ICACHE_RAM_ATTR uart_isr_handle_data(void* arg, uint8_t data)
307
307
}
308
308
rx_buffer -> buffer [rx_buffer -> wpos ] = data ;
309
309
rx_buffer -> wpos = nextPos ;
310
+
311
+ // Check the UART flags and note hardware overflow/etc.
312
+ uint32_t usis = USIS (uart -> uart_nr );
313
+
314
+ if (usis & (1 << UIOF ))
315
+ uart -> rx_overrun = true;
316
+
317
+ if (usis & ((1 << UIFR ) | (1 << UIPE ) | (1 << UITO )))
318
+ uart -> rx_error = true;
319
+
320
+ USIC (uart -> uart_nr ) = usis ;
310
321
}
311
322
312
323
size_t
@@ -362,7 +373,7 @@ uart_isr(void * arg)
362
373
if (usis & (1 << UIFF ))
363
374
uart_rx_copy_fifo_to_buffer_unsafe (uart );
364
375
365
- if (( usis & (1 << UIOF )) && ! uart -> rx_overrun )
376
+ if (usis & (1 << UIOF ))
366
377
{
367
378
uart -> rx_overrun = true;
368
379
//os_printf_plus(overrun_str);
You can’t perform that action at this time.
0 commit comments