lteiot 2.0.0.0
lteiot.h File Reference

This file contains API for LTE IoT Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  lteiot_t
 Click ctx object definition. More...
 
struct  lteiot_cfg_t
 Click configuration structure definition. More...
 

Macros

#define LTEIOT_MAP_MIKROBUS(cfg, mikrobus)
 
#define LTEIOT_RETVAL   uint8_t
 
#define LTEIOT_OK   0x00
 
#define LTEIOT_INIT_ERROR   0xFF
 
#define LTEIOT_MODULE_POWER_ON   1
 
#define LTEIOT_MODULE_POWER_OFF   0
 
#define LTEIOT_CMD_AT   "AT"
 
#define LTEIOT_CMD_ATI   "ATI"
 
#define LTEIOT_CMD_CGMR   "AT+CGMR"
 
#define LTEIOT_CMD_CFUN   "AT+CFUN"
 
#define LTEIOT_CMD_CREG   "AT+CREG"
 
#define LTEIOT_CMD_CEREG   "AT+CEREG"
 
#define LTEIOT_CMD_CGDCONT   "AT+CGDCONT"
 
#define LTEIOT_CMD_CIMI   "AT+CIMI"
 
#define LTEIOT_CMD_CGATT   "AT+CGATT"
 
#define LTEIOT_CMD_CSQ   "AT+CSQ"
 
#define LTEIOT_CMD_CESQ   "AT+CESQ"
 
#define LTEIOT_CMD_COPS   "AT+COPS"
 
#define DRV_RX_BUFFER_SIZE   500
 
#define DRV_TX_BUFFER_SIZE   100
 

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.
 

Detailed Description

This file contains API for LTE IoT Click driver.