Skip to content

Commit 7dfd03b

Browse files
committed
Added Print.availableForWrite()
Fix stm32duino#1170 Signed-off-by: Frederic Pillon <[email protected]>
1 parent dce241d commit 7dfd03b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cores/arduino/Print.h

+7
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ 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()
74+
{
75+
return 0;
76+
}
77+
7178
size_t print(const __FlashStringHelper *);
7279
size_t print(const String &);
7380
size_t print(const char[]);

0 commit comments

Comments
 (0)