diff --git a/cores/esp32/Print.h b/cores/esp32/Print.h index 15d07357..4493d4f8 100644 --- a/cores/esp32/Print.h +++ b/cores/esp32/Print.h @@ -73,6 +73,11 @@ public: } size_t printf(const char * format, ...) __attribute__ ((format (printf, 2, 3))); + + // 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 &); size_t print(const char[]);