nanogps3 2.1.0.0
nanogps3.h File Reference

This file contains API for Nano GPS 3 Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  nanogps3_s
 Nano GPS 3 Click context object. More...
 
struct  nanogps3_cfg_t
 Nano GPS 3 Click configuration object. More...
 

Macros

#define NANOGPS3_RSP_START   "$"
 Nano GPS 3 description setting.
 
#define NANOGPS3_RSP_DELIMITER   ","
 
#define NANOGPS3_RSP_GNGGA   "$GNGGA"
 
#define NANOGPS3_RSP_GPGLL   "$GPGLL"
 
#define NANOGPS3_NMEA_GNGGA   1
 Nano GPS 3 current support NEMA command.
 
#define NANOGPS3_NMEA_GPGLL   3
 
#define NANOGPS3_NMEA_GNGGA_NUM_ELEMENT   15
 
#define NANOGPS3_NMEA_GPGLL_NUM_ELEMENT   5
 
#define NANOGPS3_GNGGA_TIME   1
 Nano GPS 3 GPGGA command elements.
 
#define NANOGPS3_GNGGA_LATITUDE   2
 
#define NANOGPS3_GNGGA_LATITUDE_SIDE   3
 
#define NANOGPS3_GNGGA_LONGITUDE   4
 
#define NANOGPS3_GNGGA_LONGITUDE_SIDE   5
 
#define NANOGPS3_GNGGA_QUALITY_INDICATOR   6
 
#define NANOGPS3_GNGGA_NUMBER_OF_SATELLITES   7
 
#define NANOGPS3_GNGGA_H_DILUTION_OF_POS   8
 
#define NANOGPS3_GNGGA_ALTITUDE   9
 
#define NANOGPS3_GNGGA_ALTITUDE_UNIT   10
 
#define NANOGPS3_GNGGA_GEOIDAL_SEPARATION   11
 
#define NANOGPS3_GNGGA_GEOIDAL_SEPARATION_UNIT   12
 
#define NANOGPS3_GNGGA_TIME_SINCE_LAST_DGPS   13
 
#define NANOGPS3_GNGGA_DGPS_REFERENCE_STATION_ID   14
 
#define NANOGPS3_DUMMY   0xFF
 Nano GPS 3 Dummy data.
 
#define NANOGPS3_PIN_STATE_LOW   0
 Nano GPS 3 GPIO pin logic values.
 
#define NANOGPS3_PIN_STATE_HIGH   1
 
#define NANOGPS3_TX_DRV_BUFFER_SIZE   100
 Nano GPS 3 driver buffer size.
 
#define NANOGPS3_RX_DRV_BUFFER_SIZE   600
 
#define NANOGPS3_DEVICE_ADDRESS   0x10
 Nano GPS 3 device address setting.
 
#define NANOGPS3_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Typedefs

typedef err_t(* nanogps3_master_io_t) (struct nanogps3_s *, uint8_t *, uint8_t)
 Nano GPS 3 Click driver interface.
 
typedef struct nanogps3_s nanogps3_t
 Nano GPS 3 Click context object.
 

Enumerations

enum  nanogps3_drv_t { NANOGPS3_DRV_SEL_I2C , NANOGPS3_DRV_SEL_UART }
 Nano GPS 3 Click driver selector. More...
 
enum  nanogps3_return_value_t { NANOGPS3_OK = 0 , NANOGPS3_ERROR = -1 }
 Nano GPS 3 Click return value data. More...
 

Functions

void nanogps3_cfg_setup (nanogps3_cfg_t *cfg)
 Nano GPS 3 configuration object setup function.
 
err_t nanogps3_init (nanogps3_t *ctx, nanogps3_cfg_t *cfg)
 Nano GPS 3 initialization function.
 
void nanogps3_default_cfg (nanogps3_t *ctx)
 Nano GPS 3 default configuration function.
 
err_t nanogps3_generic_write (nanogps3_t *ctx, uint8_t *data_in, uint8_t len)
 Nano GPS 3 data writing function.
 
err_t nanogps3_generic_read (nanogps3_t *ctx, uint8_t *data_out, uint8_t len)
 Nano GPS 3 data reading function.
 
void nanogps3_request_to_send (nanogps3_t *ctx, uint8_t rts)
 Nano GPS 3 request to send function.
 
uint8_t nanogps3_clear_to_send (nanogps3_t *ctx)
 Nano GPS 3 clear to send function.
 
void nanogps3_set_reset_state (nanogps3_t *ctx, uint8_t rst_state)
 Nano GPS 3 set reset state function.
 
void nanogps3_set_force_on_state (nanogps3_t *ctx, uint8_t pwr_state)
 Nano GPS 3 set force on state function.
 
uint8_t nanogps3_get_wup_pin (nanogps3_t *ctx)
 Nano GPS 3 get wakeup pin function.
 
err_t nanogps3_parse_gngga (char *rsp_buf, uint8_t gngga_element, char *element_data)
 Nano GPS 3 parse GNGGA function.
 

Detailed Description

This file contains API for Nano GPS 3 Click Driver.

Typedef Documentation

◆ nanogps3_master_io_t

typedef err_t(* nanogps3_master_io_t) (struct nanogps3_s *, uint8_t *, uint8_t)

Nano GPS 3 Click driver interface.

Definition of driver interface of Nano GPS 3 Click driver. Driver serial interface.

◆ nanogps3_t

typedef struct nanogps3_s nanogps3_t

Nano GPS 3 Click context object.

Context object definition of Nano GPS 3 Click driver.

Enumeration Type Documentation

◆ nanogps3_drv_t

Nano GPS 3 Click driver selector.

Selects target driver interface of Nano GPS 3 Click driver.

Enumerator
NANOGPS3_DRV_SEL_I2C 

I2C driver descriptor.

NANOGPS3_DRV_SEL_UART 

UART driver descriptor.

◆ nanogps3_return_value_t

Nano GPS 3 Click return value data.

Predefined enum values for driver return values.

Enumerator
NANOGPS3_OK 
NANOGPS3_ERROR