gnss14 2.1.0.0
gnss14.h File Reference

This file contains API for GNSS 14 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  gnss14_s
 GNSS 14 Click context object. More...
 
struct  gnss14_cfg_t
 GNSS 14 Click configuration object. More...
 

Macros

#define GNSS14_RSP_START   "$"
 GNSS 14 response buffer commands.
 
#define GNSS14_RSP_DELIMITER   ","
 
#define GNSS14_RSP_GNGGA   "$GNGGA"
 
#define GNSS14_GNGGA_ELEMENT_SIZE   15
 GNSS 14 GNGGA command elements.
 
#define GNSS14_GNGGA_TIME   1
 
#define GNSS14_GNGGA_LATITUDE   2
 
#define GNSS14_GNGGA_LATITUDE_SIDE   3
 
#define GNSS14_GNGGA_LONGITUDE   4
 
#define GNSS14_GNGGA_LONGITUDE_SIDE   5
 
#define GNSS14_GNGGA_QUALITY_INDICATOR   6
 
#define GNSS14_GNGGA_NUMBER_OF_SATELLITES   7
 
#define GNSS14_GNGGA_H_DILUTION_OF_POS   8
 
#define GNSS14_GNGGA_ALTITUDE   9
 
#define GNSS14_GNGGA_ALTITUDE_UNIT   10
 
#define GNSS14_GNGGA_GEOIDAL_SEPARATION   11
 
#define GNSS14_GNGGA_GEOIDAL_SEPARATION_UNIT   12
 
#define GNSS14_GNGGA_TIME_SINCE_LAST_DGPS   13
 
#define GNSS14_GNGGA_DGPS_REFERENCE_STATION_ID   14
 
#define GNSS14_DUMMY   0xFF
 GNSS 14 dummy data.
 
#define GNSS14_SET_DEV_ADDR   0x42
 GNSS 14 device address setting.
 
#define GNSS14_DRV_BUFFER_SIZE   200
 GNSS 14 driver buffer size.
 
#define GNSS14_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Typedefs

typedef err_t(* gnss14_master_io_t) (struct gnss14_s *, uint8_t *, uint8_t)
 GNSS 14 Click driver interface.
 
typedef struct gnss14_s gnss14_t
 GNSS 14 Click context object.
 

Enumerations

enum  gnss14_drv_t { GNSS14_DRV_SEL_UART , GNSS14_DRV_SEL_I2C }
 GNSS 14 Click driver selector. More...
 
enum  gnss14_return_value_t { GNSS14_OK = 0 , GNSS14_ERROR = -1 }
 GNSS 14 Click return value data. More...
 

Functions

void gnss14_cfg_setup (gnss14_cfg_t *cfg)
 GNSS 14 configuration object setup function.
 
err_t gnss14_init (gnss14_t *ctx, gnss14_cfg_t *cfg)
 GNSS 14 initialization function.
 
err_t gnss14_generic_write (gnss14_t *ctx, uint8_t *data_in, uint16_t len)
 GNSS 14 data writing function.
 
err_t gnss14_generic_read (gnss14_t *ctx, uint8_t *data_out, uint16_t len)
 GNSS 14 data reading function.
 
void gnss14_set_io6_pin (gnss14_t *ctx, uint8_t state)
 GNSS 14 set IO6 pin function.
 
void gnss14_set_rst_pin (gnss14_t *ctx, uint8_t state)
 GNSS 14 set RST pin function.
 
uint8_t gnss14_get_eit_pin (gnss14_t *ctx)
 GNSS 14 get external interrupt pin state function.
 
uint8_t gnss14_get_tp_pin (gnss14_t *ctx)
 GNSS 14 get time pulse signal pin state function.
 
void gnss14_reset_device (gnss14_t *ctx)
 GNSS 14 reset device function.
 
err_t gnss14_parse_gngga (char *rsp_buf, uint8_t gngga_element, char *element_data)
 GNSS 14 parse GNGGA function.
 

Detailed Description

This file contains API for GNSS 14 Click Driver.

Typedef Documentation

◆ gnss14_master_io_t

typedef err_t(* gnss14_master_io_t) (struct gnss14_s *, uint8_t *, uint8_t)

GNSS 14 Click driver interface.

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

◆ gnss14_t

typedef struct gnss14_s gnss14_t

GNSS 14 Click context object.

Context object definition of GNSS 14 Click driver.

Enumeration Type Documentation

◆ gnss14_drv_t

GNSS 14 Click driver selector.

Selects target driver interface of GNSS 14 Click driver.

Enumerator
GNSS14_DRV_SEL_UART 

UART driver descriptor.

GNSS14_DRV_SEL_I2C 

I2C driver descriptor.

◆ gnss14_return_value_t

GNSS 14 Click return value data.

Predefined enum values for driver return values.

Enumerator
GNSS14_OK 
GNSS14_ERROR