**My** pet library thought those utils were public, Oops!
Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
This commit is contained in:
@@ -242,7 +242,7 @@ class TinyGsmModem {
|
|||||||
/*
|
/*
|
||||||
Utilities
|
Utilities
|
||||||
*/
|
*/
|
||||||
protected:
|
public:
|
||||||
// Utility templates for writing/skipping characters on a stream
|
// Utility templates for writing/skipping characters on a stream
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline void streamWrite(T last) {
|
inline void streamWrite(T last) {
|
||||||
@@ -255,6 +255,13 @@ class TinyGsmModem {
|
|||||||
thisModem().streamWrite(tail...);
|
thisModem().streamWrite(tail...);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void streamClear() {
|
||||||
|
while (thisModem().stream.available()) {
|
||||||
|
thisModem().waitResponse(50, NULL, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
inline int16_t streamGetIntLength(int8_t numChars) {
|
inline int16_t streamGetIntLength(int8_t numChars) {
|
||||||
char buf[6];
|
char buf[6];
|
||||||
size_t bytesRead = thisModem().stream.readBytes(buf, numChars);
|
size_t bytesRead = thisModem().stream.readBytes(buf, numChars);
|
||||||
@@ -318,12 +325,6 @@ class TinyGsmModem {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void streamClear() {
|
|
||||||
while (thisModem().stream.available()) {
|
|
||||||
thisModem().waitResponse(50, NULL, NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SRC_TINYGSMMODEM_H_
|
#endif // SRC_TINYGSMMODEM_H_
|
||||||
|
Reference in New Issue
Block a user