gnss15 2.1.0.0
gnss15.h File Reference

This file contains API for GNSS 15 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  gnss15_s
 GNSS 15 Click context object. More...
 
struct  gnss15_cfg_t
 GNSS 15 Click configuration object. More...
 

Macros

#define GNSS15_RSP_START   "$"
 GNSS 15 control commands.
 
#define GNSS15_RSP_DELIMITER   ","
 
#define GNSS15_RSP_END_SEQ   "\r\n"
 
#define GNSS15_RSP_GPGGA   "$GPGGA"
 
#define GNSS15_RSP_NO_FIX   "0000.00000"
 
#define GNSS15_GPGGA_ELEMENT_SIZE   15
 GNSS 15 GPGGA command elements.
 
#define GNSS15_GPGGA_TIME   1
 
#define GNSS15_GPGGA_LATITUDE   2
 
#define GNSS15_GPGGA_LATITUDE_SIDE   3
 
#define GNSS15_GPGGA_LONGITUDE   4
 
#define GNSS15_GPGGA_LONGITUDE_SIDE   5
 
#define GNSS15_GPGGA_QUALITY_INDICATOR   6
 
#define GNSS15_GPGGA_NUMBER_OF_SATELLITES   7
 
#define GNSS15_GPGGA_H_DILUTION_OF_POS   8
 
#define GNSS15_GPGGA_ALTITUDE   9
 
#define GNSS15_GPGGA_ALTITUDE_UNIT   10
 
#define GNSS15_GPGGA_GEOIDAL_SEPARATION   11
 
#define GNSS15_GPGGA_GEOIDAL_SEPARATION_UNIT   12
 
#define GNSS15_GPGGA_TIME_SINCE_LAST_DGPS   13
 
#define GNSS15_GPGGA_DGPS_REFERENCE_STATION_ID   14
 
#define GNSS15_DUMMY   0xFF
 GNSS 15 dummy data.
 
#define GNSS15_DEVICE_ADDRESS   0x3A
 GNSS 15 device address setting.
 
#define GNSS15_TX_DRV_BUFFER_SIZE   100
 GNSS 15 driver buffer size.
 
#define GNSS15_RX_DRV_BUFFER_SIZE   300
 
#define GNSS15_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Typedefs

typedef err_t(* gnss15_master_io_t) (struct gnss15_s *, uint8_t *, uint8_t)
 GNSS 15 Click driver interface.
 
typedef struct gnss15_s gnss15_t
 GNSS 15 Click context object.
 

Enumerations

enum  gnss15_drv_t { GNSS15_DRV_SEL_UART , GNSS15_DRV_SEL_I2C }
 GNSS 15 Click driver selector. More...
 
enum  gnss15_return_value_t { GNSS15_OK = 0 , GNSS15_ERROR = -1 }
 GNSS 15 Click return value data. More...
 

Functions

void gnss15_cfg_setup (gnss15_cfg_t *cfg)
 GNSS 15 configuration object setup function.
 
err_t gnss15_init (gnss15_t *ctx, gnss15_cfg_t *cfg)
 GNSS 15 initialization function.
 
err_t gnss15_generic_write (gnss15_t *ctx, uint8_t *data_in, uint16_t len)
 GNSS 15 data writing function.
 
err_t gnss15_generic_read (gnss15_t *ctx, uint8_t *data_out, uint16_t len)
 GNSS 15 data reading function.
 
void gnss15_set_rst_pin (gnss15_t *ctx, uint8_t state)
 GNSS 15 set RST pin function.
 
void gnss15_set_wup_pin (gnss15_t *ctx, uint8_t state)
 GNSS 15 set WUP pin function.
 
uint8_t gnss15_get_interrupt (gnss15_t *ctx)
 GNSS 15 get interrupt pin state function.
 
void gnss15_reset_device (gnss15_t *ctx)
 GNSS 15 reset device function.
 
err_t gnss15_parse_gpgga (uint8_t *rsp_buf, uint8_t gpgga_element, uint8_t *element_data)
 GNSS 15 parse GPGGA function.
 

Detailed Description

This file contains API for GNSS 15 Click Driver.

Typedef Documentation

◆ gnss15_master_io_t

typedef err_t(* gnss15_master_io_t) (struct gnss15_s *, uint8_t *, uint8_t)

GNSS 15 Click driver interface.

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

◆ gnss15_t

typedef struct gnss15_s gnss15_t

GNSS 15 Click context object.

Context object definition of GNSS 15 Click driver.

Enumeration Type Documentation

◆ gnss15_drv_t

GNSS 15 Click driver selector.

Selects target driver interface of GNSS 15 Click driver.

Enumerator
GNSS15_DRV_SEL_UART 

UART driver descriptor.

GNSS15_DRV_SEL_I2C 

I2C driver descriptor.

◆ gnss15_return_value_t

GNSS 15 Click return value data.

Predefined enum values for driver return values.

Enumerator
GNSS15_OK 
GNSS15_ERROR