mirror of
https://github.com/KevinMidboe/TinyGSM.git
synced 2025-10-29 18:00:18 +00:00
Add TinyGsmCommon
This commit is contained in:
@@ -10,12 +10,13 @@
|
||||
#define TinyWiFiClientESP8266_h
|
||||
|
||||
//#define GSM_DEBUG Serial
|
||||
//#define GSM_USE_HEX
|
||||
|
||||
#if !defined(TINY_GSM_RX_BUFFER)
|
||||
#define TINY_GSM_RX_BUFFER 256
|
||||
#endif
|
||||
|
||||
#include <TinyGsmCommon.h>
|
||||
|
||||
#define GSM_NL "\r\n"
|
||||
static const char GSM_OK[] TINY_GSM_PROGMEM = "OK" GSM_NL;
|
||||
static const char GSM_ERROR[] TINY_GSM_PROGMEM = "ERROR" GSM_NL;
|
||||
@@ -23,22 +24,6 @@ static const char GSM_ERROR[] TINY_GSM_PROGMEM = "ERROR" GSM_NL;
|
||||
class TinyGsm
|
||||
{
|
||||
|
||||
#ifdef GSM_DEBUG
|
||||
template<typename T>
|
||||
static void DBG(T last) {
|
||||
GSM_DEBUG.println(last);
|
||||
}
|
||||
|
||||
template<typename T, typename... Args>
|
||||
static void DBG(T head, Args... tail) {
|
||||
GSM_DEBUG.print(head);
|
||||
GSM_DEBUG.print(' ');
|
||||
DBG(tail...);
|
||||
}
|
||||
#else
|
||||
#define DBG(...)
|
||||
#endif
|
||||
|
||||
public:
|
||||
TinyGsm(Stream& stream)
|
||||
: stream(stream)
|
||||
|
||||
Reference in New Issue
Block a user