lteiot2 2.0.0.0
|
Functions | |
void | lteiot2_cfg_setup (lteiot2_cfg_t *cfg) |
Config Object Initialization function. | |
LTEIOT2_RETVAL | lteiot2_init (lteiot2_t *ctx, lteiot2_cfg_t *cfg) |
Initialization function. | |
void | lteiot2_module_power (lteiot2_t *ctx, uint8_t state) |
Power ON/OFF the module. | |
void | lteiot2_generic_write (lteiot2_t *ctx, char *data_buf, uint16_t len) |
Generic write function. | |
int32_t | lteiot2_generic_read (lteiot2_t *ctx, char *data_buf, uint16_t max_len) |
Generic read function. | |
void | lteiot2_set_rts (lteiot2_t *ctx, uint8_t state) |
Sets state of the RTS pin. | |
uint8_t | lteiot2_get_cts (lteiot2_t *ctx) |
CTS Pin Get function. | |
void | lteiot2_send_cmd (lteiot2_t *ctx, char *cmd) |
Send command function. | |
void | lteiot2_send_cmd_with_parameter (lteiot2_t *ctx, char *at_cmd_buf, char *param_buf) |
Send command function with parameter. | |
void | lteiot2_send_cmd_check (lteiot2_t *ctx, char *at_cmd_buf) |
Check the sent command. | |
void | lteiot2_send_cmd_parameter_check (lteiot2_t *ctx, char *at_cmd_buf) |
Check the command parameters. | |
void | lteiot2_set_sim_apn (lteiot2_t *ctx, char *sim_apn) |
Set sim card APN. | |
void | lteiot2_send_sms_text (lteiot2_t *ctx, char *phone_number, char *sms_text) |
LTE IoT 2 send SMS in text mode. | |
err_t | lteiot2_send_sms_pdu (lteiot2_t *ctx, char *service_center_number, char *phone_number, char *sms_text) |
LTE IoT 2 send SMS in PDU mode. | |
lteiot2_error_t | lteiot2_generic_parser (char *rsp, uint8_t command, uint8_t element, char *parser_buf) |
Generic parser function. | |
void lteiot2_cfg_setup | ( | lteiot2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
lteiot2_error_t lteiot2_generic_parser | ( | char * | rsp, |
uint8_t | command, | ||
uint8_t | element, | ||
char * | parser_buf ) |
Generic parser function.
lteiot2 | Click object. |
command | NMEA ( GPS/GNSS ) command. |
element | Element position in command. |
parser_buf | Parser buffer for data storage. |
int32_t lteiot2_generic_read | ( | lteiot2_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
Generic read function.
ctx | Click object. |
data_buf | Data buffer for read data. |
max_len | The maximum length of data that can be read. |
void lteiot2_generic_write | ( | lteiot2_t * | ctx, |
char * | data_buf, | ||
uint16_t | len ) |
Generic write function.
ctx | Click object. |
data_buf | Data buffer for sends. |
len | Number of bytes for sends. |
uint8_t lteiot2_get_cts | ( | lteiot2_t * | ctx | ) |
CTS Pin Get function.
This function allows user to check state of the CTS pin.
[in] | ctx | : Click context object. See lteiot2_t object definition for detailed explanation. |
0
logical low. 1
logical high. LTEIOT2_RETVAL lteiot2_init | ( | lteiot2_t * | ctx, |
lteiot2_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void lteiot2_module_power | ( | lteiot2_t * | ctx, |
uint8_t | state ) |
Power ON/OFF the module.
ctx | Click object. |
state | 0 - power OFF, 1 - power ON. |
void lteiot2_send_cmd | ( | lteiot2_t * | ctx, |
char * | cmd ) |
Send command function.
This function sends the specified command to the click module.
[in] | ctx | : Click context object. See lteiot2_t object definition for detailed explanation. |
[in] | cmd | Command variable. |
void lteiot2_send_cmd_check | ( | lteiot2_t * | ctx, |
char * | at_cmd_buf ) |
Check the sent command.
This function checks the command that is sent.
[in] | ctx | : Click context object. See lteiot2_t object definition for detailed explanation. |
[in] | at_cmd_buf | Command buffer. |
void lteiot2_send_cmd_parameter_check | ( | lteiot2_t * | ctx, |
char * | at_cmd_buf ) |
Check the command parameters.
This function checks the command that is sent.
[in] | ctx | : Click context object. See lteiot2_t object definition for detailed explanation. |
[in] | at_cmd_buf | Command buffer. |
void lteiot2_send_cmd_with_parameter | ( | lteiot2_t * | ctx, |
char * | at_cmd_buf, | ||
char * | param_buf ) |
Send command function with parameter.
This function sends commands to the click module.
[in] | ctx | : Click context object. See lteiot2_t object definition for detailed explanation. |
[in] | at_cmd_buf | Command buffer. |
[in] | param_buf | Parameter buffer. |
err_t lteiot2_send_sms_pdu | ( | lteiot2_t * | ctx, |
char * | service_center_number, | ||
char * | phone_number, | ||
char * | sms_text ) |
LTE IoT 2 send SMS in PDU mode.
This function sends text message to a phone number in PDU mode.
[in] | ctx | : Click context object. See lteiot2_t object definition for detailed explanation. |
[in] | service_center_number | SMSC of the SIM card. |
[in] | phone_number | Phone number to message. |
[in] | sms_text | Message to be sent. |
>=0
- Success, <0
- Error.void lteiot2_send_sms_text | ( | lteiot2_t * | ctx, |
char * | phone_number, | ||
char * | sms_text ) |
LTE IoT 2 send SMS in text mode.
This function sends text message to a phone number.
[in] | ctx | : Click context object. See lteiot2_t object definition for detailed explanation. |
[in] | phone_number | Phone number to message. |
[in] | message_context | Message to be sent. |
void lteiot2_set_rts | ( | lteiot2_t * | ctx, |
uint8_t | state ) |
Sets state of the RTS pin.
This function sets RTS pin state.
[in] | ctx | : Click context object. See lteiot2_t object definition for detailed explanation. |
[in] | state | Pin state ( 1 or 0 ). |