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 GNSS5_RSP_START "$"
74#define GNSS5_RSP_DELIMITER ","
75#define GNSS5_RSP_END_SEQ "\r\n"
76#define GNSS5_RSP_GNGGA "$GNGGA"
82#define GNSS5_GNGGA_ELEMENT_SIZE 15
83#define GNSS5_GNGGA_TIME 1
84#define GNSS5_GNGGA_LATITUDE 2
85#define GNSS5_GNGGA_LATITUDE_SIDE 3
86#define GNSS5_GNGGA_LONGITUDE 4
87#define GNSS5_GNGGA_LONGITUDE_SIDE 5
88#define GNSS5_GNGGA_QUALITY_INDICATOR 6
89#define GNSS5_GNGGA_NUMBER_OF_SATELLITES 7
90#define GNSS5_GNGGA_H_DILUTION_OF_POS 8
91#define GNSS5_GNGGA_ALTITUDE 9
92#define GNSS5_GNGGA_ALTITUDE_UNIT 10
93#define GNSS5_GNGGA_GEOIDAL_SEPARATION 11
94#define GNSS5_GNGGA_GEOIDAL_SEPARATION_UNIT 12
95#define GNSS5_GNGGA_TIME_SINCE_LAST_DGPS 13
96#define GNSS5_GNGGA_DGPS_REFERENCE_STATION_ID 14
103#define GNSS5_DRV_TX_BUFFER_SIZE 100
104#define GNSS5_DRV_RX_BUFFER_SIZE 1000
122#define GNSS5_MAP_MIKROBUS( cfg, mikrobus ) \
123 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
124 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
125 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
126 cfg.exi = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
127 cfg.pps = MIKROBUS( mikrobus, MIKROBUS_INT )
gnss5_return_value_t
GNSS 5 Click return value data.
Definition gnss5.h:183
@ GNSS5_ERROR
Definition gnss5.h:185
@ GNSS5_OK
Definition gnss5.h:184
#define GNSS5_DRV_RX_BUFFER_SIZE
Definition gnss5.h:104
#define GNSS5_DRV_TX_BUFFER_SIZE
GNSS 5 driver buffer size.
Definition gnss5.h:103
err_t gnss5_generic_write(gnss5_t *ctx, char *data_in, uint16_t len)
GNSS 5 data writing function.
err_t gnss5_init(gnss5_t *ctx, gnss5_cfg_t *cfg)
GNSS 5 initialization function.
uint8_t gnss5_get_pps_pin(gnss5_t *ctx)
GNSS 5 get PPS pin function.
void gnss5_set_rst_pin(gnss5_t *ctx, uint8_t state)
GNSS 5 set RST pin function.
void gnss5_clear_ring_buffers(gnss5_t *ctx)
GNSS 5 clear ring buffers function.
err_t gnss5_generic_read(gnss5_t *ctx, char *data_out, uint16_t len)
GNSS 5 data reading function.
uint8_t gnss5_get_exi_pin(gnss5_t *ctx)
GNSS 5 get EXI pin function.
err_t gnss5_parse_gngga(char *rsp_buf, uint8_t gngga_element, char *element_data)
GNSS 5 parse GNGGA function.
void gnss5_cfg_setup(gnss5_cfg_t *cfg)
GNSS 5 configuration object setup function.
GNSS 5 Click configuration object.
Definition gnss5.h:159
uint32_t baud_rate
Definition gnss5.h:170
pin_name_t pps
Definition gnss5.h:167
bool uart_blocking
Definition gnss5.h:171
uart_data_bits_t data_bit
Definition gnss5.h:172
pin_name_t tx_pin
Definition gnss5.h:162
pin_name_t rx_pin
Definition gnss5.h:161
uart_stop_bits_t stop_bit
Definition gnss5.h:174
uart_parity_t parity_bit
Definition gnss5.h:173
pin_name_t rst
Definition gnss5.h:165
pin_name_t exi
Definition gnss5.h:166
GNSS 5 Click context object.
Definition gnss5.h:137
digital_in_t pps
Definition gnss5.h:143
digital_in_t exi
Definition gnss5.h:142
uart_t uart
Definition gnss5.h:146
digital_out_t rst
Definition gnss5.h:139