gnss13 2.1.0.0
GNSS 13 Click Driver

API for configuring and manipulating GNSS 13 Click driver. More...

Topics

 GNSS 13 Device Settings
 Settings for registers of GNSS 13 Click driver.
 
 GNSS 13 MikroBUS Map
 MikroBUS pin mapping of GNSS 13 Click driver.
 

Functions

void gnss13_cfg_setup (gnss13_cfg_t *cfg)
 GNSS 13 configuration object setup function.
 
void gnss13_drv_interface_selection (gnss13_cfg_t *cfg, gnss13_drv_t drv_sel)
 GNSS 13 driver interface setup function.
 
err_t gnss13_init (gnss13_t *ctx, gnss13_cfg_t *cfg)
 GNSS 13 initialization function.
 
err_t gnss13_generic_write (gnss13_t *ctx, uint8_t *data_in, uint8_t len)
 GNSS 13 generic write function.
 
err_t gnss13_generic_read (gnss13_t *ctx, uint8_t *data_out, uint8_t len)
 GNSS 13 generic read function.
 
void gnss13_clear_ring_buffers (gnss13_t *ctx)
 GNSS 13 clear ring buffers function.
 
void gnss13_set_rst_pin (gnss13_t *ctx, uint8_t state)
 GNSS 13 set RST pin function.
 
void gnss13_set_wup_pin (gnss13_t *ctx, uint8_t state)
 GNSS 13 set WUP pin function.
 
err_t gnss13_parse_gngga (uint8_t *rsp_buf, uint8_t gngga_element, uint8_t *element_data)
 GNSS 13 parse GNGGA function.
 

Detailed Description

API for configuring and manipulating GNSS 13 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

◆ gnss13_cfg_setup()

void gnss13_cfg_setup ( gnss13_cfg_t * cfg)

GNSS 13 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ gnss13_clear_ring_buffers()

void gnss13_clear_ring_buffers ( gnss13_t * ctx)

GNSS 13 clear ring buffers function.

This function clears UART tx and rx ring buffers.

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

◆ gnss13_drv_interface_selection()

void gnss13_drv_interface_selection ( gnss13_cfg_t * cfg,
gnss13_drv_t drv_sel )

GNSS 13 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 gnss13_cfg_t object definition for detailed explanation.
[in]drv_sel: Driver interface selection. See gnss13_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.

◆ gnss13_generic_read()

err_t gnss13_generic_read ( gnss13_t * ctx,
uint8_t * data_out,
uint8_t len )

GNSS 13 generic read function.

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

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

◆ gnss13_generic_write()

err_t gnss13_generic_write ( gnss13_t * ctx,
uint8_t * data_in,
uint8_t len )

GNSS 13 generic write function.

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

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

◆ gnss13_init()

err_t gnss13_init ( gnss13_t * ctx,
gnss13_cfg_t * cfg )

GNSS 13 initialization function.

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

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

◆ gnss13_parse_gngga()

err_t gnss13_parse_gngga ( uint8_t * rsp_buf,
uint8_t gngga_element,
uint8_t * element_data )

GNSS 13 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.

◆ gnss13_set_rst_pin()

void gnss13_set_rst_pin ( gnss13_t * ctx,
uint8_t state )

GNSS 13 set RST pin function.

This function sets the RST pin logic state.

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

◆ gnss13_set_wup_pin()

void gnss13_set_wup_pin ( gnss13_t * ctx,
uint8_t state )

GNSS 13 set WUP pin function.

This function sets the WUP pin logic state.

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