| 277 | } |
| 278 | |
| 279 | static bool serial_data_available(serial_index_t index) { |
| 280 | const int a = SERIAL_IMPL.available(index); |
| 281 | #if ENABLED(RX_BUFFER_MONITOR) && RX_BUFFER_SIZE |
| 282 | if (a > RX_BUFFER_SIZE - 2) { |
| 283 | PORT_REDIRECT(SERIAL_PORTMASK(index)); |
| 284 | SERIAL_ERROR_MSG("RX BUF overflow, increase RX_BUFFER_SIZE: ", a); |
| 285 | } |
| 286 | #endif |
| 287 | return a > 0; |
| 288 | } |
| 289 | |
| 290 | #if NO_TIMEOUTS > 0 |
| 291 | // Multiserial already handles dispatch to/from multiple ports |
no test coverage detected