gnssrtk2 2.1.0.0
GNSS RTK 2 Click Driver

API for configuring and manipulating GNSS RTK 2 Click driver. More...

Topics

 GNSS RTK 2 Registers Settings
 Settings for registers of GNSS RTK 2 Click driver.
 
 GNSS RTK 2 MikroBUS Map
 MikroBUS pin mapping of GNSS RTK 2 Click driver.
 

Functions

void gnssrtk2_cfg_setup (gnssrtk2_cfg_t *cfg)
 GNSS RTK 2 configuration object setup function.
 
void gnssrtk2_drv_interface_selection (gnssrtk2_cfg_t *cfg, gnssrtk2_drv_t drv_sel)
 GNSS RTK 2 driver interface setup function.
 
err_t gnssrtk2_init (gnssrtk2_t *ctx, gnssrtk2_cfg_t *cfg)
 GNSS RTK 2 initialization function.
 
err_t gnssrtk2_generic_write (gnssrtk2_t *ctx, uint8_t *data_in, uint8_t len)
 GNSS RTK 2 data writing function.
 
err_t gnssrtk2_generic_read (gnssrtk2_t *ctx, uint8_t *data_out, uint8_t len)
 GNSS RTK 2 data reading function.
 
void gnssrtk2_set_rst_pin (gnssrtk2_t *ctx, uint8_t state)
 GNSS RTK 2 set RST pin function.
 
uint8_t gnssrtk2_get_rdy_pin (gnssrtk2_t *ctx)
 GNSS RTK 2 get RDY pin function.
 
uint8_t gnssrtk2_get_rtk_pin (gnssrtk2_t *ctx)
 GNSS RTK 2 get RTK pin function.
 
uint8_t gnssrtk2_get_tmp_pin (gnssrtk2_t *ctx)
 GNSS RTK 2 get TMP pin function.
 
void gnssrtk2_reset_device (gnssrtk2_t *ctx)
 GNSS RTK 2 reset device function.
 
err_t gnssrtk2_parse_gngga (char *rsp_buf, uint8_t gngga_element, char *element_data)
 GNSS RTK 2 parse GNGGA function.
 

Detailed Description

API for configuring and manipulating GNSS RTK 2 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ gnssrtk2_cfg_setup()

void gnssrtk2_cfg_setup ( gnssrtk2_cfg_t * cfg)

GNSS RTK 2 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See gnssrtk2_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ gnssrtk2_drv_interface_selection()

void gnssrtk2_drv_interface_selection ( gnssrtk2_cfg_t * cfg,
gnssrtk2_drv_t drv_sel )

GNSS RTK 2 driver interface setup function.

This function sets a serial driver interface which will be used further in the click driver.

Parameters
[out]cfg: Click configuration structure. See gnssrtk2_cfg_t object definition for detailed explanation.
[in]drv_sel: Driver interface selection. See gnssrtk2_drv_t object definition for detailed explanation.
Returns
Nothing.
Note
This driver selection should be call before init function to configure the driver to work with the serial interface which is consistent with the real state of the hardware. If this function is not called, the default driver interface will be set.

◆ gnssrtk2_generic_read()

err_t gnssrtk2_generic_read ( gnssrtk2_t * ctx,
uint8_t * data_out,
uint8_t len )

GNSS RTK 2 data reading function.

This function reads a desired number of data bytes from the module.

Parameters
[in]ctx: Click context object. See gnssrtk2_t object definition for detailed explanation.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • >=0 - Success, or number of data bytes read in the case of UART,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ gnssrtk2_generic_write()

err_t gnssrtk2_generic_write ( gnssrtk2_t * ctx,
uint8_t * data_in,
uint8_t len )

GNSS RTK 2 data writing function.

This function writes a desired number of data bytes to the module.

Parameters
[in]ctx: Click context object. See gnssrtk2_t object definition for detailed explanation.
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • >=0 - Success, or number of data bytes written in the case of UART,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ gnssrtk2_get_rdy_pin()

uint8_t gnssrtk2_get_rdy_pin ( gnssrtk2_t * ctx)

GNSS RTK 2 get RDY pin function.

This function returns the RDY pin logic state.

Parameters
[in]ctx: Click context object. See gnssrtk2_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ gnssrtk2_get_rtk_pin()

uint8_t gnssrtk2_get_rtk_pin ( gnssrtk2_t * ctx)

GNSS RTK 2 get RTK pin function.

This function returns the RTK pin logic state.

Parameters
[in]ctx: Click context object. See gnssrtk2_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ gnssrtk2_get_tmp_pin()

uint8_t gnssrtk2_get_tmp_pin ( gnssrtk2_t * ctx)

GNSS RTK 2 get TMP pin function.

This function returns the TMP pin logic state.

Parameters
[in]ctx: Click context object. See gnssrtk2_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ gnssrtk2_init()

err_t gnssrtk2_init ( gnssrtk2_t * ctx,
gnssrtk2_cfg_t * cfg )

GNSS RTK 2 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See gnssrtk2_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See gnssrtk2_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ gnssrtk2_parse_gngga()

err_t gnssrtk2_parse_gngga ( char * rsp_buf,
uint8_t gngga_element,
char * element_data )

GNSS RTK 2 parse GNGGA function.

This function parses the GNGGA data from the read response buffer.

Parameters
[in]rsp_buf: Response buffer.
[in]gngga_element: GNGGA element position [1-14].
[out]element_data: Element data parsed.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ gnssrtk2_reset_device()

void gnssrtk2_reset_device ( gnssrtk2_t * ctx)

GNSS RTK 2 reset device function.

This function resets the device by toggling the RST pin.

Parameters
[in]ctx: Click context object. See gnssrtk2_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ gnssrtk2_set_rst_pin()

void gnssrtk2_set_rst_pin ( gnssrtk2_t * ctx,
uint8_t state )

GNSS RTK 2 set RST pin function.

This function sets the RST pin logic state.

Parameters
[in]ctx: Click context object. See gnssrtk2_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.