From 83290714f76a990010ead7c87daeda2b5707e5df Mon Sep 17 00:00:00 2001 From: drmpf Date: Tue, 29 Dec 2020 15:22:52 +1100 Subject: [PATCH] availableForWrite added availableForWrite to Print.h to make compatible with Arduino Print.h --- cores/esp32/Print.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cores/esp32/Print.h b/cores/esp32/Print.h index 15d07357ae9..4493d4f819f 100644 --- a/cores/esp32/Print.h +++ b/cores/esp32/Print.h @@ -73,6 +73,11 @@ class Print } 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[]);