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 IRNSS_RSP_START "$"
74#define IRNSS_RSP_DELIMITER ","
75#define IRNSS_RSP_GNGGA "$GNGGA"
81#define IRNSS_GNGGA_ELEMENT_SIZE 15
82#define IRNSS_GNGGA_TIME 1
83#define IRNSS_GNGGA_LATITUDE 2
84#define IRNSS_GNGGA_LATITUDE_SIDE 3
85#define IRNSS_GNGGA_LONGITUDE 4
86#define IRNSS_GNGGA_LONGITUDE_SIDE 5
87#define IRNSS_GNGGA_QUALITY_INDICATOR 6
88#define IRNSS_GNGGA_NUMBER_OF_SATELLITES 7
89#define IRNSS_GNGGA_H_DILUTION_OF_POS 8
90#define IRNSS_GNGGA_ALTITUDE 9
91#define IRNSS_GNGGA_ALTITUDE_UNIT 10
92#define IRNSS_GNGGA_GEOIDAL_SEPARATION 11
93#define IRNSS_GNGGA_GEOIDAL_SEPARATION_UNIT 12
94#define IRNSS_GNGGA_TIME_SINCE_LAST_DGPS 13
95#define IRNSS_GNGGA_DGPS_REFERENCE_STATION_ID 14
102#define DRV_RX_BUFFER_SIZE 300
103#define DRV_TX_BUFFER_SIZE 100
121#define IRNSS_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 ); \
125 cfg.wkp = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
#define DRV_RX_BUFFER_SIZE
IRNSS driver buffer size.
Definition irnss.h:102
#define DRV_TX_BUFFER_SIZE
Definition irnss.h:103
err_t irnss_generic_write(irnss_t *ctx, char *data_buf, uint16_t len)
IRNSS data writing function.
void irnss_set_rst_pin_state(irnss_t *ctx, uint8_t state)
Sets state of the rst pin setting.
void irnss_cfg_setup(irnss_cfg_t *cfg)
IRNSS configuration object setup function.
void irnss_set_wkp_pin_state(irnss_t *ctx, uint8_t state)
Sets state of the wkp pin setting.
err_t irnss_init(irnss_t *ctx, irnss_cfg_t *cfg)
IRNSS initialization function.
err_t irnss_generic_read(irnss_t *ctx, char *data_buf, uint16_t max_len)
IRNSS data reading function.
err_t irnss_parse_gngga(char *rsp_buf, uint8_t gngga_element, char *element_data)
IRNSS parse GNGGA function.
irnss_return_value_t
IRNSS Click return value data.
Definition irnss.h:177
@ IRNSS_ERROR
Definition irnss.h:179
@ IRNSS_OK
Definition irnss.h:178
IRNSS Click configuration object.
Definition irnss.h:154
uint32_t baud_rate
Definition irnss.h:164
pin_name_t wkp
Definition irnss.h:161
bool uart_blocking
Definition irnss.h:165
uart_data_bits_t data_bit
Definition irnss.h:166
pin_name_t tx_pin
Definition irnss.h:157
pin_name_t rx_pin
Definition irnss.h:156
uart_stop_bits_t stop_bit
Definition irnss.h:168
uart_parity_t parity_bit
Definition irnss.h:167
pin_name_t rst
Definition irnss.h:160
IRNSS Click context object.
Definition irnss.h:135
uart_t uart
Definition irnss.h:141
digital_out_t wkp
Definition irnss.h:138
digital_out_t rst
Definition irnss.h:137