mosaic
2.1.0.0
|
API for configuring and manipulating Mosaic Click driver. More...
Modules | |
Mosaic Device Settings | |
Settings for registers of Mosaic Click driver. | |
Mosaic MikroBUS Map | |
MikroBUS pin mapping of Mosaic Click driver. | |
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... | |
API for configuring and manipulating Mosaic Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void mosaic_cfg_setup | ( | mosaic_cfg_t * | cfg | ) |
Mosaic configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See mosaic_cfg_t object definition for detailed explanation. |
void mosaic_disable_nmea_output | ( | mosaic_t * | ctx | ) |
Mosaic disable nmea output function.
This function disables the NMEA output for Stream1 on COM1.
[in] | ctx | : Click context object. See mosaic_t object definition for detailed explanation. |
void mosaic_enable_nmea_output | ( | mosaic_t * | ctx, |
uint8_t * | msg_param, | ||
uint8_t * | interval | ||
) |
Mosaic enable nmea output function.
This function enables the NMEA output with the selected message parameters and an output interval.
[in] | ctx | : Click context object. See mosaic_t object definition for detailed explanation. |
[in] | msg_param | : Message parameter, see MOSAIC_SNO_MESSAGES_x macro definisions. |
[in] | interval | : Output interval, see MOSAIC_SNO_INTERVAL_x macro definisions. |
err_t mosaic_generic_read | ( | mosaic_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len | ||
) |
Mosaic data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See mosaic_t object definition for detailed explanation. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. err_t mosaic_generic_write | ( | mosaic_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len | ||
) |
Mosaic data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See mosaic_t object definition for detailed explanation. |
[in] | data_in | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation. uint8_t mosaic_get_rdy_pin | ( | mosaic_t * | ctx | ) |
Mosaic get rdy pin function.
This function returns the module ready indication (RDY) pin logic state.
[in] | ctx | : Click context object. See mosaic_t object definition for detailed explanation. |
uint8_t mosaic_get_rts_pin | ( | mosaic_t * | ctx | ) |
Mosaic get rts pin function.
This function returns the RTS pin logic state.
[in] | ctx | : Click context object. See mosaic_t object definition for detailed explanation. |
err_t mosaic_init | ( | mosaic_t * | ctx, |
mosaic_cfg_t * | cfg | ||
) |
Mosaic initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See mosaic_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See mosaic_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t mosaic_parse_gga | ( | uint8_t * | rsp_buf, |
uint8_t | gga_element, | ||
uint8_t * | element_data | ||
) |
Mosaic parse GGA function.
This function parses the GGA data from the read response buffer.
[in] | rsp_buf | : Response buffer. |
[in] | gga_element | : GGA element position [1-14]. |
[out] | element_data | : Element data parsed. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void mosaic_send_cmd | ( | mosaic_t * | ctx, |
uint8_t * | cmd | ||
) |
Send command function.
This function sends a specified command to the click module.
[in] | ctx | : Click context object. See mosaic_t object definition for detailed explanation. |
[in] | cmd | : Command variable. |
void mosaic_send_cmd_with_par | ( | mosaic_t * | ctx, |
uint8_t * | cmd_buf, | ||
uint8_t * | param_buf | ||
) |
Send command function with parameter.
This function sends a command with specified parameter to the click module.
[in] | ctx | : Click context object. See mosaic_t object definition for detailed explanation. |
[in] | cmd_buf | : Command buffer. |
[in] | param_buf | : Parameter buffer. |
void mosaic_set_cts_pin | ( | mosaic_t * | ctx, |
uint8_t | state | ||
) |
Mosaic set cts pin function.
This function sets the CTS pin logic state.
[in] | ctx | : Click context object. See mosaic_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |