MCPcopy Create free account
hub / github.com/MarlinFirmware/Marlin / serial_data_available

Function serial_data_available

Marlin/src/gcode/queue.cpp:279–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279static 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

Callers 3

flush_rxMethod · 0.85
get_serial_commandsMethod · 0.85

Calls 1

availableMethod · 0.45

Tested by

no test coverage detected