lteiot14  2.1.0.0
Data Structures | Macros | Enumerations | Functions
lteiot14.h File Reference

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

Macros

#define LTEIOT14_CMD_AT   "AT"
 LTE IoT 14 control commands. More...
 
#define LTEIOT14_CMD_GET_MODEL_ID   "AT+CGMM"
 
#define LTEIOT14_CMD_GET_SW_VERSION   "AT+CGMR"
 
#define LTEIOT14_CMD_GET_SERIAL_NUM   "AT+CGSN"
 
#define LTEIOT14_CMD_SET_PHONE_FUNCTIONALITY   "AT+CFUN"
 
#define LTEIOT14_CMD_NETWORK_REGISTRATION   "AT+CREG"
 
#define LTEIOT14_CMD_SIGNAL_QUALITY_REPORT   "AT+CSQ"
 
#define LTEIOT14_CMD_OPERATOR_SELECTION   "AT+COPS"
 
#define LTEIOT14_CMD_SEND_SMS   "AT+CMGS"
 
#define LTEIOT14_CMD_SELECT_SMS_FORMAT   "AT+CMGF"
 
#define LTEIOT14_CMD_DEFINE_PDP_CONTEXT   "AT+CGDCONT"
 
#define LTEIOT14_CMD_ACTIVATE_PDP_CONTEXT   "AT+CGACT"
 
#define LTEIOT14_CMD_SHOW_PDP_ADDRESS   "AT+CGPADDR"
 
#define LTEIOT14_CMD_APP_NETWORK_ACTIVE   "AT+CNACT"
 
#define LTEIOT14_CMD_SET_TCP_UDP_ID   "AT+CACID"
 
#define LTEIOT14_CMD_OPEN_TCP_UDP_CONNECTION   "AT+CAOPEN"
 
#define LTEIOT14_CMD_SEND_DATA_VIA_CONNECTION   "AT+CASEND"
 
#define LTEIOT14_CMD_RECEIVE_DATA_VIA_CONNECTION   "AT+CARECV"
 
#define LTEIOT14_CMD_CLOSE_TCP_UDP_CONNECTION   "AT+CACLOSE"
 
#define LTEIOT14_CMD_GNSS_POWER_CONTROL   "AT+CGNSPWR"
 
#define LTEIOT14_CMD_GET_GNSS_INFO   "AT+CGNSINF"
 
#define LTEIOT14_RSP_OK   "OK"
 LTE IoT 14 device response for AT commands. More...
 
#define LTEIOT14_RSP_ERROR   "ERROR"
 
#define LTEIOT14_URC_RECEIVED_DATA   "+CADATAIND:"
 LTE IoT 14 device unsolicited response code (URC) settings. More...
 
#define LTEIOT14_URC_GNSS_INFO   "+CGNSINF:"
 
#define LTEIOT14_POWER_STATE_OFF   0
 LTE IoT 14 power state settings. More...
 
#define LTEIOT14_POWER_STATE_ON   1
 
#define LTEIOT14_POWER_STATE_RESET   2
 
#define LTEIOT14_TX_DRV_BUFFER_SIZE   256
 LTE IoT 14 driver buffer size. More...
 
#define LTEIOT14_RX_DRV_BUFFER_SIZE   256
 
#define LTEIOT14_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  lteiot14_return_value_t {
  LTEIOT14_OK = 0, LTEIOT14_ERROR = -1, LTEIOT14_ERROR_TIMEOUT = -2, LTEIOT14_ERROR_CMD = -3,
  LTEIOT14_ERROR_UNKNOWN = -4
}
 LTE IoT 14 Click return value data. More...
 

Functions

void lteiot14_cfg_setup (lteiot14_cfg_t *cfg)
 LTE IoT 14 configuration object setup function. More...
 
err_t lteiot14_init (lteiot14_t *ctx, lteiot14_cfg_t *cfg)
 LTE IoT 14 initialization function. More...
 
err_t lteiot14_generic_write (lteiot14_t *ctx, uint8_t *data_in, uint16_t len)
 LTE IoT 14 data writing function. More...
 
err_t lteiot14_generic_read (lteiot14_t *ctx, uint8_t *data_out, uint16_t len)
 LTE IoT 14 data reading function. More...
 
void lteiot14_set_pwr_pin (lteiot14_t *ctx, uint8_t state)
 LTE IoT 14 set PWR pin function. More...
 
void lteiot14_set_rst_pin (lteiot14_t *ctx, uint8_t state)
 LTE IoT 14 set RST pin function. More...
 
void lteiot14_set_rts_pin (lteiot14_t *ctx, uint8_t state)
 LTE IoT 14 set RTS pin function. More...
 
uint8_t lteiot14_get_ring_pin (lteiot14_t *ctx)
 LTE IoT 14 get RING pin function. More...
 
uint8_t lteiot14_get_cts_pin (lteiot14_t *ctx)
 LTE IoT 14 get CTS pin function. More...
 
void lteiot14_set_power_state (lteiot14_t *ctx, uint8_t state)
 LTE IoT 14 set power state function. More...
 
void lteiot14_send_cmd (lteiot14_t *ctx, uint8_t *cmd)
 Send command function. More...
 
void lteiot14_send_cmd_par (lteiot14_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf)
 Send command function with parameter. More...
 
void lteiot14_send_cmd_check (lteiot14_t *ctx, uint8_t *at_cmd_buf)
 Check the sent command. More...
 
void lteiot14_set_sim_apn (lteiot14_t *ctx, uint8_t *sim_apn)
 Set sim card APN. More...
 
void lteiot14_send_sms_text (lteiot14_t *ctx, uint8_t *phone_number, uint8_t *sms_text)
 LTE IoT 14 send SMS in text mode. More...
 
err_t lteiot14_send_sms_pdu (lteiot14_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text)
 LTE IoT 14 send SMS in PDU mode. More...
 

Detailed Description

This file contains API for LTE IoT 14 Click Driver.

Enumeration Type Documentation

◆ lteiot14_return_value_t

LTE IoT 14 Click return value data.

Predefined enum values for driver return values.

Enumerator
LTEIOT14_OK 
LTEIOT14_ERROR 
LTEIOT14_ERROR_TIMEOUT 
LTEIOT14_ERROR_CMD 
LTEIOT14_ERROR_UNKNOWN