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 GPS3_RSP_START "$"
74#define GPS3_RSP_DELIMITER ","
75#define GPS3_RSP_END_SEQ "\r\n"
76#define GPS3_RSP_GPGGA "$GPGGA"
82#define GPS3_GPGGA_ELEMENT_SIZE 15
83#define GPS3_GPGGA_TIME 1
84#define GPS3_GPGGA_LATITUDE 2
85#define GPS3_GPGGA_LATITUDE_SIDE 3
86#define GPS3_GPGGA_LONGITUDE 4
87#define GPS3_GPGGA_LONGITUDE_SIDE 5
88#define GPS3_GPGGA_QUALITY_INDICATOR 6
89#define GPS3_GPGGA_NUMBER_OF_SATELLITES 7
90#define GPS3_GPGGA_H_DILUTION_OF_POS 8
91#define GPS3_GPGGA_ALTITUDE 9
92#define GPS3_GPGGA_ALTITUDE_UNIT 10
93#define GPS3_GPGGA_GEOIDAL_SEPARATION 11
94#define GPS3_GPGGA_GEOIDAL_SEPARATION_UNIT 12
95#define GPS3_GPGGA_TIME_SINCE_LAST_DGPS 13
96#define GPS3_GPGGA_DGPS_REFERENCE_STATION_ID 14
103#define GPS3_DRV_TX_BUFFER_SIZE 100
104#define GPS3_DRV_RX_BUFFER_SIZE 1000
122#define GPS3_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 );
gps3_return_value_t
GPS 3 Click return value data.
Definition gps3.h:175
@ GPS3_OK
Definition gps3.h:176
@ GPS3_ERROR
Definition gps3.h:177
#define GPS3_DRV_TX_BUFFER_SIZE
GPS 3 driver buffer size.
Definition gps3.h:103
#define GPS3_DRV_RX_BUFFER_SIZE
Definition gps3.h:104
void gps3_clear_ring_buffers(gps3_t *ctx)
GPS 3 clear ring buffers function.
err_t gps3_generic_write(gps3_t *ctx, char *data_in, uint16_t len)
GPS 3 data writing function.
err_t gps3_generic_read(gps3_t *ctx, char *data_out, uint16_t len)
GPS 3 data reading function.
void gps3_cfg_setup(gps3_cfg_t *cfg)
GPS 3 configuration object setup function.
err_t gps3_parse_gpgga(char *rsp_buf, uint8_t gpgga_element, char *element_data)
GPS 3 parse GPGGA function.
void gps3_set_rst_pin(gps3_t *ctx, uint8_t state)
GPS 3 set RST pin function.
err_t gps3_init(gps3_t *ctx, gps3_cfg_t *cfg)
GPS 3 initialization function.
GPS 3 Click configuration object.
Definition gps3.h:153
uint32_t baud_rate
Definition gps3.h:162
bool uart_blocking
Definition gps3.h:163
uart_data_bits_t data_bit
Definition gps3.h:164
pin_name_t tx_pin
Definition gps3.h:156
pin_name_t rx_pin
Definition gps3.h:155
uart_stop_bits_t stop_bit
Definition gps3.h:166
uart_parity_t parity_bit
Definition gps3.h:165
pin_name_t rst
Definition gps3.h:159
GPS 3 Click context object.
Definition gps3.h:135
uart_t uart
Definition gps3.h:140
digital_out_t rst
Definition gps3.h:137