From 554e577676fb506e40b391ed5b7e65d545b04ac4 Mon Sep 17 00:00:00 2001 From: Dave Johnson Date: Tue, 9 Jan 2018 16:42:55 -0800 Subject: [PATCH] SERIAL_STATS_* features not supported on USBCON targets (#9127) --- Marlin/src/gcode/queue.cpp | 14 ++++++++------ Marlin/src/inc/SanityCheck.h | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index ab25fe5a4..6a7916c53 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -463,13 +463,15 @@ void advance_command_queue() { card.closefile(); SERIAL_PROTOCOLLNPGM(MSG_FILE_SAVED); - #if ENABLED(SERIAL_STATS_DROPPED_RX) - SERIAL_ECHOLNPAIR("Dropped bytes: ", customizedSerial.dropped()); - #endif + #ifndef USBCON + #if ENABLED(SERIAL_STATS_DROPPED_RX) + SERIAL_ECHOLNPAIR("Dropped bytes: ", customizedSerial.dropped()); + #endif - #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED) - SERIAL_ECHOLNPAIR("Max RX Queue Size: ", customizedSerial.rxMaxEnqueued()); - #endif + #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED) + SERIAL_ECHOLNPAIR("Max RX Queue Size: ", customizedSerial.rxMaxEnqueued()); + #endif + #endif // !USBCON ok_to_send(); } diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index fe69cf92e..1d033ba2f 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -275,8 +275,8 @@ #elif TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE)) #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256." #endif -#elif ENABLED(SERIAL_XON_XOFF) - #error "SERIAL_XON_XOFF is not supported on USB-native AVR devices." +#elif ENABLED(SERIAL_XON_XOFF) || ENABLED(SERIAL_STATS_MAX_RX_QUEUED) || ENABLED(SERIAL_STATS_DROPPED_RX) + #error "SERIAL_XON_XOFF and SERIAL_STATS_* features not supported on USB-native AVR devices." #endif /**