gps4 2.0.0.0
gps4.h File Reference

This file contains API for GPS4 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  gps4_t
 Click ctx object definition. More...
 
struct  gps4_cfg_t
 Click configuration structure definition. More...
 

Macros

#define GPS4_MAP_MIKROBUS(cfg, mikrobus)
 
#define GPS4_RETVAL   uint8_t
 
#define GPS4_OK   0x00
 
#define GPS4_INIT_ERROR   0xFF
 
#define GPS4_NEMA_GPGGA   1
 
#define GPS4_NEMA_GPGLL   3
 
#define GPS4_NEMA_GPGGA_NUM_ELEMENT   15
 
#define GPS4_NEMA_GPGLL_NUM_ELEMENT   5
 
#define GPS4_GPGGA_TIME   1
 
#define GPS4_GPGGA_LATITUDE   2
 
#define GPS4_GPGGA_LATITUDE_SIDE   3
 
#define GPS4_GPGGA_LONGITUDE   4
 
#define GPS4_GPGGA_LONGITUDE_SIDE   5
 
#define GPS4_GPGGA_QUALITY_INDICATOR   6
 
#define GPS4_GPGGA_NUMBER_OF_SATELLITES   7
 
#define GPS4_GPGGA_H_DILUTION_OF_POS   8
 
#define GPS4_GPGGA_ALTITUDE   9
 
#define GPS4_GPGGA_ALTITUDE_UNIT   10
 
#define GPS4_GPGGA_GEOIDAL_SEPARATION   11
 
#define GPS4_GPGGA_GEOIDAL_SEPARATION_UNIT   12
 
#define GPS4_GPGGA_TIME_SINCE_LAST_DGPS   13
 
#define GPS4_GPGGA_DGPS_REFERENCE_STATION_ID   14
 
#define GPS4_GPGLL_LATITUDE   1
 
#define GPS4_GPGLL_LATITUDE_SIDE   2
 
#define GPS4_GPGLL_LONGITUDE   3
 
#define GPS4_GPGLL_LONGITUDE_SIDE   4
 
#define GPS4_ERROR_COMMAND_OR_ELEMENT   0xFF
 
#define GPS4_ERROR_START_OR_END_COMMAND   0x8F
 
#define GPS4_ERROR_NEXT_ELEMENT   0x4F
 
#define GPS4_ERROR_CURRENT_ELEMENT   0x2F
 
#define GPS4_NO_ERROR   0x00
 
#define DRV_RX_BUFFER_SIZE   600
 
#define DRV_TX_BUFFER_SIZE   100
 

Typedefs

typedef uint8_t gps4_error_t
 Error type.
 

Functions

void gps4_cfg_setup (gps4_cfg_t *cfg)
 Config Object Initialization function.
 
GPS4_RETVAL gps4_init (gps4_t *ctx, gps4_cfg_t *cfg)
 Initialization function.
 
void gps4_module_wakeup (gps4_t *ctx)
 Wake-up module.
 
void gps4_module_reset (gps4_t *ctx)
 Reset module.
 
void gps4_set_wkp_pin (gps4_t *ctx, uint8_t state)
 Set WKP ( wake-up ) pin state.
 
void gps4_set_rst_pin (gps4_t *ctx, uint8_t state)
 Set RST ( reset ) pin state.
 
uint8_t gps4_get_pps_pin (gps4_t *ctx)
 Get PPS pin state.
 
void gps4_generic_write (gps4_t *ctx, char *data_buf, uint16_t len)
 Generic write function.
 
int32_t gps4_generic_read (gps4_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
gps4_error_t gps4_generic_parser (char *rsp, uint8_t command, uint8_t element, char *parser_buf)
 Generic parser function.
 

Detailed Description

This file contains API for GPS4 Click driver.