Skip to content

Commit 15db297

Browse files
authored
availableForWrite (#4664)
added availableForWrite to Print.h to make compatible with Arduino Print.h
1 parent fe093a5 commit 15db297

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cores/esp32/Print.h

+5
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ class Print
7373
}
7474

7575
size_t printf(const char * format, ...) __attribute__ ((format (printf, 2, 3)));
76+
77+
// add availableForWrite to make compatible with Arduino Print.h
78+
// default to zero, meaning "a single write may block"
79+
// should be overriden by subclasses with buffering
80+
virtual int availableForWrite() { return 0; }
7681
size_t print(const __FlashStringHelper *);
7782
size_t print(const String &);
7883
size_t print(const char[]);

0 commit comments

Comments
 (0)