42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
67#define GNSS4_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
69 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
70 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST )
77#define GNSS4_RETVAL uint8_t
80#define GNSS4_INIT_ERROR 0xFF
87#define GNSS4_NEMA_GNGGA 1
88#define GNSS4_NEMA_GNGLL 3
89#define GNSS4_NEMA_GNGGA_NUM_ELEMENT 15
90#define GNSS4_NEMA_GNGLL_NUM_ELEMENT 5
97#define GNSS4_GNGGA_TIME 1
98#define GNSS4_GNGGA_LATITUDE 2
99#define GNSS4_GNGGA_LATITUDE_SIDE 3
100#define GNSS4_GNGGA_LONGITUDE 4
101#define GNSS4_GNGGA_LONGITUDE_SIDE 5
102#define GNSS4_GNGGA_QUALITY_INDICATOR 6
103#define GNSS4_GNGGA_NUMBER_OF_SATELLITES 7
104#define GNSS4_GNGGA_H_DILUTION_OF_POS 8
105#define GNSS4_GNGGA_ALTITUDE 9
106#define GNSS4_GNGGA_ALTITUDE_UNIT 10
107#define GNSS4_GNGGA_GEOIDAL_SEPARATION 11
108#define GNSS4_GNGGA_GEOIDAL_SEPARATION_UNIT 12
109#define GNSS4_GNGGA_TIME_SINCE_LAST_DGPS 13
110#define GNSS4_GNGGA_DGPS_REFERENCE_STATION_ID 14
117#define GNSS4_GNGLL_LATITUDE 1
118#define GNSS4_GNGLL_LATITUDE_SIDE 2
119#define GNSS4_GNGLL_LONGITUDE 3
120#define GNSS4_GNGLL_LONGITUDE_SIDE 4
127#define GNSS4_ERROR_COMMAND_OR_ELEMENT 0xFF
128#define GNSS4_ERROR_START_OR_END_COMMAND 0x8F
129#define GNSS4_ERROR_NEXT_ELEMENT 0x4F
130#define GNSS4_ERROR_CURRENT_ELEMENT 0x2F
131#define GNSS4_NO_ERROR 0x00
138#define DRV_RX_BUFFER_SIZE 500
265 char *rsp, uint8_t command,
266 uint8_t element,
char *parser_buf
#define DRV_RX_BUFFER_SIZE
Definition gnss4.h:138
#define GNSS4_RETVAL
Definition gnss4.h:77
void gnss4_module_wakeup(gnss4_t *ctx)
Wake-up module.
GNSS4_RETVAL gnss4_init(gnss4_t *ctx, gnss4_cfg_t *cfg)
Initialization function.
void gnss4_set_rst_pin(gnss4_t *ctx, uint8_t state)
Set RST ( reset ) pin state.
int32_t gnss4_generic_read(gnss4_t *ctx, char *data_buf, uint16_t max_len)
Generic read function.
gnss4_error_t gnss4_generic_parser(char *rsp, uint8_t command, uint8_t element, char *parser_buf)
Generic parser function.
void gnss4_cfg_setup(gnss4_cfg_t *cfg)
Config Object Initialization function.
void gnss4_generic_write(gnss4_t *ctx, char *data_buf, uint16_t len)
Generic write function.
uint8_t gnss4_error_t
Error type.
Definition gnss4.h:192
Click configuration structure definition.
Definition gnss4.h:169
uint32_t baud_rate
Definition gnss4.h:181
bool uart_blocking
Definition gnss4.h:182
uart_data_bits_t data_bit
Definition gnss4.h:183
pin_name_t tx_pin
Definition gnss4.h:173
pin_name_t rx_pin
Definition gnss4.h:172
uart_stop_bits_t stop_bit
Definition gnss4.h:185
uart_parity_t parity_bit
Definition gnss4.h:184
pin_name_t rst
Definition gnss4.h:177
Click ctx object definition.
Definition gnss4.h:151
uart_t uart
Definition gnss4.h:158
digital_out_t rst
Definition gnss4.h:154