diff --git a/src/TinyGsmModem.tpp b/src/TinyGsmModem.tpp index 08405bd..3eb40ca 100644 --- a/src/TinyGsmModem.tpp +++ b/src/TinyGsmModem.tpp @@ -242,7 +242,7 @@ class TinyGsmModem { /* Utilities */ - protected: + public: // Utility templates for writing/skipping characters on a stream template inline void streamWrite(T last) { @@ -255,6 +255,13 @@ class TinyGsmModem { thisModem().streamWrite(tail...); } + inline void streamClear() { + while (thisModem().stream.available()) { + thisModem().waitResponse(50, NULL, NULL); + } + } + + protected: inline int16_t streamGetIntLength(int8_t numChars) { char buf[6]; size_t bytesRead = thisModem().stream.readBytes(buf, numChars); @@ -318,12 +325,6 @@ class TinyGsmModem { } return false; } - - inline void streamClear() { - while (thisModem().stream.available()) { - thisModem().waitResponse(50, NULL, NULL); - } - } }; #endif // SRC_TINYGSMMODEM_H_