[2.0.x] Addressing #7896
This commit is contained in:
Scott Lahteine 2017-10-08 19:35:45 -05:00 committed by GitHub
commit e31385ecf6

View file

@ -175,12 +175,12 @@
// If the character is to be stored at the index just before the tail // If the character is to be stored at the index just before the tail
// (such that the head would advance to the current tail), the buffer is // (such that the head would advance to the current tail), the buffer is
// critical, so don't write the character or advance the head. // critical, so don't write the character or advance the head.
const char c = M_UDRx;
if (i != rx_buffer.tail) { if (i != rx_buffer.tail) {
rx_buffer.buffer[h] = M_UDRx; rx_buffer.buffer[h] = c;
rx_buffer.head = i; rx_buffer.head = i;
} }
else { else {
(void)M_UDRx;
#if ENABLED(SERIAL_STATS_DROPPED_RX) #if ENABLED(SERIAL_STATS_DROPPED_RX)
if (!++rx_dropped_bytes) ++rx_dropped_bytes; if (!++rx_dropped_bytes) ++rx_dropped_bytes;
#endif #endif
@ -194,7 +194,6 @@
#endif #endif
#if ENABLED(SERIAL_XON_XOFF) #if ENABLED(SERIAL_XON_XOFF)
// for high speed transfers, we can use XON/XOFF protocol to do // for high speed transfers, we can use XON/XOFF protocol to do
// software handshake and avoid overruns. // software handshake and avoid overruns.
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XON_CHAR) { if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XON_CHAR) {