c4gltegnss 2.1.0.0
c4gltegnss.h File Reference

This file contains API for 4G LTE GNSS 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  c4gltegnss_t
 4G LTE GNSS Click context object. More...
 
struct  c4gltegnss_cfg_t
 4G LTE GNSS Click configuration object. More...
 

Macros

#define C4GLTEGNSS_CMD_AT   "AT"
 4G LTE GNSS control commands.
 
#define C4GLTEGNSS_CMD_ATI   "ATI"
 
#define C4GLTEGNSS_CMD_CGMR   "AT+CGMR"
 
#define C4GLTEGNSS_CMD_CFUN   "AT+CFUN"
 
#define C4GLTEGNSS_CMD_CREG   "AT+CREG"
 
#define C4GLTEGNSS_CMD_CGREG   "AT+CGREG"
 
#define C4GLTEGNSS_CMD_CGDCONT   "AT+CGDCONT"
 
#define C4GLTEGNSS_CMD_CIMI   "AT+CIMI"
 
#define C4GLTEGNSS_CMD_CMEE   "AT+CMEE"
 
#define C4GLTEGNSS_CMD_CGATT   "AT+CGATT"
 
#define C4GLTEGNSS_CMD_CSQ   "AT+CSQ"
 
#define C4GLTEGNSS_CMD_COPS   "AT+COPS"
 
#define C4GLTEGNSS_CMD_CMGS   "AT+CMGS"
 
#define C4GLTEGNSS_CMD_CMGF   "AT+CMGF"
 
#define C4GLTEGNSS_CMD_CGACT   "AT+CGACT"
 
#define C4GLTEGNSS_CMD_UPSDA   "AT+UPSDA"
 
#define C4GLTEGNSS_CMD_USOCR   "AT+USOCR"
 
#define C4GLTEGNSS_CMD_USOCO   "AT+USOCO"
 
#define C4GLTEGNSS_CMD_USOWR   "AT+USOWR"
 
#define C4GLTEGNSS_CMD_USORD   "AT+USORD"
 
#define C4GLTEGNSS_CMD_USORF   "AT+USORF"
 
#define C4GLTEGNSS_CMD_USOCL   "AT+USOCL"
 
#define C4GLTEGNSS_CMD_UGPS   "AT+UGPS"
 
#define C4GLTEGNSS_CMD_UGGGA   "AT+UGGGA"
 
#define C4GLTEGNSS_RSP_OK   "OK"
 4G LTE GNSS device response for AT commands.
 
#define C4GLTEGNSS_RSP_ERROR   "ERROR"
 
#define C4GLTEGNSS_POWER_STATE_OFF   0
 4G LTE GNSS power state settings.
 
#define C4GLTEGNSS_POWER_STATE_ON   1
 
#define C4GLTEGNSS_RSP_START   "$"
 4G LTE GNSS response buffer commands.
 
#define C4GLTEGNSS_RSP_DELIMITER   ","
 
#define C4GLTEGNSS_RSP_END   "\r\n"
 
#define C4GLTEGNSS_RSP_GGA   "GGA"
 
#define C4GLTEGNSS_GGA_ELEMENT_SIZE   15
 4G LTE GNSS GGA command elements.
 
#define C4GLTEGNSS_GGA_TIME   1
 
#define C4GLTEGNSS_GGA_LATITUDE   2
 
#define C4GLTEGNSS_GGA_LATITUDE_SIDE   3
 
#define C4GLTEGNSS_GGA_LONGITUDE   4
 
#define C4GLTEGNSS_GGA_LONGITUDE_SIDE   5
 
#define C4GLTEGNSS_GGA_QUALITY_INDICATOR   6
 
#define C4GLTEGNSS_GGA_NUMBER_OF_SATELLITES   7
 
#define C4GLTEGNSS_GGA_H_DILUTION_OF_POS   8
 
#define C4GLTEGNSS_GGA_ALTITUDE   9
 
#define C4GLTEGNSS_GGA_ALTITUDE_UNIT   10
 
#define C4GLTEGNSS_GGA_GEOIDAL_SEPARATION   11
 
#define C4GLTEGNSS_GGA_GEOIDAL_SEPARATION_UNIT   12
 
#define C4GLTEGNSS_GGA_TIME_SINCE_LAST_DGPS   13
 
#define C4GLTEGNSS_GGA_DGPS_REFERENCE_STATION_ID   14
 
#define C4GLTEGNSS_TX_DRV_BUFFER_SIZE   256
 4G LTE GNSS driver buffer size.
 
#define C4GLTEGNSS_RX_DRV_BUFFER_SIZE   256
 
#define C4GLTEGNSS_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  c4gltegnss_return_value_t {
  C4GLTEGNSS_OK = 0 , C4GLTEGNSS_ERROR = -1 , C4GLTEGNSS_ERROR_TIMEOUT = -2 , C4GLTEGNSS_ERROR_CMD = -3 ,
  C4GLTEGNSS_ERROR_UNKNOWN = -4
}
 4G LTE GNSS Click return value data. More...
 

Functions

void c4gltegnss_cfg_setup (c4gltegnss_cfg_t *cfg)
 4G LTE GNSS configuration object setup function.
 
err_t c4gltegnss_init (c4gltegnss_t *ctx, c4gltegnss_cfg_t *cfg)
 4G LTE GNSS initialization function.
 
err_t c4gltegnss_generic_write (c4gltegnss_t *ctx, uint8_t *data_in, uint16_t len)
 4G LTE GNSS data writing function.
 
err_t c4gltegnss_generic_read (c4gltegnss_t *ctx, uint8_t *data_out, uint16_t len)
 4G LTE GNSS data reading function.
 
void c4gltegnss_set_pwr_pin (c4gltegnss_t *ctx, uint8_t state)
 4G LTE GNSS set PWR pin function.
 
void c4gltegnss_set_rts_pin (c4gltegnss_t *ctx, uint8_t state)
 4G LTE GNSS set rts pin function.
 
uint8_t c4gltegnss_get_ri_pin (c4gltegnss_t *ctx)
 4G LTE GNSS get RI pin function.
 
uint8_t c4gltegnss_get_cts_pin (c4gltegnss_t *ctx)
 4G LTE GNSS get cts pin function.
 
void c4gltegnss_set_power_state (c4gltegnss_t *ctx, uint8_t state)
 4G LTE GNSS set power state function.
 
void c4gltegnss_send_cmd (c4gltegnss_t *ctx, uint8_t *cmd)
 Send command function.
 
void c4gltegnss_send_cmd_with_par (c4gltegnss_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf)
 Send command function with parameter.
 
void c4gltegnss_send_cmd_check (c4gltegnss_t *ctx, uint8_t *at_cmd_buf)
 Check the sent command.
 
void c4gltegnss_send_cmd_par_check (c4gltegnss_t *ctx, uint8_t *at_cmd_buf)
 Check the command parameters.
 
void c4gltegnss_set_sim_apn (c4gltegnss_t *ctx, uint8_t *sim_apn)
 Set sim card APN.
 
void c4gltegnss_send_sms_text (c4gltegnss_t *ctx, uint8_t *phone_number, uint8_t *sms_text)
 4G LTE GNSS send SMS in text mode.
 
err_t c4gltegnss_send_sms_pdu (c4gltegnss_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text)
 4G LTE GNSS send SMS in PDU mode.
 
err_t c4gltegnss_parse_gga (uint8_t *rsp_buf, uint8_t gga_element, uint8_t *element_data)
 4G LTE GNSS parse GGA function.
 

Detailed Description

This file contains API for 4G LTE GNSS Click Driver.

Enumeration Type Documentation

◆ c4gltegnss_return_value_t

4G LTE GNSS Click return value data.

Predefined enum values for driver return values.

Enumerator
C4GLTEGNSS_OK 
C4GLTEGNSS_ERROR 
C4GLTEGNSS_ERROR_TIMEOUT 
C4GLTEGNSS_ERROR_CMD 
C4GLTEGNSS_ERROR_UNKNOWN