Adafruit FONA 800H breakout
Dependencies: mbed
Diff: Adafruit_FONA.h
- Revision:
- 16:18750ad91289
- Parent:
- 15:19a02a88836a
--- a/Adafruit_FONA.h Wed Mar 30 02:35:20 2016 +0000 +++ b/Adafruit_FONA.h Tue Mar 29 22:51:02 2016 -0400 @@ -267,27 +267,104 @@ uint8_t getIMEI(char *imei); // set Audio output---------------------------------------------------------------------- + /** Set the Audio Output interface + @param a 0 is headset, 1 is external audio + @return TRUE if successful + */ bool setAudio(uint8_t a); + + /** Set the Audio Volume + @param i a unit8_t volume number + @return TRUE if successful + */ bool setVolume(uint8_t i); + + /** Get the Audio Volume + @return the current volume + */ uint8_t getVolume(void); bool playToolkitTone(uint8_t t, uint16_t len); bool setMicVolume(uint8_t a, uint8_t level); bool playDTMF(char tone); // FM radio functions---------------------------------------------------------------------- + /** Tune the FM radio + @param station frequency, for example 107.9 MHz -> 1079 + @return TRUE if successful + */ bool tuneFMradio(uint16_t station); + + /** FM radio set output + @param onoff bool to turn on if TRUE + @param a 0 (default) is headset, 1 is external audio + @return TRUE if successful + */ bool FMradio(bool onoff, uint8_t a = FONA_HEADSETAUDIO); + + /** Set the FM Radio Volume + @param i a unit8_t volume number + @return TRUE if successful + */ bool setFMVolume(uint8_t i); + + /** Get the FM Volume + @return the current FM volume + */ int8_t getFMVolume(); + + /** Get the FM signal strength + @param station a unit8_t volume number + @return TRUE if successful + */ int8_t getFMSignalLevel(uint16_t station); // SMS handling---------------------------------------------------------------------- + /** Set the SMS Interrupt + @param i 0 = OFF, 1 = ON with TCPIP, FTP, and URC control Ring Indicator Pin, 2 = ON with only TCPIP control + @return TRUE if successful + @see https://www.adafruit.com/datasheets/sim800_series_at_command_manual_v1.01.pdf page 152 + */ bool setSMSInterrupt(uint8_t i); + + /** Get SMS Interrupt Setting + @return setting + @see https://www.adafruit.com/datasheets/sim800_series_at_command_manual_v1.01.pdf page 152 + */ uint8_t getSMSInterrupt(void); + + /** Set the SMS Interrupt + @return number of SMS messages in inbox + */ int8_t getNumSMS(void); + + /** Read SMS + @param i sms number in memory + @param smsbuff char pointer to char array + @param max Maximum length of smsbuff + @param readsize the size in bytes of the SMS + @return TRUE if successful + */ bool readSMS(uint8_t i, char *smsbuff, uint16_t max, uint16_t *readsize); + + /** Send SMS + @param smsaddr Phone number to send out + @param smsmsg Char array containing message + @return TRUE if successful + */ bool sendSMS(char *smsaddr, char *smsmsg); + + /** Delete SMS + @param i number of SMS in memory + @return TRUE if successful + */ bool deleteSMS(uint8_t i); + + /** Send SMS + @param i Number of SMS in memory + @param sender Char array to store the sender number + @param senderlen length of sender + @return TRUE if successful + */ bool getSMSSender(uint8_t i, char *sender, int senderlen); // Time----------------------------------------------------------------------