gnss6 2.1.0.0
gnss6.h File Reference

This file contains API for GNSS 6 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  gnss6_s
 GNSS 6 Click context object. More...
 
struct  gnss6_cfg_t
 GNSS 6 Click configuration object. More...
 

Macros

#define GNSS6_RSP_START   "$"
 GNSS 6 response buffer commands.
 
#define GNSS6_RSP_DELIMITER   ","
 
#define GNSS6_RSP_END_SEQ   "\r\n"
 
#define GNSS6_RSP_GPGGA   "$GPGGA"
 
#define GNSS6_RSP_NO_FIX   "0000.00000"
 
#define GNSS6_GPGGA_ELEMENT_SIZE   15
 GNSS 6 GPGGA command elements.
 
#define GNSS6_GPGGA_TIME   1
 
#define GNSS6_GPGGA_LATITUDE   2
 
#define GNSS6_GPGGA_LATITUDE_SIDE   3
 
#define GNSS6_GPGGA_LONGITUDE   4
 
#define GNSS6_GPGGA_LONGITUDE_SIDE   5
 
#define GNSS6_GPGGA_QUALITY_INDICATOR   6
 
#define GNSS6_GPGGA_NUMBER_OF_SATELLITES   7
 
#define GNSS6_GPGGA_H_DILUTION_OF_POS   8
 
#define GNSS6_GPGGA_ALTITUDE   9
 
#define GNSS6_GPGGA_ALTITUDE_UNIT   10
 
#define GNSS6_GPGGA_GEOIDAL_SEPARATION   11
 
#define GNSS6_GPGGA_GEOIDAL_SEPARATION_UNIT   12
 
#define GNSS6_GPGGA_TIME_SINCE_LAST_DGPS   13
 
#define GNSS6_GPGGA_DGPS_REFERENCE_STATION_ID   14
 
#define GNSS6_DUMMY   0xFF
 GNSS 6 dummy data.
 
#define GNSS6_DEVICE_ADDRESS   0x3A
 GNSS 6 device address setting.
 
#define GNSS6_DRV_TX_BUFFER_SIZE   100
 GNSS 6 driver buffer size.
 
#define GNSS6_DRV_RX_BUFFER_SIZE   300
 
#define GNSS6_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Typedefs

typedef err_t(* gnss6_master_io_t) (struct gnss6_s *, uint8_t *, uint8_t)
 GNSS 6 Click driver interface.
 
typedef struct gnss6_s gnss6_t
 GNSS 6 Click context object.
 

Enumerations

enum  gnss6_drv_t { GNSS6_DRV_SEL_UART , GNSS6_DRV_SEL_I2C }
 GNSS 6 Click driver selector. More...
 
enum  gnss6_return_value_t { GNSS6_OK = 0 , GNSS6_ERROR = -1 }
 GNSS 6 Click return value data. More...
 

Functions

void gnss6_cfg_setup (gnss6_cfg_t *cfg)
 GNSS 6 configuration object setup function.
 
void gnss6_drv_interface_selection (gnss6_cfg_t *cfg, gnss6_drv_t drv_sel)
 GNSS 6 driver interface setup function.
 
err_t gnss6_init (gnss6_t *ctx, gnss6_cfg_t *cfg)
 GNSS 6 initialization function.
 
err_t gnss6_generic_write (gnss6_t *ctx, uint8_t *data_in, uint8_t len)
 GNSS 6 data writing function.
 
err_t gnss6_generic_read (gnss6_t *ctx, uint8_t *data_out, uint8_t len)
 GNSS 6 data reading function.
 
void gnss6_set_rst_pin (gnss6_t *ctx, uint8_t state)
 GNSS 6 set RST pin function.
 
void gnss6_set_wup_pin (gnss6_t *ctx, uint8_t state)
 GNSS 6 set WUP pin function.
 
uint8_t gnss6_get_pps_pin (gnss6_t *ctx)
 GNSS 6 get PPS pin function.
 
void gnss6_reset_device (gnss6_t *ctx)
 GNSS 6 reset device function.
 
err_t gnss6_parse_gpgga (uint8_t *rsp_buf, uint8_t gpgga_element, uint8_t *element_data)
 GNSS 6 parse GPGGA function.
 

Detailed Description

This file contains API for GNSS 6 Click Driver.

Typedef Documentation

◆ gnss6_master_io_t

typedef err_t(* gnss6_master_io_t) (struct gnss6_s *, uint8_t *, uint8_t)

GNSS 6 Click driver interface.

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

◆ gnss6_t

typedef struct gnss6_s gnss6_t

GNSS 6 Click context object.

Context object definition of GNSS 6 Click driver.

Enumeration Type Documentation

◆ gnss6_drv_t

GNSS 6 Click driver selector.

Selects target driver interface of GNSS 6 Click driver.

Enumerator
GNSS6_DRV_SEL_UART 

UART driver descriptor.

GNSS6_DRV_SEL_I2C 

I2C driver descriptor.

◆ gnss6_return_value_t

GNSS 6 Click return value data.

Predefined enum values for driver return values.

Enumerator
GNSS6_OK 
GNSS6_ERROR