gsmgnss 2.0.0.0
gsmgnss.h File Reference

This file contains API for GSM 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  gsmgnss_t
 Click ctx object definition. More...
 
struct  gsmgnss_cfg_t
 Click configuration structure definition. More...
 

Macros

#define GSMGNSS_MAP_MIKROBUS(cfg, mikrobus)
 
#define GSMGNSS_RETVAL   uint8_t
 
#define GSMGNSS_NMEA_GNGGA   1
 
#define GSMGNSS_NMEA_GNGLL   3
 
#define GSMGNSS_NMEA_GNGGA_NUM_ELEMENT   15
 
#define GSMGNSS_NMEA_GNGLL_NUM_ELEMENT   5
 
#define GSMGNSS_GNGGA_TIME   1
 
#define GSMGNSS_GNGGA_LATITUDE   2
 
#define GSMGNSS_GNGGA_LATITUDE_SIDE   3
 
#define GSMGNSS_GNGGA_LONGITUDE   4
 
#define GSMGNSS_GNGGA_LONGITUDE_SIDE   5
 
#define GSMGNSS_GNGGA_QUALITY_INDICATOR   6
 
#define GSMGNSS_GNGGA_NUMBER_OF_SATELLITES   7
 
#define GSMGNSS_GNGGA_H_DILUTION_OF_POS   8
 
#define GSMGNSS_GNGGA_ALTITUDE   9
 
#define GSMGNSS_GNGGA_ALTITUDE_UNIT   10
 
#define GSMGNSS_GNGGA_GEOIDAL_SEPARATION   11
 
#define GSMGNSS_GNGGA_GEOIDAL_SEPARATION_UNIT   12
 
#define GSMGNSS_GNGGA_TIME_SINCE_LAST_DGPS   13
 
#define GSMGNSS_GNGGA_DGPS_REFERENCE_STATION_ID   14
 
#define GSMGNSS_GNGLL_LATITUDE   1
 
#define GSMGNSS_GNGLL_LATITUDE_SIDE   2
 
#define GSMGNSS_GNGLL_LONGITUDE   3
 
#define GSMGNSS_GNGLL_LONGITUDE_SIDE   4
 
#define GSMGNSS_ERROR_COMMAND_OR_ELEMENT   0xFF
 
#define GSMGNSS_ERROR_START_OR_END_COMMAND   0x8F
 
#define GSMGNSS_ERROR_NEXT_ELEMENT   0x4F
 
#define GSMGNSS_ERROR_CURRENT_ELEMENT   0x2F
 
#define GSMGNSS_NO_ERROR   0x00
 
#define GSMGNSS_MODULE_POWER_ON   1
 
#define GSMGNSS_MODULE_POWER_OFF   0
 
#define GSMGNSS_CMD_AT   "AT"
 
#define GSMGNSS_CMD_ATI   "ATI"
 
#define GSMGNSS_CMD_CGMR   "AT+CGMR"
 
#define GSMGNSS_CMD_CFUN   "AT+CFUN"
 
#define GSMGNSS_CMD_CREG   "AT+CREG"
 
#define GSMGNSS_CMD_CGREG   "AT+CGREG"
 
#define GSMGNSS_CMD_CGDCONT   "AT+CGDCONT"
 
#define GSMGNSS_CMD_CIMI   "AT+CIMI"
 
#define GSMGNSS_CMD_CMEE   "AT+CMEE"
 
#define GSMGNSS_CMD_CGATT   "AT+CGATT"
 
#define GSMGNSS_CMD_CSQ   "AT+CSQ"
 
#define GSMGNSS_CMD_COPS   "AT+COPS"
 
#define GSMGNSS_CMD_CMGS   "AT+CMGS"
 
#define GSMGNSS_CMD_CMGF   "AT+CMGF"
 
#define GSMGNSS_CMD_QGNSSC   "AT+QGNSSC"
 
#define GSMGNSS_CMD_QGNSSRD   "AT+QGNSSRD"
 
#define DRV_RX_BUFFER_SIZE   256
 
#define DRV_TX_BUFFER_SIZE   256
 

Typedefs

typedef uint8_t gsmgnss_error_t
 Error type.
 

Enumerations

enum  GSMGNSS_return_value_t { GSMGNSS_OK = 0 , GSMGNSS_ERROR = -1 }
 GSM GNSS Click return value data. More...
 

Functions

void gsmgnss_cfg_setup (gsmgnss_cfg_t *cfg)
 Config Object Initialization function.
 
GSMGNSS_RETVAL gsmgnss_init (gsmgnss_t *ctx, gsmgnss_cfg_t *cfg)
 Initialization function.
 
void gsmgnss_module_power (gsmgnss_t *ctx, uint8_t state)
 Power ON/OFF the module.
 
void gsmgnss_generic_write (gsmgnss_t *ctx, char *data_buf, uint16_t len)
 Generic write function.
 
int32_t gsmgnss_generic_read (gsmgnss_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
void gsmgnss_set_rts (gsmgnss_t *ctx, uint8_t state)
 Sets state of the RTS pin.
 
uint8_t gsmgnss_get_cts (gsmgnss_t *ctx)
 CTS Pin Get function.
 
void gsmgnss_send_cmd (gsmgnss_t *ctx, char *cmd)
 Send command function.
 
void gsmgnss_send_cmd_with_parameter (gsmgnss_t *ctx, char *at_cmd_buf, char *param_buf)
 Send command function with parameter.
 
void gsmgnss_send_cmd_check (gsmgnss_t *ctx, char *at_cmd_buf)
 Check the sent command.
 
void gsmgnss_send_cmd_parameter_check (gsmgnss_t *ctx, char *at_cmd_buf)
 Check the command parameters.
 
void gsmgnss_set_sim_apn (gsmgnss_t *ctx, char *sim_apn)
 Set sim card APN.
 
void gsmgnss_send_sms_text (gsmgnss_t *ctx, char *phone_number, char *sms_text)
 GSM GNSS send SMS in text mode.
 
err_t gsmgnss_send_sms_pdu (gsmgnss_t *ctx, char *service_center_number, char *phone_number, char *sms_text)
 GSM GNSS send SMS in PDU mode.
 
gsmgnss_error_t gsmgnss_generic_parser (char *rsp, uint8_t command, uint8_t element, char *parser_buf)
 Generic parser function.
 

Detailed Description

This file contains API for GSM GNSS Click driver.