diff --git a/src/arduino/Print.h b/src/arduino/Print.h index f2cdb51..b87a336 100644 --- a/src/arduino/Print.h +++ b/src/arduino/Print.h @@ -57,6 +57,12 @@ class Print size_t write(const char *buffer, size_t size) { return write((const uint8_t *)buffer, size); } + // add availableForWrite to make compatible with Arduino Print.h + // default to zero, meaning "a single write may block" + // should be overriden by subclasses with buffering + virtual int availableForWrite() { + return 0; + } size_t print(const __FlashStringHelper *); size_t print(const String &);