lr10 2.1.0.0
LR 10 Click Driver

API for configuring and manipulating LR 10 Click driver. More...

Topics

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

Functions

void lr10_cfg_setup (lr10_cfg_t *cfg)
 LR 10 configuration object setup function.
 
err_t lr10_init (lr10_t *ctx, lr10_cfg_t *cfg)
 LR 10 initialization function.
 
void lr10_hw_reset (lr10_t *ctx)
 LR 10 HW reset function.
 
err_t lr10_generic_write (lr10_t *ctx, uint8_t *data_in, uint16_t len)
 LR 10 data writing function.
 
err_t lr10_generic_read (lr10_t *ctx, uint8_t *data_out, uint16_t len)
 LR 10 data reading function.
 
err_t lr10_write_cmd (lr10_t *ctx, uint8_t *command)
 LR 10 command writing function.
 
err_t lr10_write_cmd_param (lr10_t *ctx, uint8_t *command, uint8_t *param)
 LR 10 command - parameter writing function.
 
err_t lr10_write_cmd_sub_param (lr10_t *ctx, uint8_t *command, uint8_t *sub_param, uint8_t *param, lr10_en_quote_t en_quote)
 LR 10 command - subcommands - parameter writing function.
 
err_t lr10_inquire_cmd (lr10_t *ctx, uint8_t *command)
 LR 10 inquire command function.
 

Detailed Description

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

◆ lr10_cfg_setup()

void lr10_cfg_setup ( lr10_cfg_t * cfg)

LR 10 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ lr10_generic_read()

err_t lr10_generic_read ( lr10_t * ctx,
uint8_t * data_out,
uint16_t len )

LR 10 data reading function.

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

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

◆ lr10_generic_write()

err_t lr10_generic_write ( lr10_t * ctx,
uint8_t * data_in,
uint16_t len )

LR 10 data writing function.

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

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

◆ lr10_hw_reset()

void lr10_hw_reset ( lr10_t * ctx)

LR 10 HW reset function.

This function performs a hardware reset of the device.

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

◆ lr10_init()

err_t lr10_init ( lr10_t * ctx,
lr10_cfg_t * cfg )

LR 10 initialization function.

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

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

◆ lr10_inquire_cmd()

err_t lr10_inquire_cmd ( lr10_t * ctx,
uint8_t * command )

LR 10 inquire command function.

This function writes a desired inquire command by using UART serial interface.

Parameters
[in]ctx: Click context object. See lr10_t object definition for detailed explanation.
[in]command: Command buffer for sending.
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ lr10_write_cmd()

err_t lr10_write_cmd ( lr10_t * ctx,
uint8_t * command )

LR 10 command writing function.

This function writes a desired command by using UART serial interface.

Parameters
[in]ctx: Click context object. See lr10_t object definition for detailed explanation.
[in]command: Command buffer for sending.
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ lr10_write_cmd_param()

err_t lr10_write_cmd_param ( lr10_t * ctx,
uint8_t * command,
uint8_t * param )

LR 10 command - parameter writing function.

This function writes a desired command and parameter by using UART serial interface.

Parameters
[in]ctx: Click context object. See lr10_t object definition for detailed explanation.
[in]command: Command buffer for sending.
[in]param: Parameter buffer for sending.
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ lr10_write_cmd_sub_param()

err_t lr10_write_cmd_sub_param ( lr10_t * ctx,
uint8_t * command,
uint8_t * sub_param,
uint8_t * param,
lr10_en_quote_t en_quote )

LR 10 command - subcommands - parameter writing function.

This function writes a desired command, subcommands and parameter by using UART serial interface.

Parameters
[in]ctx: Click context object. See lr10_t object definition for detailed explanation.
[in]command: Command buffer for sending.
[in]sub_param: Subcommands buffer for sending.
[in]param: Parameter buffer for sending.
[in]en_quote: Enable quote. See lr10_en_quote_t definition for detailed explanation.
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
Note
None.