gnss10 2.0.0.0
gnss10.h File Reference

This file contains API for GNSS 10 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  gnss10_s
 GNSS 10 Click context object. More...
 
struct  gnss10_cfg_t
 GNSS 10 Click configuration object. More...
 

Macros

#define GNSS10_RSP_START   "$"
 GNSS 10 response buffer commands.
 
#define GNSS10_RSP_DELIMITER   ","
 
#define GNSS10_RSP_GNGGA   "$GNGGA"
 
#define GNSS10_GNGGA_ELEMENT_SIZE   15
 GNSS 10 GNGGA command elements.
 
#define GNSS10_GNGGA_TIME   1
 
#define GNSS10_GNGGA_LATITUDE   2
 
#define GNSS10_GNGGA_LATITUDE_SIDE   3
 
#define GNSS10_GNGGA_LONGITUDE   4
 
#define GNSS10_GNGGA_LONGITUDE_SIDE   5
 
#define GNSS10_GNGGA_QUALITY_INDICATOR   6
 
#define GNSS10_GNGGA_NUMBER_OF_SATELLITES   7
 
#define GNSS10_GNGGA_H_DILUTION_OF_POS   8
 
#define GNSS10_GNGGA_ALTITUDE   9
 
#define GNSS10_GNGGA_ALTITUDE_UNIT   10
 
#define GNSS10_GNGGA_GEOIDAL_SEPARATION   11
 
#define GNSS10_GNGGA_GEOIDAL_SEPARATION_UNIT   12
 
#define GNSS10_GNGGA_TIME_SINCE_LAST_DGPS   13
 
#define GNSS10_GNGGA_DGPS_REFERENCE_STATION_ID   14
 
#define GNSS10_DUMMY   0xFF
 GNSS 10 dummy data.
 
#define GNSS10_SET_DEV_ADDR   0x42
 GNSS 10 device address setting.
 
#define DRV_BUFFER_SIZE   200
 GNSS 10 driver buffer size.
 
#define GNSS10_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define GNSS10_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define GNSS10_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Typedefs

typedef err_t(* gnss10_master_io_t) (struct gnss10_s *, uint8_t *, uint8_t)
 GNSS 10 Click driver interface.
 
typedef struct gnss10_s gnss10_t
 GNSS 10 Click context object.
 

Enumerations

enum  gnss10_drv_t { GNSS10_DRV_SEL_UART , GNSS10_DRV_SEL_SPI , GNSS10_DRV_SEL_I2C }
 GNSS 10 Click driver selector. More...
 
enum  gnss10_return_value_t { GNSS10_OK = 0 , GNSS10_ERROR = -1 }
 GNSS 10 Click return value data. More...
 

Functions

void gnss10_cfg_setup (gnss10_cfg_t *cfg)
 GNSS 10 configuration object setup function.
 
void gnss10_drv_interface_selection (gnss10_cfg_t *cfg, gnss10_drv_t drv_sel)
 GNSS 10 driver interface setup function.
 
err_t gnss10_init (gnss10_t *ctx, gnss10_cfg_t *cfg)
 GNSS 10 initialization function.
 
err_t gnss10_generic_write (gnss10_t *ctx, uint8_t *data_in, uint8_t len)
 GNSS 10 data writing function.
 
err_t gnss10_generic_read (gnss10_t *ctx, uint8_t *data_out, uint8_t len)
 GNSS 10 data reading function.
 
void gnss10_set_rst_pin (gnss10_t *ctx, uint8_t state)
 GNSS 10 set RST pin function.
 
uint8_t gnss10_get_eint_1_pin (gnss10_t *ctx)
 GNSS 10 get Ext INT 1 pin function.
 
uint8_t gnss10_get_int_pin (gnss10_t *ctx)
 GNSS 10 get INT pin function.
 
void gnss10_reset_device (gnss10_t *ctx)
 GNSS 10 reset device function.
 
err_t gnss10_parse_gngga (char *rsp_buf, uint8_t gngga_element, char *element_data)
 GNSS 10 parse GNGGA function.
 

Detailed Description

This file contains API for GNSS 10 Click Driver.

Typedef Documentation

◆ gnss10_master_io_t

typedef err_t(* gnss10_master_io_t) (struct gnss10_s *, uint8_t *, uint8_t)

GNSS 10 Click driver interface.

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

◆ gnss10_t

typedef struct gnss10_s gnss10_t

GNSS 10 Click context object.

Context object definition of GNSS 10 Click driver.

Enumeration Type Documentation

◆ gnss10_drv_t

GNSS 10 Click driver selector.

Selects target driver interface of GNSS 10 Click driver.

Enumerator
GNSS10_DRV_SEL_UART 

UART driver descriptor.

GNSS10_DRV_SEL_SPI 

SPI driver descriptor.

GNSS10_DRV_SEL_I2C 

I2C driver descriptor.

◆ gnss10_return_value_t

GNSS 10 Click return value data.

Predefined enum values for driver return values.

Enumerator
GNSS10_OK 
GNSS10_ERROR