From 15db2971307024df49516b7f657db9c6a4037832 Mon Sep 17 00:00:00 2001 From: drmpf Date: Mon, 11 Jan 2021 20:43:10 +1100 Subject: [PATCH] availableForWrite (#4664) 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 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[]);