ltecat12 2.1.0.0
ltecat12.h File Reference

This file contains API for LTE Cat.1 2 Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  ltecat12_t
 LTE Cat.1 2 Click context object. More...
 
struct  ltecat12_cfg_t
 LTE Cat.1 2 Click configuration object. More...
 

Macros

#define LTECAT12_MAX9860_REG_INTR_STATS   0x00
 LTE Cat.1 2 MAX9860 registers.
 
#define LTECAT12_MAX9860_REG_MIC_NG_AGC   0x01
 
#define LTECAT12_MAX9860_REG_INTR_EN   0x02
 
#define LTECAT12_MAX9860_REG_SYS_CLK   0x03
 
#define LTECAT12_MAX9860_REG_STEREO_CLK_MSB   0x04
 
#define LTECAT12_MAX9860_REG_STEREO_CLK_LSB   0x05
 
#define LTECAT12_MAX9860_REG_AUDIO_INTERFACE_1   0x06
 
#define LTECAT12_MAX9860_REG_AUDIO_INTERFACE_2   0x07
 
#define LTECAT12_MAX9860_REG_VOICE_FILTER   0x08
 
#define LTECAT12_MAX9860_REG_DAC_ATTENUATION   0x09
 
#define LTECAT12_MAX9860_REG_ADC_OUTPUT_LEVELS   0x0A
 
#define LTECAT12_MAX9860_REG_DAC_GAIN   0x0B
 
#define LTECAT12_MAX9860_REG_MIC_GAIN   0x0C
 
#define LTECAT12_MAX9860_REG_MIC_AGC   0x0E
 
#define LTECAT12_MAX9860_REG_NOISE_GATE   0x0F
 
#define LTECAT12_MAX9860_REG_SYS_SHUTDOWN   0x10
 
#define LTECAT12_CMD_AT   "AT"
 LTE Cat.1 2 control commands.
 
#define LTECAT12_CMD_ATI   "ATI"
 
#define LTECAT12_CMD_CFUN   "AT+CFUN"
 
#define LTECAT12_CMD_CREG   "AT+CREG"
 
#define LTECAT12_CMD_CGDCONT   "AT+CGDCONT"
 
#define LTECAT12_CMD_CESQ   "AT+CESQ"
 
#define LTECAT12_CMD_COPS   "AT+COPS"
 
#define LTECAT12_CMD_CMGS   "AT+CMGS"
 
#define LTECAT12_CMD_CMGF   "AT+CMGF"
 
#define LTECAT12_CMD_CGPADDR   "AT+CGPADDR"
 
#define LTECAT12_CMD_SICA   "AT^SICA"
 
#define LTECAT12_CMD_SISS   "AT^SISS"
 
#define LTECAT12_CMD_SISO   "AT^SISO"
 
#define LTECAT12_CMD_SISW   "AT^SISW"
 
#define LTECAT12_CMD_SISR   "AT^SISR"
 
#define LTECAT12_CMD_SISC   "AT^SISC"
 
#define LTECAT12_CMD_SGPSC   "AT^SGPSC"
 
#define LTECAT12_CMD_CHUP   "AT+CHUP"
 
#define LTECAT12_CMD_SCFG   "AT^SCFG"
 
#define LTECAT12_CMD_SAIC   "AT^SAIC"
 
#define LTECAT12_CMD_SNFS   "AT^SNFS"
 
#define LTECAT12_CMD_ATD   "ATD"
 
#define LTECAT12_PSCLK_12MHZ   0x10
 LTE Cat.1 2 MAX9860 commands.
 
#define LTECAT12_LRCLK_8MHZ_MSB   0x10
 
#define LTECAT12_LRCLK_8MHZ_LSB   0x00
 
#define LTECAT12_DBCI_FALLING_EDGE   0x20
 
#define LTECAT12_HIZ_ENABLE   0x08
 
#define LTECAT12_TDM_ENABLE   0x04
 
#define LTECAT12_ABCI_FALLING_EDGE   0x20
 
#define LTECAT12_ADLY_ENABLE   0x10
 
#define LTECAT12_STEREO_ENABLE   0x08
 
#define LTECAT12_AVFLT_DISABLE   0x00
 
#define LTECAT12_DVFLT_DISABLE   0x00
 
#define LTECAT12_DVA_GAIN_0   0x06
 
#define LTECAT12_ADC_GAIN_3   0x00
 
#define LTECAT12_DAC_GAIN_0   0x00
 
#define LTECAT12_DVST_GAIN_0   0x01
 
#define LTECAT12_MIC_GAIN_0   0x20
 
#define LTECAT12_PGAM_GAIN_0   0x14
 
#define LTECAT12_AGCSRC_ENABLE   0x80
 
#define LTECAT12_ANTH_DISABLE   0x00
 
#define LTECAT12_AGCTH_MINUS_3   0x00
 
#define LTECAT12_POWER_ON   0x80
 
#define LTECAT12_DAC_ENABLE   0x08
 
#define LTECAT12_ADCL_ADCR_ENABLE   0x03
 
#define LTECAT12_PIN_STATE_HIGH   0x01
 LTE Cat.1 2 pin state.
 
#define LTECAT12_PIN_STATE_LOW   0x00
 
#define LTECAT12_RSP_OK   "OK"
 LTE Cat.1 2 device response for AT commands.
 
#define LTECAT12_RSP_ERROR   "ERROR"
 
#define LTECAT12_RSP_SYSSTART   "^SYSSTART"
 
#define LTECAT12_POWER_STATE_SWITCH   0
 LTE Cat.1 2 power state settings.
 
#define LTECAT12_POWER_STATE_ON   1
 
#define LTECAT12_POWER_STATE_REBOOT   2
 
#define LTECAT12_TX_DRV_BUFFER_SIZE   300
 LTE Cat.1 2 driver buffer size.
 
#define LTECAT12_RX_DRV_BUFFER_SIZE   300
 
#define LTECAT12_ADDRESS   0x10
 LTE Cat.1 2 device address setting.
 
#define LTECAT12_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  ltecat12_return_value_t {
  LTECAT12_OK = 0 , LTECAT12_ERROR = -1 , LTECAT12_ERROR_TIMEOUT = -2 , LTECAT12_ERROR_CMD = -3 ,
  LTECAT12_ERROR_UNKNOWN = -4
}
 LTE Cat.1 2 Click return value data. More...
 

Functions

void ltecat12_cfg_setup (ltecat12_cfg_t *cfg)
 LTE Cat.1 2 configuration object setup function.
 
err_t ltecat12_init (ltecat12_t *ctx, ltecat12_cfg_t *cfg)
 LTE Cat.1 2 initialization function.
 
err_t ltecat12_generic_write (ltecat12_t *ctx, uint8_t *data_in, uint16_t len)
 LTE Cat.1 2 data writing function.
 
err_t ltecat12_generic_read (ltecat12_t *ctx, uint8_t *data_out, uint16_t len)
 LTE Cat.1 2 data reading function.
 
err_t ltecat12_write_register (ltecat12_t *ctx, uint8_t reg, uint8_t data_in)
 LTE Cat.1 2 MAX9860 writing function.
 
err_t ltecat12_read_register (ltecat12_t *ctx, uint8_t reg, uint8_t *data_out)
 LTE Cat.1 2 MAX9860 reading function.
 
err_t ltecat12_max9860_cfg (ltecat12_t *ctx)
 LTE Cat.1 2 MAX9860 configuration function.
 
void ltecat12_set_fsd_pin (ltecat12_t *ctx, uint8_t state)
 LTE Cat.1 2 set fsd pin function.
 
void ltecat12_set_rts_pin (ltecat12_t *ctx, uint8_t state)
 LTE Cat.1 2 set rts pin function.
 
uint8_t ltecat12_get_cts_pin (ltecat12_t *ctx)
 LTE Cat.1 2 get cts pin function.
 
void ltecat12_send_cmd (ltecat12_t *ctx, uint8_t *cmd)
 LTE Cat.1 2 send command function.
 
void ltecat12_send_cmd_with_params (ltecat12_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf)
 LTE Cat.1 2 send command function with parameter.
 
void ltecat12_send_cmd_check (ltecat12_t *ctx, uint8_t *at_cmd_buf)
 LTE Cat.1 2 check the sent command.
 
void ltecat12_send_cmd_parameter_check (ltecat12_t *ctx, uint8_t *at_cmd_buf)
 LTE Cat.1 2 check the command parameters.
 
void ltecat12_set_sim_apn (ltecat12_t *ctx, uint8_t *sim_apn)
 LTE Cat.1 2 set sim card APN.
 
void ltecat12_send_sms_text (ltecat12_t *ctx, uint8_t *phone_number, uint8_t *sms_text)
 LTE Cat.1 2 send SMS in text mode.
 
err_t ltecat12_send_sms_pdu (ltecat12_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text)
 LTE Cat.1 2 send SMS in PDU mode.
 

Detailed Description

This file contains API for LTE Cat.1 2 Click Driver.

Enumeration Type Documentation

◆ ltecat12_return_value_t

LTE Cat.1 2 Click return value data.

Predefined enum values for driver return values.

Enumerator
LTECAT12_OK 
LTECAT12_ERROR 
LTECAT12_ERROR_TIMEOUT 
LTECAT12_ERROR_CMD 
LTECAT12_ERROR_UNKNOWN