lr15 2.2.1
Loading...
Searching...
No Matches
LR 15 Click Driver

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

Topics

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

Functions

void lr15_cfg_setup (lr15_cfg_t *cfg)
 LR 15 configuration object setup function.
err_t lr15_init (lr15_t *ctx, lr15_cfg_t *cfg)
 LR 15 initialization function.
err_t lr15_generic_write (lr15_t *ctx, uint8_t *data_in, uint16_t len)
 LR 15 data writing function.
err_t lr15_generic_read (lr15_t *ctx, uint8_t *data_out, uint16_t len)
 LR 15 data reading function.
void lr15_set_rst_pin (lr15_t *ctx, uint8_t state)
 LR 15 set RST pin function.
void lr15_set_boot_pin (lr15_t *ctx, uint8_t state)
 LR 15 set BOOT pin function.
void lr15_reset_device (lr15_t *ctx)
 LR 15 reset device function.
void lr15_cmd_run (lr15_t *ctx, uint8_t *cmd)
 LR 15 cmd run function.
void lr15_cmd_set (lr15_t *ctx, uint8_t *cmd, uint8_t *value)
 LR 15 cmd set function.
void lr15_cmd_get (lr15_t *ctx, uint8_t *cmd)
 LR 15 cmd get function.
void lr15_cmd_param_set (lr15_t *ctx, uint8_t *cmd, uint8_t *param, uint8_t *value)
 LR 15 cmd param set function.
void lr15_cmd_param_get (lr15_t *ctx, uint8_t *cmd, uint8_t *param)
 LR 15 cmd param get function.

Detailed Description

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

◆ lr15_cfg_setup()

void lr15_cfg_setup ( lr15_cfg_t * cfg)

LR 15 configuration object setup function.

This function initializes Click configuration structure to initial values.

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

◆ lr15_cmd_get()

void lr15_cmd_get ( lr15_t * ctx,
uint8_t * cmd )

LR 15 cmd get function.

This function is used to get the value of a given command from the Click module.

Parameters
[in]ctx: Click context object. See lr15_t object definition for detailed explanation.
[in]cmd: Command string, see LR15_CMD_x definitions.
Returns
None.
Note
None.

◆ lr15_cmd_param_get()

void lr15_cmd_param_get ( lr15_t * ctx,
uint8_t * cmd,
uint8_t * param )

LR 15 cmd param get function.

This function is used to get the value of a given command parameter from the Click module.

Parameters
[in]ctx: Click context object. See lr15_t object definition for detailed explanation.
[in]cmd: Command string, see LR15_CMD_x definitions.
[in]param: Parameter string, see LR15_PARAM_x definitions.
Returns
None.
Note
None.

◆ lr15_cmd_param_set()

void lr15_cmd_param_set ( lr15_t * ctx,
uint8_t * cmd,
uint8_t * param,
uint8_t * value )

LR 15 cmd param set function.

This function sets a value to a specified command parameter of the Click module.

Parameters
[in]ctx: Click context object. See lr15_t object definition for detailed explanation.
[in]cmd: Command string, see LR15_CMD_x definitions.
[in]param: Parameter string, see LR15_PARAM_x definitions.
[in]value: Value string.
Returns
None.
Note
None.

◆ lr15_cmd_run()

void lr15_cmd_run ( lr15_t * ctx,
uint8_t * cmd )

LR 15 cmd run function.

This function sends a specified command to the Click module.

Parameters
[in]ctx: Click context object. See lr15_t object definition for detailed explanation.
[in]cmd: Command string, see LR15_CMD_x definitions.
Returns
None.
Note
None.

◆ lr15_cmd_set()

void lr15_cmd_set ( lr15_t * ctx,
uint8_t * cmd,
uint8_t * value )

LR 15 cmd set function.

This function sets a value to a specified command of the Click module.

Parameters
[in]ctx: Click context object. See lr15_t object definition for detailed explanation.
[in]cmd: Command string, see LR15_CMD_x definitions.
[in]value: Value string.
Returns
None.
Note
None.

◆ lr15_generic_read()

err_t lr15_generic_read ( lr15_t * ctx,
uint8_t * data_out,
uint16_t len )

LR 15 data reading function.

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

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

◆ lr15_generic_write()

err_t lr15_generic_write ( lr15_t * ctx,
uint8_t * data_in,
uint16_t len )

LR 15 data writing function.

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

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

◆ lr15_init()

err_t lr15_init ( lr15_t * ctx,
lr15_cfg_t * cfg )

LR 15 initialization function.

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

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

◆ lr15_reset_device()

void lr15_reset_device ( lr15_t * ctx)

LR 15 reset device function.

This function resets the device by toggling the reset pin logic state.

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

◆ lr15_set_boot_pin()

void lr15_set_boot_pin ( lr15_t * ctx,
uint8_t state )

LR 15 set BOOT pin function.

This function sets the boot pin logic state.

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

◆ lr15_set_rst_pin()

void lr15_set_rst_pin ( lr15_t * ctx,
uint8_t state )

LR 15 set RST pin function.

This function sets the reset pin logic state.

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