Skip to content

Commit 88764e9

Browse files
committed
Added Print.availableForWrite()
Fix #1170 Signed-off-by: Frederic Pillon <[email protected]>
1 parent 18b8171 commit 88764e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cores/arduino/Print.h

+4
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ class Print {
6868
return write((const uint8_t *)buffer, size);
6969
}
7070

71+
// default to zero, meaning "a single write may block"
72+
// should be overriden by subclasses with buffering
73+
virtual int availableForWrite() { return 0; }
74+
7175
size_t print(const __FlashStringHelper *);
7276
size_t print(const String &);
7377
size_t print(const char[]);

0 commit comments

Comments
 (0)