|
|
|
|
281
|
|
281
|
|
282
|
static bool serial_data_available(serial_index_t index) {
|
282
|
static bool serial_data_available(serial_index_t index) {
|
283
|
const int a = SERIAL_IMPL.available(index);
|
283
|
const int a = SERIAL_IMPL.available(index);
|
284
|
- #if BOTH(RX_BUFFER_MONITOR, RX_BUFFER_SIZE)
|
|
|
|
|
284
|
+ #if ENABLED(RX_BUFFER_MONITOR) && RX_BUFFER_SIZE
|
285
|
if (a > RX_BUFFER_SIZE - 2) {
|
285
|
if (a > RX_BUFFER_SIZE - 2) {
|
286
|
PORT_REDIRECT(SERIAL_PORTMASK(index));
|
286
|
PORT_REDIRECT(SERIAL_PORTMASK(index));
|
287
|
SERIAL_ERROR_MSG("RX BUF overflow, increase RX_BUFFER_SIZE: ", a);
|
287
|
SERIAL_ERROR_MSG("RX BUF overflow, increase RX_BUFFER_SIZE: ", a);
|