gnss5 2.0.0.0
GNSS 5 Click Driver

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

Topics

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

Functions

void gnss5_cfg_setup (gnss5_cfg_t *cfg)
 GNSS 5 configuration object setup function.
 
err_t gnss5_init (gnss5_t *ctx, gnss5_cfg_t *cfg)
 GNSS 5 initialization function.
 
err_t gnss5_generic_write (gnss5_t *ctx, char *data_in, uint16_t len)
 GNSS 5 data writing function.
 
err_t gnss5_generic_read (gnss5_t *ctx, char *data_out, uint16_t len)
 GNSS 5 data reading function.
 
void gnss5_clear_ring_buffers (gnss5_t *ctx)
 GNSS 5 clear ring buffers function.
 
void gnss5_set_rst_pin (gnss5_t *ctx, uint8_t state)
 GNSS 5 set RST pin function.
 
uint8_t gnss5_get_exi_pin (gnss5_t *ctx)
 GNSS 5 get EXI pin function.
 
uint8_t gnss5_get_pps_pin (gnss5_t *ctx)
 GNSS 5 get PPS pin function.
 
err_t gnss5_parse_gngga (char *rsp_buf, uint8_t gngga_element, char *element_data)
 GNSS 5 parse GNGGA function.
 

Detailed Description

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

◆ gnss5_cfg_setup()

void gnss5_cfg_setup ( gnss5_cfg_t * cfg)

GNSS 5 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ gnss5_clear_ring_buffers()

void gnss5_clear_ring_buffers ( gnss5_t * ctx)

GNSS 5 clear ring buffers function.

This function clears UART tx and rx ring buffers.

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

◆ gnss5_generic_read()

err_t gnss5_generic_read ( gnss5_t * ctx,
char * data_out,
uint16_t len )

GNSS 5 data reading function.

This function reads a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See gnss5_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,
  • <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation.
Note
None.

◆ gnss5_generic_write()

err_t gnss5_generic_write ( gnss5_t * ctx,
char * data_in,
uint16_t len )

GNSS 5 data writing function.

This function writes a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See gnss5_t object definition for detailed explanation.
[in]data_in: Data buffer for sending.
[in]len: Number of bytes for sending.
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ gnss5_get_exi_pin()

uint8_t gnss5_get_exi_pin ( gnss5_t * ctx)

GNSS 5 get EXI pin function.

This function returns the EXI pin logic state.

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

◆ gnss5_get_pps_pin()

uint8_t gnss5_get_pps_pin ( gnss5_t * ctx)

GNSS 5 get PPS pin function.

This function returns the PPS pin logic state.

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

◆ gnss5_init()

err_t gnss5_init ( gnss5_t * ctx,
gnss5_cfg_t * cfg )

GNSS 5 initialization function.

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

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

◆ gnss5_parse_gngga()

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

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

◆ gnss5_set_rst_pin()

void gnss5_set_rst_pin ( gnss5_t * ctx,
uint8_t state )

GNSS 5 set RST pin function.

This function sets the RST pin logic state.

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