mosaic  2.1.0.0
Data Structures | Macros | Enumerations | Functions
mosaic.h File Reference

This file contains API for Mosaic Click Driver. More...

#include "mikrosdk_version.h"
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  mosaic_t
 Mosaic Click context object. More...
 
struct  mosaic_cfg_t
 Mosaic Click configuration object. More...
 

Macros

#define MOSAIC_CMD_SET_NMEA_OUTPUT   "setNMEAOutput"
 Mosaic control commands. More...
 
#define MOSAIC_CMD_GET_NMEA_VERSION   "getNMEAVersion"
 
#define MOSAIC_PROMPT_CMD   "COM1>"
 Mosaic device commands settings. More...
 
#define MOSAIC_PARAM_DELIMITER   ","
 
#define MOSAIC_END_CMD   "\r\n"
 
#define MOSAIC_SNO_STREAM_1   "Stream1"
 Mosaic set NMEA output command parameters. More...
 
#define MOSAIC_SNO_STREAM_2   "Stream2"
 
#define MOSAIC_SNO_STREAM_3   "Stream3"
 
#define MOSAIC_SNO_STREAM_4   "Stream4"
 
#define MOSAIC_SNO_STREAM_5   "Stream5"
 
#define MOSAIC_SNO_STREAM_6   "Stream6"
 
#define MOSAIC_SNO_STREAM_7   "Stream7"
 
#define MOSAIC_SNO_STREAM_8   "Stream8"
 
#define MOSAIC_SNO_STREAM_9   "Stream9"
 
#define MOSAIC_SNO_STREAM_10   "Stream10"
 
#define MOSAIC_SNO_STREAM_ALL   "all"
 
#define MOSAIC_SNO_CD_NONE   "none"
 
#define MOSAIC_SNO_CD_COM1   "COM1"
 
#define MOSAIC_SNO_MESSAGES_NONE   "none"
 
#define MOSAIC_SNO_MESSAGES_ALM   "ALM"
 
#define MOSAIC_SNO_MESSAGES_DTM   "DTM"
 
#define MOSAIC_SNO_MESSAGES_GBS   "GBS"
 
#define MOSAIC_SNO_MESSAGES_GGA   "GGA"
 
#define MOSAIC_SNO_MESSAGES_GLL   "GLL"
 
#define MOSAIC_SNO_MESSAGES_GNS   "GNS"
 
#define MOSAIC_SNO_MESSAGES_GRS   "GRS"
 
#define MOSAIC_SNO_MESSAGES_GSA   "GSA"
 
#define MOSAIC_SNO_MESSAGES_GST   "GST"
 
#define MOSAIC_SNO_MESSAGES_GSV   "GSV"
 
#define MOSAIC_SNO_MESSAGES_HDT   "HDT"
 
#define MOSAIC_SNO_MESSAGES_RMC   "RMC"
 
#define MOSAIC_SNO_MESSAGES_ROT   "ROT"
 
#define MOSAIC_SNO_MESSAGES_VTG   "VTG"
 
#define MOSAIC_SNO_MESSAGES_ZDA   "ZDA"
 
#define MOSAIC_SNO_MESSAGES_HRP   "HRP"
 
#define MOSAIC_SNO_MESSAGES_LLQ   "LLQ"
 
#define MOSAIC_SNO_MESSAGES_RBP   "RBP"
 
#define MOSAIC_SNO_MESSAGES_RBV   "RBV"
 
#define MOSAIC_SNO_MESSAGES_RBD   "RBD"
 
#define MOSAIC_SNO_MESSAGES_AVR   "AVR"
 
#define MOSAIC_SNO_MESSAGES_GGK   "GGK"
 
#define MOSAIC_SNO_MESSAGES_GFA   "GFA"
 
#define MOSAIC_SNO_MESSAGES_GGQ   "GGQ"
 
#define MOSAIC_SNO_MESSAGES_LLK   "LLK"
 
#define MOSAIC_SNO_MESSAGES_GMP   "GMP"
 
#define MOSAIC_SNO_MESSAGES_TXT_BASE   "TXTbase"
 
#define MOSAIC_SNO_MESSAGES_TFM   "TFM"
 
#define MOSAIC_SNO_MESSAGES_SNC   "SNC"
 
#define MOSAIC_SNO_MESSAGES_THS   "THS"
 
#define MOSAIC_SNO_INTERVAL_OFF   "off"
 
#define MOSAIC_SNO_INTERVAL_ON_CHANGE   "OnChange"
 
#define MOSAIC_SNO_INTERVAL_MSEC10   "msec10"
 
#define MOSAIC_SNO_INTERVAL_MSEC20   "msec20"
 
#define MOSAIC_SNO_INTERVAL_MSEC40   "msec40"
 
#define MOSAIC_SNO_INTERVAL_MSEC50   "msec50"
 
#define MOSAIC_SNO_INTERVAL_MSEC100   "msec100"
 
#define MOSAIC_SNO_INTERVAL_MSEC200   "msec200"
 
#define MOSAIC_SNO_INTERVAL_MSEC500   "msec500"
 
#define MOSAIC_SNO_INTERVAL_SEC1   "sec1"
 
#define MOSAIC_SNO_INTERVAL_SEC2   "sec2"
 
#define MOSAIC_SNO_INTERVAL_SEC5   "sec5"
 
#define MOSAIC_SNO_INTERVAL_SEC10   "sec10"
 
#define MOSAIC_SNO_INTERVAL_SEC15   "sec15"
 
#define MOSAIC_SNO_INTERVAL_SEC30   "sec30"
 
#define MOSAIC_SNO_INTERVAL_SEC60   "sec60"
 
#define MOSAIC_SNO_INTERVAL_MIN2   "min2"
 
#define MOSAIC_SNO_INTERVAL_MIN5   "min5"
 
#define MOSAIC_SNO_INTERVAL_MIN10   "min10"
 
#define MOSAIC_SNO_INTERVAL_MIN15   "min15"
 
#define MOSAIC_SNO_INTERVAL_MIN30   "min30"
 
#define MOSAIC_SNO_INTERVAL_MIN60   "min60"
 
#define MOSAIC_NMEA_START   "$"
 Mosaic nmea buffer commands. More...
 
#define MOSAIC_NMEA_DELIMITER   ","
 
#define MOSAIC_NMEA_END   "\r\n"
 
#define MOSAIC_NMEA_GGA   "GGA"
 
#define MOSAIC_GGA_ELEMENT_SIZE   15
 Mosaic GGA command elements. More...
 
#define MOSAIC_GGA_TIME   1
 
#define MOSAIC_GGA_LATITUDE   2
 
#define MOSAIC_GGA_LATITUDE_SIDE   3
 
#define MOSAIC_GGA_LONGITUDE   4
 
#define MOSAIC_GGA_LONGITUDE_SIDE   5
 
#define MOSAIC_GGA_QUALITY_INDICATOR   6
 
#define MOSAIC_GGA_NUMBER_OF_SATELLITES   7
 
#define MOSAIC_GGA_H_DILUTION_OF_POS   8
 
#define MOSAIC_GGA_ALTITUDE   9
 
#define MOSAIC_GGA_ALTITUDE_UNIT   10
 
#define MOSAIC_GGA_GEOIDAL_SEPARATION   11
 
#define MOSAIC_GGA_GEOIDAL_SEPARATION_UNIT   12
 
#define MOSAIC_GGA_TIME_SINCE_LAST_DGPS   13
 
#define MOSAIC_GGA_DGPS_REFERENCE_STATION_ID   14
 
#define MOSAIC_RX_DRV_BUFFER_SIZE   400
 Mosaic driver buffer size. More...
 
#define MOSAIC_TX_DRV_BUFFER_SIZE   200
 
#define MOSAIC_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  mosaic_return_value_t { MOSAIC_OK = 0, MOSAIC_ERROR = -1, MOSAIC_ERROR_TIMEOUT = -2 }
 Mosaic Click return value data. More...
 

Functions

void mosaic_cfg_setup (mosaic_cfg_t *cfg)
 Mosaic configuration object setup function. More...
 
err_t mosaic_init (mosaic_t *ctx, mosaic_cfg_t *cfg)
 Mosaic initialization function. More...
 
err_t mosaic_generic_write (mosaic_t *ctx, uint8_t *data_in, uint16_t len)
 Mosaic data writing function. More...
 
err_t mosaic_generic_read (mosaic_t *ctx, uint8_t *data_out, uint16_t len)
 Mosaic data reading function. More...
 
void mosaic_set_rst_pin (mosaic_t *ctx, uint8_t state)
 Mosaic set rst pin function. More...
 
void mosaic_set_cts_pin (mosaic_t *ctx, uint8_t state)
 Mosaic set cts pin function. More...
 
uint8_t mosaic_get_rdy_pin (mosaic_t *ctx)
 Mosaic get rdy pin function. More...
 
uint8_t mosaic_get_rts_pin (mosaic_t *ctx)
 Mosaic get rts pin function. More...
 
void mosaic_send_cmd (mosaic_t *ctx, uint8_t *cmd)
 Send command function. More...
 
void mosaic_send_cmd_with_par (mosaic_t *ctx, uint8_t *cmd_buf, uint8_t *param_buf)
 Send command function with parameter. More...
 
void mosaic_enable_nmea_output (mosaic_t *ctx, uint8_t *msg_param, uint8_t *interval)
 Mosaic enable nmea output function. More...
 
void mosaic_disable_nmea_output (mosaic_t *ctx)
 Mosaic disable nmea output function. More...
 
err_t mosaic_parse_gga (uint8_t *rsp_buf, uint8_t gga_element, uint8_t *element_data)
 Mosaic parse GGA function. More...
 

Detailed Description

This file contains API for Mosaic Click Driver.

Enumeration Type Documentation

◆ mosaic_return_value_t

Mosaic Click return value data.

Predefined enum values for driver return values.

Enumerator
MOSAIC_OK 
MOSAIC_ERROR 
MOSAIC_ERROR_TIMEOUT