Library for the Adafruit FONA. This is a port of the original Arduino library available at: https://github.com/adafruit/Adafruit_FONA_Library . - Modified by Marc PLOUHINEC 27/06/2015 for use in mbed - Modified by lionel VOIRIN 05/08/2018 for use Adafruit FONA 3
Dependents: Adafruit_FONA_3G_Library_Test
Diff: Adafruit_FONA.h
- Revision:
- 10:7951d9691cb2
- Parent:
- 9:b18cfba4283a
--- a/Adafruit_FONA.h Tue Oct 23 19:16:20 2018 +0000 +++ b/Adafruit_FONA.h Mon Feb 25 20:27:24 2019 +0000 @@ -107,7 +107,8 @@ int readable(); // FONA 3G requirements - bool setBaudrate(uint16_t baud); + bool getBaudrate(uint32_t *baud); + bool setBaudrate(uint32_t baud); // RTC bool enableRTC(uint8_t i); // i = 0 <=> disable, i = 1 <=> enable @@ -276,10 +277,12 @@ bool sendCheckReply(const char* prefix, int32_t suffix, int32_t suffix2, const char* reply, uint16_t timeout = FONA_DEFAULT_TIMEOUT_MS); bool sendCheckReplyQuoted(const char* prefix, const char* suffix, const char* reply, uint16_t timeout = FONA_DEFAULT_TIMEOUT_MS); - bool parseReply(const char* toreply, uint16_t *v, char divider = ',', uint8_t index=0); - bool parseReply(const char* toreply, char *v, char divider = ',', uint8_t index=0); + bool parseReply(const char* toreply, uint32_t *v, char divider = ',', uint8_t index=0); + bool parseReply(const char* toreply, uint16_t *v, char divider = ',', uint8_t index=0); + bool parseReply(const char* toreply, char *v, char divider = ',', uint8_t index=0); bool parseReplyQuoted(const char* toreply, char* v, int maxlen, char divider, uint8_t index); + bool sendParseReply(const char* tosend, const char* toreply, uint32_t *v, char divider = ',', uint8_t index = 0); bool sendParseReply(const char* tosend, const char* toreply, uint16_t *v, char divider = ',', uint8_t index = 0); void onIncomingCall(); @@ -310,9 +313,11 @@ bool sslTCPclose(void); bool TCPsend(char *packet); bool sslTCPsend(char *packet); + uint16_t sslTCPread(char *buff); protected: bool sendParseReply(const char* tosend, const char* toreply, float *f, char divider, uint8_t index); + bool parseReply(const char* toreply, uint16_t *v, char divider = ',', uint8_t index=0); bool parseReply(const char* toreply, float *f, char divider, uint8_t index=0); };