Skip to content

Commit b5b8582

Browse files
committed
Functions of the Arduino Print class since it is not part of the ESP-IDF framework
1 parent b48dd0a commit b5b8582

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/OLEDDisplay.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,13 @@ int OLEDDisplay::_putc(int c) {
957957

958958
return this->write((uint8_t)c);
959959
}
960+
#elif ESP_PLATFORM
961+
size_t OLEDDisplay::println(uint8_t c) {
962+
return write(c);
963+
}
964+
size_t OLEDDisplay::println(const char *str) {
965+
return write(*str);
966+
}
960967
#endif
961968

962969
// Private functions

src/OLEDDisplay.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,10 @@ class OLEDDisplay : public Stream {
367367
#ifdef __MBED__
368368
int _putc(int c);
369369
int _getc() { return -1; };
370+
#elif ESP_PLATFORM
371+
// Functions of the Arduino `Print` class since it is not part of the ESP-IDF framework
372+
size_t println(uint8_t c);
373+
size_t println(const char *str);
370374
#endif
371375

372376

0 commit comments

Comments
 (0)