You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.1 KiB

  1. /**
  2. * @file TinyGsmClient.h
  3. * @author Volodymyr Shymanskyy
  4. * @license LGPL-3.0
  5. * @copyright Copyright (c) 2016 Volodymyr Shymanskyy
  6. * @date Nov 2016
  7. */
  8. #ifndef TinyGsmClient_h
  9. #define TinyGsmClient_h
  10. #if defined(SPARK) || defined(PARTICLE)
  11. #include "Particle.h"
  12. #elif defined(ARDUINO)
  13. #if ARDUINO >= 100
  14. #include "Arduino.h"
  15. #else
  16. #include "WProgram.h"
  17. #endif
  18. #endif
  19. #include <Client.h>
  20. #include <TinyGsmFifo.h>
  21. #ifndef TINY_GSM_YIELD
  22. #define TINY_GSM_YIELD() { delay(0); }
  23. #endif
  24. #if defined(__AVR__)
  25. #define TINY_GSM_PROGMEM PROGMEM
  26. typedef const __FlashStringHelper* GsmConstStr;
  27. #define GFP(x) (reinterpret_cast<GsmConstStr>(x))
  28. #define GF(x) F(x)
  29. #else
  30. #define TINY_GSM_PROGMEM
  31. typedef const char* GsmConstStr;
  32. #define GFP(x) x
  33. #define GF(x) x
  34. #endif
  35. #if defined(TINY_GSM_MODEM_SIM800) || defined(TINY_GSM_MODEM_SIM900)
  36. #include <TinyGsmClientSIM800.h>
  37. #elif defined(TINY_GSM_MODEM_M590)
  38. #include <TinyGsmClientM590.h>
  39. #elif defined(TINY_GSM_MODEM_ESP8266)
  40. #include <TinyWiFiClientESP8266.h>
  41. #else
  42. #error "Please define GSM modem model"
  43. #endif
  44. #endif