irnss 2.0.0.0
IRNSS Click Driver

API for configuring and manipulating IRNSS Click driver. More...

Topics

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

Functions

void irnss_cfg_setup (irnss_cfg_t *cfg)
 IRNSS configuration object setup function.
 
err_t irnss_init (irnss_t *ctx, irnss_cfg_t *cfg)
 IRNSS initialization function.
 
err_t irnss_generic_write (irnss_t *ctx, char *data_buf, uint16_t len)
 IRNSS data writing function.
 
err_t irnss_generic_read (irnss_t *ctx, char *data_buf, uint16_t max_len)
 IRNSS data reading function.
 
void irnss_set_rst_pin_state (irnss_t *ctx, uint8_t state)
 Sets state of the rst pin setting.
 
void irnss_set_wkp_pin_state (irnss_t *ctx, uint8_t state)
 Sets state of the wkp pin setting.
 
err_t irnss_parse_gngga (char *rsp_buf, uint8_t gngga_element, char *element_data)
 IRNSS parse GNGGA function.
 

Detailed Description

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

◆ irnss_cfg_setup()

void irnss_cfg_setup ( irnss_cfg_t * cfg)

IRNSS configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ irnss_generic_read()

err_t irnss_generic_read ( irnss_t * ctx,
char * data_buf,
uint16_t max_len )

IRNSS data reading function.

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

Parameters
[in]ctx: Click context object. See irnss_t object definition for detailed explanation.
[out]data_buf: Output read data.
[in]max_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.

◆ irnss_generic_write()

err_t irnss_generic_write ( irnss_t * ctx,
char * data_buf,
uint16_t len )

IRNSS data writing function.

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

Parameters
[in]ctx: Click context object. See irnss_t object definition for detailed explanation.
[in]data_buf: 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.

◆ irnss_init()

err_t irnss_init ( irnss_t * ctx,
irnss_cfg_t * cfg )

IRNSS initialization function.

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

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

◆ irnss_parse_gngga()

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

IRNSS 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.

◆ irnss_set_rst_pin_state()

void irnss_set_rst_pin_state ( irnss_t * ctx,
uint8_t state )

Sets state of the rst pin setting.

This function sets rst pin output to state setting.

Parameters
[in]ctxClick context object. See irnss_t object definition for detailed explanation.
[in]stateOutput value setting.
  • 0 - digital out low,
  • 1 - digital out high.

◆ irnss_set_wkp_pin_state()

void irnss_set_wkp_pin_state ( irnss_t * ctx,
uint8_t state )

Sets state of the wkp pin setting.

This function sets wkp pin output to state setting.

Parameters
[in]ctxClick context object. See irnss_t object definition for detailed explanation.
[in]stateOutput value setting.
  • 0 - digital out low,
  • 1 - digital out high.