Skip to content

Commit

Permalink
availableForWrite (#4664)
Browse files Browse the repository at this point in the history
added availableForWrite to Print.h to make compatible with Arduino Print.h
  • Loading branch information
drmpf authored Jan 11, 2021
1 parent fe093a5 commit 15db297
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cores/esp32/Print.h
Original file line number Diff line number Diff line change
Expand Up @@ -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[]);
Expand Down

0 comments on commit 15db297

Please sign in to comment.