|
@ -107,15 +107,15 @@ |
|
|
#else |
|
|
#else |
|
|
typedef uint8_t ring_buffer_pos_t; |
|
|
typedef uint8_t ring_buffer_pos_t; |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if ENABLED(SERIAL_STATS_DROPPED_RX) |
|
|
#if ENABLED(SERIAL_STATS_DROPPED_RX) |
|
|
extern uint8_t rx_dropped_bytes; |
|
|
extern uint8_t rx_dropped_bytes; |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED) |
|
|
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED) |
|
|
extern ring_buffer_pos_t rx_max_enqueued; |
|
|
extern ring_buffer_pos_t rx_max_enqueued; |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
class MarlinSerial { //: public Stream
|
|
|
class MarlinSerial { //: public Stream
|
|
|
|
|
|
|
|
|
public: |
|
|
public: |
|
@ -140,7 +140,7 @@ |
|
|
|
|
|
|
|
|
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED) |
|
|
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED) |
|
|
FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return rx_max_enqueued; } |
|
|
FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return rx_max_enqueued; } |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
static FORCE_INLINE void write(const char* str) { while (*str) write(*str++); } |
|
|
static FORCE_INLINE void write(const char* str) { while (*str) write(*str++); } |
|
|
static FORCE_INLINE void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); } |
|
|
static FORCE_INLINE void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); } |
|
|