gnss11 2.1.0.0
gnss11.h File Reference

This file contains API for GNSS 11 Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  gnss11_s
 GNSS 11 Click context object. More...
 
struct  gnss11_cfg_t
 GNSS 11 Click configuration object. More...
 

Macros

#define GNSS11_RSP_START   "$"
 GNSS 11 response buffer commands.
 
#define GNSS11_RSP_DELIMITER   ","
 
#define GNSS11_RSP_END   "\r\n"
 
#define GNSS11_RSP_GGA   "GGA"
 
#define GNSS11_GGA_ELEMENT_SIZE   15
 GNSS 11 GGA command elements.
 
#define GNSS11_GGA_TIME   1
 
#define GNSS11_GGA_LATITUDE   2
 
#define GNSS11_GGA_LATITUDE_SIDE   3
 
#define GNSS11_GGA_LONGITUDE   4
 
#define GNSS11_GGA_LONGITUDE_SIDE   5
 
#define GNSS11_GGA_QUALITY_INDICATOR   6
 
#define GNSS11_GGA_NUMBER_OF_SATELLITES   7
 
#define GNSS11_GGA_H_DILUTION_OF_POS   8
 
#define GNSS11_GGA_ALTITUDE   9
 
#define GNSS11_GGA_ALTITUDE_UNIT   10
 
#define GNSS11_GGA_GEOIDAL_SEPARATION   11
 
#define GNSS11_GGA_GEOIDAL_SEPARATION_UNIT   12
 
#define GNSS11_GGA_TIME_SINCE_LAST_DGPS   13
 
#define GNSS11_GGA_DGPS_REFERENCE_STATION_ID   14
 
#define GNSS11_DUMMY   0xFF
 GNSS 11 dummy data.
 
#define GNSS11_SET_DEV_ADDR   0x42
 GNSS 11 device address setting.
 
#define GNSS11_TX_DRV_BUFFER_SIZE   100
 GNSS 11 driver buffer size.
 
#define GNSS11_RX_DRV_BUFFER_SIZE   1000
 
#define GNSS11_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define GNSS11_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define GNSS11_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Typedefs

typedef err_t(* gnss11_master_io_t) (struct gnss11_s *, uint8_t *, uint16_t)
 
typedef struct gnss11_s gnss11_t
 GNSS 11 Click context object.
 

Enumerations

enum  gnss11_drv_t { GNSS11_DRV_SEL_UART , GNSS11_DRV_SEL_SPI , GNSS11_DRV_SEL_I2C }
 GNSS 11 Click driver selector. More...
 
enum  gnss11_return_value_t { GNSS11_OK = 0 , GNSS11_ERROR = -1 }
 GNSS 11 Click return value data. More...
 

Functions

void gnss11_cfg_setup (gnss11_cfg_t *cfg)
 GNSS 11 configuration object setup function.
 
err_t gnss11_init (gnss11_t *ctx, gnss11_cfg_t *cfg)
 GNSS 11 initialization function.
 
void gnss11_drv_interface_selection (gnss11_cfg_t *cfg, gnss11_drv_t drv_sel)
 GNSS 11 driver interface setup function.
 
err_t gnss11_default_cfg (gnss11_t *ctx)
 GNSS 11 default configuration function.
 
err_t gnss11_generic_write (gnss11_t *ctx, uint8_t *data_in, uint16_t len)
 GNSS 11 data writing function.
 
err_t gnss11_generic_read (gnss11_t *ctx, uint8_t *data_out, uint16_t len)
 GNSS 11 data reading function.
 
uint8_t gnss11_get_ovc_pin (gnss11_t *ctx)
 GNSS 11 get OVC pin function.
 
void gnss11_set_rst_pin (gnss11_t *ctx, uint8_t state)
 GNSS 11 set RST pin function.
 
void gnss11_set_ant_on_pin (gnss11_t *ctx, uint8_t state)
 GNSS 11 set ANT_ON pin function.
 
uint8_t gnss11_get_eint_pin (gnss11_t *ctx)
 GNSS 11 get Ext INT pin function.
 
void gnss11_reset_device (gnss11_t *ctx)
 GNSS 11 reset device function.
 
err_t gnss11_parse_gga (uint8_t *rsp_buf, uint8_t gga_element, uint8_t *element_data)
 GNSS 11 parse GGA function.
 

Detailed Description

This file contains API for GNSS 11 Click Driver.

Typedef Documentation

◆ gnss11_master_io_t

typedef err_t(* gnss11_master_io_t) (struct gnss11_s *, uint8_t *, uint16_t)

Driver serial interface.

◆ gnss11_t

typedef struct gnss11_s gnss11_t

GNSS 11 Click context object.

Context object definition of GNSS 11 Click driver.

Enumeration Type Documentation

◆ gnss11_drv_t

GNSS 11 Click driver selector.

Selects target driver interface of GNSS 11 Click driver.

Enumerator
GNSS11_DRV_SEL_UART 

UART driver descriptor.

GNSS11_DRV_SEL_SPI 

SPI driver descriptor.

GNSS11_DRV_SEL_I2C 

I2C driver descriptor.

◆ gnss11_return_value_t

GNSS 11 Click return value data.

Predefined enum values for driver return values.

Enumerator
GNSS11_OK 
GNSS11_ERROR