We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a32ac8c commit 38992c2Copy full SHA for 38992c2
cores/arduino/RingBuffer.cpp
@@ -67,6 +67,14 @@ int RingBuffer::available()
67
return delta;
68
}
69
70
+int RingBuffer::availableForStore()
71
+{
72
+ if (_iHead >= _iTail)
73
+ return SERIAL_BUFFER_SIZE - 1 - _iHead + _iTail;
74
+ else
75
+ return _iTail - _iHead - 1;
76
+}
77
+
78
int RingBuffer::peek()
79
{
80
if(_iTail == _iHead)
cores/arduino/RingBuffer.h
@@ -40,6 +40,7 @@ class RingBuffer
40
void clear();
41
int read_char();
42
int available();
43
+ int availableForStore();
44
int peek();
45
bool isFull();
46
0 commit comments