gnss 2.0.0.0
gnss.h File Reference

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

Macros

#define GNSS_RSP_START   "$"
 GNSS response buffer commands.
 
#define GNSS_RSP_DELIMITER   ","
 
#define GNSS_RSP_END_SEQ   "\r\n"
 
#define GNSS_RSP_GPGGA   "$GPGGA"
 
#define GNSS_GPGGA_ELEMENT_SIZE   15
 GNSS GPGGA command elements.
 
#define GNSS_GPGGA_TIME   1
 
#define GNSS_GPGGA_LATITUDE   2
 
#define GNSS_GPGGA_LATITUDE_SIDE   3
 
#define GNSS_GPGGA_LONGITUDE   4
 
#define GNSS_GPGGA_LONGITUDE_SIDE   5
 
#define GNSS_GPGGA_QUALITY_INDICATOR   6
 
#define GNSS_GPGGA_NUMBER_OF_SATELLITES   7
 
#define GNSS_GPGGA_H_DILUTION_OF_POS   8
 
#define GNSS_GPGGA_ALTITUDE   9
 
#define GNSS_GPGGA_ALTITUDE_UNIT   10
 
#define GNSS_GPGGA_GEOIDAL_SEPARATION   11
 
#define GNSS_GPGGA_GEOIDAL_SEPARATION_UNIT   12
 
#define GNSS_GPGGA_TIME_SINCE_LAST_DGPS   13
 
#define GNSS_GPGGA_DGPS_REFERENCE_STATION_ID   14
 
#define GNSS_DRV_TX_BUFFER_SIZE   100
 GNSS driver buffer size.
 
#define GNSS_DRV_RX_BUFFER_SIZE   1000
 
#define GNSS_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  gnss_return_value_t { GNSS_OK = 0 , GNSS_ERROR = -1 }
 GNSS Click return value data. More...
 

Functions

void gnss_cfg_setup (gnss_cfg_t *cfg)
 GNSS configuration object setup function.
 
err_t gnss_init (gnss_t *ctx, gnss_cfg_t *cfg)
 GNSS initialization function.
 
err_t gnss_generic_write (gnss_t *ctx, char *data_in, uint16_t len)
 GNSS data writing function.
 
err_t gnss_generic_read (gnss_t *ctx, char *data_out, uint16_t len)
 GNSS data reading function.
 
void gnss_clear_ring_buffers (gnss_t *ctx)
 GNSS clear ring buffers function.
 
void gnss_set_rst_pin (gnss_t *ctx, uint8_t state)
 GNSS set RST pin function.
 
void gnss_set_fon_pin (gnss_t *ctx, uint8_t state)
 GNSS set FON pin function.
 
err_t gnss_parse_gpgga (char *rsp_buf, uint8_t gpgga_element, char *element_data)
 GNSS parse GPGGA function.
 

Detailed Description

This file contains API for GNSS Click Driver.

Enumeration Type Documentation

◆ gnss_return_value_t

GNSS Click return value data.

Predefined enum values for driver return values.

Enumerator
GNSS_OK 
GNSS_ERROR