39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
73#define GPS6_RSP_START "$"
74#define GPS6_RSP_DELIMITER ","
75#define GPS6_RSP_GPGGA "$GPGGA"
81#define GPS6_GPGGA_ELEMENT_SIZE 15
82#define GPS6_GPGGA_TIME 1
83#define GPS6_GPGGA_LATITUDE 2
84#define GPS6_GPGGA_LATITUDE_SIDE 3
85#define GPS6_GPGGA_LONGITUDE 4
86#define GPS6_GPGGA_LONGITUDE_SIDE 5
87#define GPS6_GPGGA_QUALITY_INDICATOR 6
88#define GPS6_GPGGA_NUMBER_OF_SATELLITES 7
89#define GPS6_GPGGA_H_DILUTION_OF_POS 8
90#define GPS6_GPGGA_ALTITUDE 9
91#define GPS6_GPGGA_ALTITUDE_UNIT 10
92#define GPS6_GPGGA_GEOIDAL_SEPARATION 11
93#define GPS6_GPGGA_GEOIDAL_SEPARATION_UNIT 12
94#define GPS6_GPGGA_TIME_SINCE_LAST_DGPS 13
95#define GPS6_GPGGA_DGPS_REFERENCE_STATION_ID 14
102#define DRV_TX_BUFFER_SIZE 300
103#define DRV_RX_BUFFER_SIZE 100
121#define GPS6_MAP_MIKROBUS( cfg, mikrobus ) \
122 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
123 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
124 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST );
gps6_return_value_t
GPS 6 Click return value data.
Definition gps6.h:174
@ GPS6_ERROR
Definition gps6.h:176
@ GPS6_OK
Definition gps6.h:175
#define DRV_RX_BUFFER_SIZE
Definition gps6.h:103
#define DRV_TX_BUFFER_SIZE
GPS 6 driver buffer size.
Definition gps6.h:102
err_t gps6_generic_read(gps6_t *ctx, char *data_buf, uint16_t max_len)
GPS 6 data reading function.
err_t gps6_generic_write(gps6_t *ctx, char *data_buf, uint16_t len)
GPS 6 data writing function.
void gps6_cfg_setup(gps6_cfg_t *cfg)
GPS 6 configuration object setup function.
void gps6_enable_device(gps6_t *ctx)
GPS 6 enable device function.
err_t gps6_parse_gpgga(char *rsp_buf, uint8_t gpgga_element, char *element_data)
GPS 6 parse GPGGA function.
void gps6_disable_device(gps6_t *ctx)
GPS 6 disable device function.
err_t gps6_init(gps6_t *ctx, gps6_cfg_t *cfg)
GPS 6 initialization function.
GPS 6 Click configuration object.
Definition gps6.h:152
uint32_t baud_rate
Definition gps6.h:161
bool uart_blocking
Definition gps6.h:162
uart_data_bits_t data_bit
Definition gps6.h:163
pin_name_t tx_pin
Definition gps6.h:155
pin_name_t rx_pin
Definition gps6.h:154
uart_stop_bits_t stop_bit
Definition gps6.h:165
uart_parity_t parity_bit
Definition gps6.h:164
pin_name_t rst
Definition gps6.h:158
GPS 6 Click context object.
Definition gps6.h:134
uart_t uart
Definition gps6.h:139
digital_out_t rst
Definition gps6.h:136