gnss2 2.0.0.0
gnss2.h File Reference

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

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

Go to the source code of this file.

Data Structures

struct  gnss2_t
 GNSS 2 Click context object. More...
 
struct  gnss2_cfg_t
 GNSS 2 Click configuration object. More...
 

Macros

#define GNSS2_RSP_START   "$"
 GNSS 2 response buffer commands.
 
#define GNSS2_RSP_DELIMITER   ","
 
#define GNSS2_RSP_END_SEQ   "\r\n"
 
#define GNSS2_RSP_GPGGA   "$GPGGA"
 
#define GNSS2_GPGGA_ELEMENT_SIZE   15
 GNSS 2 GPGGA command elements.
 
#define GNSS2_GPGGA_TIME   1
 
#define GNSS2_GPGGA_LATITUDE   2
 
#define GNSS2_GPGGA_LATITUDE_SIDE   3
 
#define GNSS2_GPGGA_LONGITUDE   4
 
#define GNSS2_GPGGA_LONGITUDE_SIDE   5
 
#define GNSS2_GPGGA_QUALITY_INDICATOR   6
 
#define GNSS2_GPGGA_NUMBER_OF_SATELLITES   7
 
#define GNSS2_GPGGA_H_DILUTION_OF_POS   8
 
#define GNSS2_GPGGA_ALTITUDE   9
 
#define GNSS2_GPGGA_ALTITUDE_UNIT   10
 
#define GNSS2_GPGGA_GEOIDAL_SEPARATION   11
 
#define GNSS2_GPGGA_GEOIDAL_SEPARATION_UNIT   12
 
#define GNSS2_GPGGA_TIME_SINCE_LAST_DGPS   13
 
#define GNSS2_GPGGA_DGPS_REFERENCE_STATION_ID   14
 
#define GNSS2_DRV_TX_BUFFER_SIZE   100
 GNSS 2 driver buffer size.
 
#define GNSS2_DRV_RX_BUFFER_SIZE   1000
 
#define GNSS2_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  gnss2_return_value_t { GNSS2_OK = 0 , GNSS2_ERROR = -1 }
 GNSS 2 Click return value data. More...
 

Functions

void gnss2_cfg_setup (gnss2_cfg_t *cfg)
 GNSS 2 configuration object setup function.
 
err_t gnss2_init (gnss2_t *ctx, gnss2_cfg_t *cfg)
 GNSS 2 initialization function.
 
err_t gnss2_generic_write (gnss2_t *ctx, char *data_in, uint16_t len)
 GNSS 2 data writing function.
 
err_t gnss2_generic_read (gnss2_t *ctx, char *data_out, uint16_t len)
 GNSS 2 data reading function.
 
void gnss2_clear_ring_buffers (gnss2_t *ctx)
 GNSS 2 clear ring buffers function.
 
void gnss2_set_rst_pin (gnss2_t *ctx, uint8_t state)
 GNSS 2 set RST pin function.
 
uint8_t gnss2_get_fon_pin (gnss2_t *ctx)
 GNSS 2 get FON pin function.
 
uint8_t gnss2_get_stb_pin (gnss2_t *ctx)
 GNSS 2 get STB pin function.
 
err_t gnss2_parse_gpgga (char *rsp_buf, uint8_t gpgga_element, char *element_data)
 GNSS 2 parse GPGGA function.
 

Detailed Description

This file contains API for GNSS 2 Click Driver.

Enumeration Type Documentation

◆ gnss2_return_value_t

GNSS 2 Click return value data.

Predefined enum values for driver return values.

Enumerator
GNSS2_OK 
GNSS2_ERROR