gnss13 2.1.0.0
gnss13.h File Reference

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

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

Go to the source code of this file.

Data Structures

struct  gnss13_s
 GNSS 13 Click context object. More...
 
struct  gnss13_cfg_t
 GNSS 13 Click configuration object. More...
 

Macros

#define GNSS13_RSP_START   "$"
 GNSS 13 response buffer commands.
 
#define GNSS13_RSP_DELIMITER   ","
 
#define GNSS13_RSP_END_SEQ   "\r\n"
 
#define GNSS13_RSP_GNGGA   "$GNGGA"
 
#define GNSS13_GNGGA_ELEMENT_SIZE   15
 GNSS 13 GNGGA command elements.
 
#define GNSS13_GNGGA_TIME   1
 
#define GNSS13_GNGGA_LATITUDE   2
 
#define GNSS13_GNGGA_LATITUDE_SIDE   3
 
#define GNSS13_GNGGA_LONGITUDE   4
 
#define GNSS13_GNGGA_LONGITUDE_SIDE   5
 
#define GNSS13_GNGGA_QUALITY_INDICATOR   6
 
#define GNSS13_GNGGA_NUMBER_OF_SATELLITES   7
 
#define GNSS13_GNGGA_H_DILUTION_OF_POS   8
 
#define GNSS13_GNGGA_ALTITUDE   9
 
#define GNSS13_GNGGA_ALTITUDE_UNIT   10
 
#define GNSS13_GNGGA_GEOIDAL_SEPARATION   11
 
#define GNSS13_GNGGA_GEOIDAL_SEPARATION_UNIT   12
 
#define GNSS13_GNGGA_TIME_SINCE_LAST_DGPS   13
 
#define GNSS13_GNGGA_DGPS_REFERENCE_STATION_ID   14
 
#define GNSS13_DEVICE_ADDRESS   0x10
 GNSS 13 device address setting.
 
#define GNSS13_DRV_TX_BUFFER_SIZE   100
 GNSS 13 driver buffer size.
 
#define GNSS13_DRV_RX_BUFFER_SIZE   1200
 
#define GNSS13_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Typedefs

typedef err_t(* gnss13_master_io_t) (struct gnss13_s *, uint8_t *, uint8_t)
 GNSS 13 Click driver interface.
 
typedef struct gnss13_s gnss13_t
 GNSS 13 Click context object.
 

Enumerations

enum  gnss13_drv_t { GNSS13_DRV_SEL_UART , GNSS13_DRV_SEL_I2C }
 GNSS 13 Click driver selector. More...
 
enum  gnss13_return_value_t { GNSS13_OK = 0 , GNSS13_ERROR = -1 }
 GNSS 13 Click return value data. More...
 

Functions

void gnss13_cfg_setup (gnss13_cfg_t *cfg)
 GNSS 13 configuration object setup function.
 
void gnss13_drv_interface_selection (gnss13_cfg_t *cfg, gnss13_drv_t drv_sel)
 GNSS 13 driver interface setup function.
 
err_t gnss13_init (gnss13_t *ctx, gnss13_cfg_t *cfg)
 GNSS 13 initialization function.
 
err_t gnss13_generic_write (gnss13_t *ctx, uint8_t *data_in, uint8_t len)
 GNSS 13 generic write function.
 
err_t gnss13_generic_read (gnss13_t *ctx, uint8_t *data_out, uint8_t len)
 GNSS 13 generic read function.
 
void gnss13_clear_ring_buffers (gnss13_t *ctx)
 GNSS 13 clear ring buffers function.
 
void gnss13_set_rst_pin (gnss13_t *ctx, uint8_t state)
 GNSS 13 set RST pin function.
 
void gnss13_set_wup_pin (gnss13_t *ctx, uint8_t state)
 GNSS 13 set WUP pin function.
 
err_t gnss13_parse_gngga (uint8_t *rsp_buf, uint8_t gngga_element, uint8_t *element_data)
 GNSS 13 parse GNGGA function.
 

Detailed Description

This file contains API for GNSS 13 Click Driver.

Typedef Documentation

◆ gnss13_master_io_t

typedef err_t(* gnss13_master_io_t) (struct gnss13_s *, uint8_t *, uint8_t)

GNSS 13 Click driver interface.

Definition of driver interface of GNSS 13 Click driver. Driver serial interface.

◆ gnss13_t

typedef struct gnss13_s gnss13_t

GNSS 13 Click context object.

Context object definition of GNSS 13 Click driver.

Enumeration Type Documentation

◆ gnss13_drv_t

GNSS 13 Click driver selector.

Selects target driver interface of GNSS 13 Click driver.

Enumerator
GNSS13_DRV_SEL_UART 

UART driver descriptor.

GNSS13_DRV_SEL_I2C 

I2C driver descriptor.

◆ gnss13_return_value_t

GNSS 13 Click return value data.

Predefined enum values for driver return values.

Enumerator
GNSS13_OK 
GNSS13_ERROR