Network Component
Version 7.19.0
MDK Middleware for IPv4 and IPv6 Networking
|
Modem driver functions. More...
Structures | |
struct | DRIVER_MODEM |
Access structure of the Modem Driver. More... | |
Enumerations | |
enum | MODEM_STATUS { MODEM_OK = 0 , MODEM_ERROR = 1 } |
enum | MODEM_EVENT { MODEM_EVENT_OK , MODEM_EVENT_TIMEOUT , MODEM_EVENT_RESPONSE , MODEM_EVENT_ERROR } |
Functions | |
MODEM_STATUS | Modem_Initialize (Modem_Request_t cb_request, const char *init_string) |
Initialize Modem Device. More... | |
MODEM_STATUS | Modem_Uninitialize (void) |
De-initialize Modem Device. More... | |
MODEM_STATUS | Modem_Listen (void) |
Start Modem Device listening mode. More... | |
MODEM_STATUS | Modem_Dial (const char *dial_num) |
Start dialing target number. More... | |
MODEM_STATUS | Modem_Hangup (void) |
Hangup the line. More... | |
bool | Modem_IsOnline (void) |
Check if modem is online. More... | |
MODEM_STATUS | Modem_Notify (MODEM_EVENT event, const char *response) |
Notify the Modem Driver of completion event. More... | |
void | Modem_Request (const char *command, const char *response, uint32_t timeout, uint32_t retries) |
Request Callback function for the driver. More... | |
Modem driver functions.
The functions are part of the Network Component and are defined in Modem_Null.c and Modem_Standard.c.
struct DRIVER_MODEM |
Access structure of the Modem Driver.
Data Fields | |
MODEM_STATUS(* | Initialize )(Modem_Request_t cb_request, const char *init_string) |
Pointer to Modem_Initialize : Initialize Modem Device. More... | |
MODEM_STATUS(* | Uninitialize )(void) |
Pointer to Modem_Uninitialize : De-initialize Modem Device. More... | |
MODEM_STATUS(* | Listen )(void) |
Pointer to Modem_Listen : Start Modem Device listening mode. More... | |
MODEM_STATUS(* | Dial )(const char *dial_num) |
Pointer to Modem_Dial : Start dialing target number. More... | |
MODEM_STATUS(* | Hangup )(void) |
Pointer to Modem_Hangup : Hangup the line. More... | |
bool(* | IsOnline )(void) |
Pointer to Modem_IsOnline : Check if modem is online. More... | |
void(* | Notify )(MODEM_EVENT event, const char *response) |
Pointer to Modem_Notify : Notify the driver of completion event. More... | |
MODEM_STATUS(* Dial) (const char *dial_num) |
Pointer to Modem_Dial : Start dialing target number.
MODEM_STATUS(* Hangup) (void) |
Pointer to Modem_Hangup : Hangup the line.
MODEM_STATUS(* Initialize) (Modem_Request_t cb_request, const char *init_string) |
Pointer to Modem_Initialize : Initialize Modem Device.
bool(* IsOnline) (void) |
Pointer to Modem_IsOnline : Check if modem is online.
MODEM_STATUS(* Listen) (void) |
Pointer to Modem_Listen : Start Modem Device listening mode.
void(* Notify) (MODEM_EVENT event, const char *response) |
Pointer to Modem_Notify : Notify the driver of completion event.
MODEM_STATUS(* Uninitialize) (void) |
Pointer to Modem_Uninitialize : De-initialize Modem Device.
enum MODEM_EVENT |
enum MODEM_STATUS |
MODEM_STATUS Modem_Dial | ( | const char * | dial_num | ) |
Start dialing target number.
[in] | dial_num | Target number, a null-terminated string. |
MODEM_STATUS Modem_Hangup | ( | void | ) |
Hangup the line.
MODEM_STATUS Modem_Initialize | ( | Modem_Request_t | cb_request, |
const char * | init_string | ||
) |
Initialize Modem Device.
[in] | cb_request | Pointer to Modem_Request. |
[in] | init_string | Pointer to modem initialization string. |
bool Modem_IsOnline | ( | void | ) |
Check if modem is online.
MODEM_STATUS Modem_Listen | ( | void | ) |
Start Modem Device listening mode.
void Modem_Notify | ( | MODEM_EVENT | event, |
const char * | response | ||
) |
Notify the Modem Driver of completion event.
[in] | event | Notification event MODEM_EVENT. |
[in] | response | Actual modem response, a null-terminated string. |
void Modem_Request | ( | const char * | command, |
const char * | response, | ||
uint32_t | timeout, | ||
uint32_t | retries | ||
) |
Request Callback function for the driver.
[in] | command | Command to send to modem. |
[in] | response | Expected response from modem, or "#" for any response. |
[in] | timeout | Response timeout in milliseconds. |
[in] | retries | Number of retries. |
MODEM_STATUS Modem_Uninitialize | ( | void | ) |
De-initialize Modem Device.