gnss18 2.1.0.0
Modules | Functions
GNSS 18 Click Driver

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

Modules

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

Functions

void gnss18_cfg_setup (gnss18_cfg_t *cfg)
 GNSS 18 configuration object setup function. More...
 
void gnss18_drv_interface_selection (gnss18_cfg_t *cfg, gnss18_drv_t drv_sel)
 GNSS 18 driver interface setup function. More...
 
err_t gnss18_init (gnss18_t *ctx, gnss18_cfg_t *cfg)
 GNSS 18 initialization function. More...
 
err_t gnss18_generic_write (gnss18_t *ctx, uint8_t *data_in, uint8_t len)
 GNSS 18 data writing function. More...
 
err_t gnss18_generic_read (gnss18_t *ctx, uint8_t *data_out, uint8_t len)
 GNSS 18 data reading function. More...
 
void gnss18_set_rst_pin (gnss18_t *ctx, uint8_t state)
 GNSS 18 set RST pin function. More...
 
uint8_t gnss18_get_int_pin (gnss18_t *ctx)
 GNSS 18 get INT pin function. More...
 
void gnss18_reset_device (gnss18_t *ctx)
 GNSS 18 reset device function. More...
 
err_t gnss18_parse_gpgga (uint8_t *rsp_buf, uint8_t gpgga_element, uint8_t *element_data)
 GNSS 18 parse GPGGA function. More...
 

Detailed Description

API for configuring and manipulating GNSS 18 Click driver.

Function Documentation

◆ gnss18_cfg_setup()

void gnss18_cfg_setup ( gnss18_cfg_t cfg)

GNSS 18 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ gnss18_drv_interface_selection()

void gnss18_drv_interface_selection ( gnss18_cfg_t cfg,
gnss18_drv_t  drv_sel 
)

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

◆ gnss18_generic_read()

err_t gnss18_generic_read ( gnss18_t ctx,
uint8_t *  data_out,
uint8_t  len 
)

GNSS 18 data reading function.

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

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

◆ gnss18_generic_write()

err_t gnss18_generic_write ( gnss18_t ctx,
uint8_t *  data_in,
uint8_t  len 
)

GNSS 18 data writing function.

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

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

◆ gnss18_get_int_pin()

uint8_t gnss18_get_int_pin ( gnss18_t ctx)

GNSS 18 get INT pin function.

This function returns the INT pin logic state.

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

◆ gnss18_init()

err_t gnss18_init ( gnss18_t ctx,
gnss18_cfg_t cfg 
)

GNSS 18 initialization function.

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

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

◆ gnss18_parse_gpgga()

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

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

◆ gnss18_reset_device()

void gnss18_reset_device ( gnss18_t ctx)

GNSS 18 reset device function.

This function resets the device by toggling the RST pin.

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

◆ gnss18_set_rst_pin()

void gnss18_set_rst_pin ( gnss18_t ctx,
uint8_t  state 
)

GNSS 18 set RST pin function.

This function sets the RST pin logic state.

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