gnss6 2.1.0.0
GNSS 6 Click Driver

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

Topics

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

Functions

void gnss6_cfg_setup (gnss6_cfg_t *cfg)
 GNSS 6 configuration object setup function.
 
void gnss6_drv_interface_selection (gnss6_cfg_t *cfg, gnss6_drv_t drv_sel)
 GNSS 6 driver interface setup function.
 
err_t gnss6_init (gnss6_t *ctx, gnss6_cfg_t *cfg)
 GNSS 6 initialization function.
 
err_t gnss6_generic_write (gnss6_t *ctx, uint8_t *data_in, uint8_t len)
 GNSS 6 data writing function.
 
err_t gnss6_generic_read (gnss6_t *ctx, uint8_t *data_out, uint8_t len)
 GNSS 6 data reading function.
 
void gnss6_set_rst_pin (gnss6_t *ctx, uint8_t state)
 GNSS 6 set RST pin function.
 
void gnss6_set_wup_pin (gnss6_t *ctx, uint8_t state)
 GNSS 6 set WUP pin function.
 
uint8_t gnss6_get_pps_pin (gnss6_t *ctx)
 GNSS 6 get PPS pin function.
 
void gnss6_reset_device (gnss6_t *ctx)
 GNSS 6 reset device function.
 
err_t gnss6_parse_gpgga (uint8_t *rsp_buf, uint8_t gpgga_element, uint8_t *element_data)
 GNSS 6 parse GPGGA function.
 

Detailed Description

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

◆ gnss6_cfg_setup()

void gnss6_cfg_setup ( gnss6_cfg_t * cfg)

GNSS 6 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ gnss6_drv_interface_selection()

void gnss6_drv_interface_selection ( gnss6_cfg_t * cfg,
gnss6_drv_t drv_sel )

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

◆ gnss6_generic_read()

err_t gnss6_generic_read ( gnss6_t * ctx,
uint8_t * data_out,
uint8_t len )

GNSS 6 data reading function.

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

Parameters
[in]ctx: Click context object. See gnss6_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.

◆ gnss6_generic_write()

err_t gnss6_generic_write ( gnss6_t * ctx,
uint8_t * data_in,
uint8_t len )

GNSS 6 data writing function.

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

Parameters
[in]ctx: Click context object. See gnss6_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.

◆ gnss6_get_pps_pin()

uint8_t gnss6_get_pps_pin ( gnss6_t * ctx)

GNSS 6 get PPS pin function.

This function returns the PPS pin logic state.

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

◆ gnss6_init()

err_t gnss6_init ( gnss6_t * ctx,
gnss6_cfg_t * cfg )

GNSS 6 initialization function.

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

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

◆ gnss6_parse_gpgga()

err_t gnss6_parse_gpgga ( uint8_t * rsp_buf,
uint8_t gpgga_element,
uint8_t * element_data )

GNSS 6 parse GPGGA function.

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

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

◆ gnss6_reset_device()

void gnss6_reset_device ( gnss6_t * ctx)

GNSS 6 reset device function.

This function resets the device by toggling the RST pin.

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

◆ gnss6_set_rst_pin()

void gnss6_set_rst_pin ( gnss6_t * ctx,
uint8_t state )

GNSS 6 set RST pin function.

This function sets the RST pin logic state.

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

◆ gnss6_set_wup_pin()

void gnss6_set_wup_pin ( gnss6_t * ctx,
uint8_t state )

GNSS 6 set WUP pin function.

This function sets the WUP pin logic state.

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