Merge pull request #9128 from fiveangle/bf1-disable_serial_stats_on_usbcon

[1.1.x] SERIAL_STATS_* features not supported on USBCON targets
This commit is contained in:
Scott Lahteine 2018-01-09 18:42:26 -06:00 committed by GitHub
commit 9714c9aebe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

View File

@ -14284,13 +14284,15 @@ void loop() {
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();
}

View File

@ -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
/**