lteiot7 2.1.0.0
lteiot7.h File Reference

This file contains API for LTE IoT 7 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  lteiot7_t
 LTE IoT 7 Click context object. More...
 
struct  lteiot7_cfg_t
 LTE IoT 7 Click configuration object. More...
 

Macros

#define LTEIOT7_CMD_AT   "AT"
 LTE IoT 7 control commands.
 
#define LTEIOT7_CMD_ATI   "ATI"
 
#define LTEIOT7_CMD_CGMR   "AT+CGMR"
 
#define LTEIOT7_CMD_CFUN   "AT+CFUN"
 
#define LTEIOT7_CMD_CREG   "AT+CREG"
 
#define LTEIOT7_CMD_CGREG   "AT+CGREG"
 
#define LTEIOT7_CMD_CGDCONT   "AT+CGDCONT"
 
#define LTEIOT7_CMD_CIMI   "AT+CIMI"
 
#define LTEIOT7_CMD_CMEE   "AT+CMEE"
 
#define LTEIOT7_CMD_CGATT   "AT+CGATT"
 
#define LTEIOT7_CMD_CSQ   "AT+CSQ"
 
#define LTEIOT7_CMD_COPS   "AT+COPS"
 
#define LTEIOT7_CMD_CMGS   "AT+CMGS"
 
#define LTEIOT7_CMD_CMGF   "AT+CMGF"
 
#define LTEIOT7_CMD_CGACT   "AT+CGACT"
 
#define LTEIOT7_CMD_USOCR   "AT+USOCR"
 
#define LTEIOT7_CMD_USOCO   "AT+USOCO"
 
#define LTEIOT7_CMD_USOWR   "AT+USOWR"
 
#define LTEIOT7_CMD_USORD   "AT+USORD"
 
#define LTEIOT7_CMD_USORF   "AT+USORF"
 
#define LTEIOT7_CMD_USOCL   "AT+USOCL"
 
#define LTEIOT7_CMD_UGPS   "AT+UGPS"
 
#define LTEIOT7_CMD_UGGGA   "AT+UGGGA"
 
#define LTEIOT7_RSP_OK   "OK"
 LTE IoT 7 device response for AT commands.
 
#define LTEIOT7_RSP_ERROR   "ERROR"
 
#define LTEIOT7_POWER_STATE_SWITCH   0
 LTE IoT 7 power state settings.
 
#define LTEIOT7_POWER_STATE_ON   1
 
#define LTEIOT7_POWER_STATE_REBOOT   2
 
#define LTEIOT7_RSP_START   "$"
 LTE IoT 7 response buffer commands.
 
#define LTEIOT7_RSP_DELIMITER   ","
 
#define LTEIOT7_RSP_GPGGA   "$GPGGA"
 
#define LTEIOT7_GPGGA_ELEMENT_SIZE   15
 LTE IoT 7 GPGGA command elements.
 
#define LTEIOT7_GPGGA_TIME   1
 
#define LTEIOT7_GPGGA_LATITUDE   2
 
#define LTEIOT7_GPGGA_LATITUDE_SIDE   3
 
#define LTEIOT7_GPGGA_LONGITUDE   4
 
#define LTEIOT7_GPGGA_LONGITUDE_SIDE   5
 
#define LTEIOT7_GPGGA_QUALITY_INDICATOR   6
 
#define LTEIOT7_GPGGA_NUMBER_OF_SATELLITES   7
 
#define LTEIOT7_GPGGA_H_DILUTION_OF_POS   8
 
#define LTEIOT7_GPGGA_ALTITUDE   9
 
#define LTEIOT7_GPGGA_ALTITUDE_UNIT   10
 
#define LTEIOT7_GPGGA_GEOIDAL_SEPARATION   11
 
#define LTEIOT7_GPGGA_GEOIDAL_SEPARATION_UNIT   12
 
#define LTEIOT7_GPGGA_TIME_SINCE_LAST_DGPS   13
 
#define LTEIOT7_GPGGA_DGPS_REFERENCE_STATION_ID   14
 
#define DRV_BUFFER_SIZE   256
 LTE IoT 7 driver buffer size.
 
#define LTEIOT7_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  lteiot7_return_value_t {
  LTEIOT7_OK = 0 , LTEIOT7_ERROR = -1 , LTEIOT7_ERROR_TIMEOUT = -2 , LTEIOT7_ERROR_CMD = -3 ,
  LTEIOT7_ERROR_UNKNOWN = -4
}
 LTE IoT 7 Click return value data. More...
 

Functions

void lteiot7_cfg_setup (lteiot7_cfg_t *cfg)
 LTE IoT 7 configuration object setup function.
 
err_t lteiot7_init (lteiot7_t *ctx, lteiot7_cfg_t *cfg)
 LTE IoT 7 initialization function.
 
err_t lteiot7_generic_write (lteiot7_t *ctx, char *data_in, uint16_t len)
 LTE IoT 7 data writing function.
 
err_t lteiot7_generic_read (lteiot7_t *ctx, char *data_out, uint16_t len)
 LTE IoT 7 data reading function.
 
void lteiot7_set_pwr_pin (lteiot7_t *ctx, uint8_t state)
 LTE IoT 7 set PWR pin function.
 
void lteiot7_set_ein_pin (lteiot7_t *ctx, uint8_t state)
 LTE IoT 7 set EIN pin function.
 
void lteiot7_set_rts_pin (lteiot7_t *ctx, uint8_t state)
 LTE IoT 7 set RTS pin function.
 
uint8_t lteiot7_get_ri_pin (lteiot7_t *ctx)
 LTE IoT 7 get RI pin function.
 
uint8_t lteiot7_get_cts_pin (lteiot7_t *ctx)
 LTE IoT 7 get CTS pin function.
 
void lteiot7_set_power_state (lteiot7_t *ctx, uint8_t state)
 LTE IoT 7 set power state function.
 
void lteiot7_send_cmd (lteiot7_t *ctx, char *cmd)
 Send command function.
 
void lteiot7_send_cmd_with_parameter (lteiot7_t *ctx, char *at_cmd_buf, char *param_buf)
 Send command function with parameter.
 
void lteiot7_send_cmd_check (lteiot7_t *ctx, char *at_cmd_buf)
 Check the sent command.
 
void lteiot7_send_cmd_parameter_check (lteiot7_t *ctx, char *at_cmd_buf)
 Check the command parameters.
 
void lteiot7_set_sim_apn (lteiot7_t *ctx, char *sim_apn)
 Set sim card APN.
 
void lteiot7_send_sms_text (lteiot7_t *ctx, char *phone_number, char *sms_text)
 LTE IoT 7 send SMS in text mode.
 
err_t lteiot7_send_sms_pdu (lteiot7_t *ctx, char *service_center_number, char *phone_number, char *sms_text)
 LTE IoT 7 send SMS in PDU mode.
 
err_t lteiot7_parse_gpgga (char *rsp_buf, uint8_t gpgga_element, char *element_data)
 LTE IoT 7 parse GPGGA function.
 

Detailed Description

This file contains API for LTE IoT 7 Click Driver.

Enumeration Type Documentation

◆ lteiot7_return_value_t

LTE IoT 7 Click return value data.

Predefined enum values for driver return values.

Enumerator
LTEIOT7_OK 
LTEIOT7_ERROR 
LTEIOT7_ERROR_TIMEOUT 
LTEIOT7_ERROR_CMD 
LTEIOT7_ERROR_UNKNOWN