@@ -49,7 +49,7 @@ class __FlashStringHelper; | |||
class Print | |||
{ | |||
public: | |||
Print() : write_error(0) {} | |||
constexpr Print() : write_error(0) {} | |||
virtual size_t write(uint8_t b) = 0; | |||
size_t write(const char *str) { return write((const uint8_t *)str, strlen(str)); } | |||
virtual size_t write(const uint8_t *buffer, size_t size); |
@@ -26,7 +26,7 @@ | |||
class Stream : public Print | |||
{ | |||
public: | |||
Stream() : _timeout(1000), read_error(0) {} | |||
constexpr Stream() : _timeout(1000), read_error(0) {} | |||
virtual int available() = 0; | |||
virtual int read() = 0; | |||
virtual int peek() = 0; |