Skip to content

Commit 398e70f

Browse files
committed
Added Print.availableForWrite()
1 parent 32d3aee commit 398e70f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/Print.h

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ class Print
5454
return write((const uint8_t *)buffer, size);
5555
}
5656

57+
// default to zero, meaning "a single write may block"
58+
// should be overriden by subclasses with buffering
59+
virtual int availableForWrite() { return 0; }
60+
5761
size_t print(const __FlashStringHelper *);
5862
size_t print(const String &);
5963
size_t print(const char[]);

0 commit comments

Comments
 (0)