lteiot 2.0.0.0
|
Functions | |
void | lteiot_cfg_setup (lteiot_cfg_t *cfg) |
LTE IoT configuration object setup function. | |
err_t | lteiot_init (lteiot_t *ctx, lteiot_cfg_t *cfg) |
LTE IoT initialization function. | |
err_t | lteiot_generic_write (lteiot_t *ctx, char *data_buf, uint16_t len) |
LTE IoT data writing function. | |
err_t | lteiot_generic_read (lteiot_t *ctx, char *data_buf, uint16_t max_len) |
LTE IoT data reading function. | |
void | lteiot_power_on (lteiot_t *ctx) |
LTE IoT module power on. | |
void | lteiot_set_rst (lteiot_t *ctx, uint8_t state) |
Sets state of the RST pin. | |
void | lteiot_set_rts (lteiot_t *ctx, uint8_t state) |
Sets state of the RTS pin. | |
uint8_t | lteiot_get_cts (lteiot_t *ctx) |
CTS Pin Get function. | |
void | lteiot_send_cmd (lteiot_t *ctx, char *cmd) |
Send command function. | |
void | lteiot_send_cmd_with_parameter (lteiot_t *ctx, char *at_cmd_buf, char *param_buf) |
Send command function with parameter. | |
void | lteiot_send_cmd_check (lteiot_t *ctx, char *at_cmd_buf) |
Check the sent command. | |
void | lteiot_send_cmd_parameter_check (lteiot_t *ctx, char *at_cmd_buf) |
Check the command parameters. | |
void | lteiot_set_sim_apn (lteiot_t *ctx, char *sim_apn) |
Set sim card APN. | |
void | lteiot_send_text_message (lteiot_t *ctx, char *phone_number, char *message_context) |
LTE IoT send text message. | |
void lteiot_cfg_setup | ( | lteiot_cfg_t * | cfg | ) |
LTE IoT configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See lteiot_cfg_t object definition for detailed explanation. |
err_t lteiot_generic_read | ( | lteiot_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
LTE IoT data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See lteiot_t object definition for detailed explanation. |
[out] | data_buf | : Output read data. |
[in] | max_len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer.err_t lteiot_generic_write | ( | lteiot_t * | ctx, |
char * | data_buf, | ||
uint16_t | len ) |
LTE IoT data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See lteiot_t object definition for detailed explanation. |
[in] | data_buf | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error.uint8_t lteiot_get_cts | ( | lteiot_t * | ctx | ) |
CTS Pin Get function.
This function allows user to check state of the CTS pin.
[in] | ctx | : Click context object. See lteiot_t object definition for detailed explanation. |
0
logical low. 1
logical high. err_t lteiot_init | ( | lteiot_t * | ctx, |
lteiot_cfg_t * | cfg ) |
LTE IoT initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See lteiot_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See lteiot_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void lteiot_power_on | ( | lteiot_t * | ctx | ) |
LTE IoT module power on.
This function resets the chip on LTE IoT click.
[in] | ctx | : Click context object. See lteiot_t object definition for detailed explanation. |
void lteiot_send_cmd | ( | lteiot_t * | ctx, |
char * | cmd ) |
Send command function.
This function sends the specified command to the click module.
[in] | ctx | : Click context object. See lteiot_t object definition for detailed explanation. |
[in] | cmd | Command variable. |
void lteiot_send_cmd_check | ( | lteiot_t * | ctx, |
char * | at_cmd_buf ) |
Check the sent command.
This function checks the command that is sent.
[in] | ctx | : Click context object. See lteiot_t object definition for detailed explanation. |
[in] | at_cmd_buf | Command buffer. |
void lteiot_send_cmd_parameter_check | ( | lteiot_t * | ctx, |
char * | at_cmd_buf ) |
Check the command parameters.
This function checks the command that is sent.
[in] | ctx | : Click context object. See lteiot_t object definition for detailed explanation. |
[in] | at_cmd_buf | Command buffer. |
void lteiot_send_cmd_with_parameter | ( | lteiot_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 lteiot_t object definition for detailed explanation. |
[in] | at_cmd_buf | Command buffer. |
[in] | param_buf | Parameter buffer. |
void lteiot_send_text_message | ( | lteiot_t * | ctx, |
char * | phone_number, | ||
char * | message_context ) |
LTE IoT send text message.
This function sends text message to a phone number.
[in] | ctx | : Click context object. See lteiot_t object definition for detailed explanation. |
[in] | phone_number | Phone number to message. |
[in] | message_context | Message to be sent. |
void lteiot_set_rst | ( | lteiot_t * | ctx, |
uint8_t | state ) |
Sets state of the RST pin.
This function sets RST pin state.
[in] | ctx | : Click context object. See lteiot_t object definition for detailed explanation. |
[in] | state | Pin state ( 1 or 0 ). |
void lteiot_set_rts | ( | lteiot_t * | ctx, |
uint8_t | state ) |
Sets state of the RTS pin.
This function sets RTS pin state.
[in] | ctx | : Click context object. See lteiot_t object definition for detailed explanation. |
[in] | state | Pin state ( 1 or 0 ). |