1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-24 13:21:23 +01:00

add RinStream::info()

This commit is contained in:
Harald Barth 2022-07-31 00:53:26 +02:00
parent 26fc11d1a6
commit 3aef54c0fe
2 changed files with 5 additions and 0 deletions

View File

@ -157,6 +157,10 @@ uint8_t RingStream::peekTargetMark() {
return _buffer[_mark]; return _buffer[_mark];
} }
void RingStream::info() {
DIAG(F("Info len=%d count=%d pr=%d pw=%d m=%d"),_len, _count,_pos_read,_pos_write,_mark);
}
bool RingStream::commit() { bool RingStream::commit() {
_flashInsert=NULL; // prepared for first read _flashInsert=NULL; // prepared for first read
if (_overflow) { if (_overflow) {

View File

@ -47,6 +47,7 @@ class RingStream : public Print {
bool commit(); bool commit();
uint8_t peekTargetMark(); uint8_t peekTargetMark();
void flush(); void flush();
void info();
private: private:
int read(byte advance); int read(byte advance);
byte readRawByte(byte advance=1); byte readRawByte(byte advance=1);