Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MBed_Adafruit-GPS-Library SDFileSystem mbed
Fork of GPR_Interface by
Modem Class Reference
#include <modem.h>
Inherited by GPRS.
Public Member Functions | |
| Modem (PinName tx, PinName rx, int baudRate) | |
| Create Modem Instance. | |
Protected Member Functions | |
| void | preInit (void) |
| Power on Modem. | |
| bool | readable () |
| check serialModem is readable or not | |
| char | readByte (void) |
| read one byte from serialModem | |
| int | readBuffer (char *buffer, int count, unsigned int timeOut) |
| read from Modem module and save to buffer array | |
| void | cleanBuffer (char *buffer, int count) |
| clean Buffer | |
| void | sendCmd (const char *cmd) |
| send AT command to Modem module | |
| void | sendATTest (void) |
| send "AT" to Modem module | |
| bool | respCmp (const char *resp, unsigned int len, unsigned int timeout) |
| compare the response from GPRS module with a string | |
| int | waitForResp (const char *resp, unsigned int timeout, DataType type) |
| check Modem module response before time out | |
| int | sendCmdAndWaitForResp (const char *data, const char *resp, unsigned timeout, DataType type) |
| send AT command to GPRS module and wait for correct response | |
Detailed Description
Modem class.
Used for Modem communication. attention that Modem module communicate with MCU in serial protocol
Definition at line 38 of file modem.h.
Constructor & Destructor Documentation
| Modem | ( | PinName | tx, |
| PinName | rx, | ||
| int | baudRate | ||
| ) |
Member Function Documentation
| void cleanBuffer | ( | char * | buffer, |
| int | count | ||
| ) | [protected] |
| bool readable | ( | void | ) | [protected] |
| int readBuffer | ( | char * | buffer, |
| int | count, | ||
| unsigned int | timeOut | ||
| ) | [protected] |
| char readByte | ( | void | ) | [protected] |
| bool respCmp | ( | const char * | resp, |
| unsigned int | len, | ||
| unsigned int | timeout | ||
| ) | [protected] |
| void sendATTest | ( | void | ) | [protected] |
| void sendCmd | ( | const char * | cmd ) | [protected] |
| int sendCmdAndWaitForResp | ( | const char * | data, |
| const char * | resp, | ||
| unsigned | timeout, | ||
| DataType | type | ||
| ) | [protected] |
| int waitForResp | ( | const char * | resp, |
| unsigned int | timeout, | ||
| DataType | type | ||
| ) | [protected] |
Generated on Wed Jul 13 2022 11:50:29 by
1.7.2
