lr11868mhz  2.1.0.0
Modules | Functions
LR 11 868MHz Click Driver

API for configuring and manipulating LR 11 868MHz Click driver. More...

Modules

 LR 11 868MHz Device Settings
 Settings for registers of LR 11 868MHz Click driver.
 
 LR 11 868MHz MikroBUS Map
 MikroBUS pin mapping of LR 11 868MHz Click driver.
 

Functions

void lr11868mhz_cfg_setup (lr11868mhz_cfg_t *cfg)
 LR 11 868MHz configuration object setup function. More...
 
err_t lr11868mhz_init (lr11868mhz_t *ctx, lr11868mhz_cfg_t *cfg)
 LR 11 868MHz initialization function. More...
 
err_t lr11868mhz_generic_write (lr11868mhz_t *ctx, uint8_t *data_in, uint16_t len)
 LR 11 868MHz data writing function. More...
 
err_t lr11868mhz_generic_read (lr11868mhz_t *ctx, uint8_t *data_out, uint16_t len)
 LR 11 868MHz data reading function. More...
 
void lr11868mhz_set_rst_pin (lr11868mhz_t *ctx, uint8_t state)
 LR 11 868MHz set RST pin function. More...
 
void lr11868mhz_reset_device (lr11868mhz_t *ctx)
 LR 11 868MHz reset device function. More...
 
void lr11868mhz_set_cts_pin (lr11868mhz_t *ctx, uint8_t state)
 LR 11 868MHz set CTS pin function. More...
 
uint8_t lr11868mhz_get_rts_pin (lr11868mhz_t *ctx)
 LR 11 868MHz get RTS pin function. More...
 
void lr11868mhz_cmd_run (lr11868mhz_t *ctx, uint8_t *cmd, uint8_t *param)
 LR 11 868MHz cmd run function. More...
 
void lr11868mhz_cmd_set (lr11868mhz_t *ctx, uint8_t *cmd, uint8_t *param_id, uint8_t *value)
 LR 11 868MHz cmd set function. More...
 
void lr11868mhz_cmd_get (lr11868mhz_t *ctx, uint8_t *cmd, uint8_t *param_id)
 LR 11 868MHz cmd get function. More...
 
void lr11868mhz_cmd_help (lr11868mhz_t *ctx, uint8_t *cmd, uint8_t *param_id)
 LR 11 868MHz cmd help function. More...
 

Detailed Description

API for configuring and manipulating LR 11 868MHz 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

◆ lr11868mhz_cfg_setup()

void lr11868mhz_cfg_setup ( lr11868mhz_cfg_t cfg)

LR 11 868MHz configuration object setup function.

This function initializes Click configuration structure to initial values.

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

◆ lr11868mhz_cmd_get()

void lr11868mhz_cmd_get ( lr11868mhz_t ctx,
uint8_t *  cmd,
uint8_t *  param_id 
)

LR 11 868MHz cmd 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 lr11868mhz_t object definition for detailed explanation.
[in]cmd: Command string.
[in]param_id: Command parameter ID string.
Returns
None.
Note
Used only for LR11868MHZ_PARAM_ACCESS_x commands.

◆ lr11868mhz_cmd_help()

void lr11868mhz_cmd_help ( lr11868mhz_t ctx,
uint8_t *  cmd,
uint8_t *  param_id 
)

LR 11 868MHz cmd help function.

This function provides a short description of the given command parameter of the Click module.

Parameters
[in]ctx: Click context object. See lr11868mhz_t object definition for detailed explanation.
[in]cmd: Command string.
[in]param_id: Command parameter ID string.
Returns
None.
Note
Used only for LR11868MHZ_PARAM_ACCESS_x commands.

◆ lr11868mhz_cmd_run()

void lr11868mhz_cmd_run ( lr11868mhz_t ctx,
uint8_t *  cmd,
uint8_t *  param 
)

LR 11 868MHz cmd run function.

This function sends a specified command with or without parameters to the Click module.

Parameters
[in]ctx: Click context object. See lr11868mhz_t object definition for detailed explanation.
[in]cmd: Command string.
[in]param: Parameters string (NULL - if the command doesn't need parameters).
Returns
None.
Note
None.

◆ lr11868mhz_cmd_set()

void lr11868mhz_cmd_set ( lr11868mhz_t ctx,
uint8_t *  cmd,
uint8_t *  param_id,
uint8_t *  value 
)

LR 11 868MHz cmd set function.

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

Parameters
[in]ctx: Click context object. See lr11868mhz_t object definition for detailed explanation.
[in]cmd: Command string.
[in]param_id: Command parameter ID string.
[in]value: Value string.
Returns
None.
Note
Used only for LR11868MHZ_PARAM_ACCESS_x commands.

◆ lr11868mhz_generic_read()

err_t lr11868mhz_generic_read ( lr11868mhz_t ctx,
uint8_t *  data_out,
uint16_t  len 
)

LR 11 868MHz data reading function.

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

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

◆ lr11868mhz_generic_write()

err_t lr11868mhz_generic_write ( lr11868mhz_t ctx,
uint8_t *  data_in,
uint16_t  len 
)

LR 11 868MHz data writing function.

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

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

◆ lr11868mhz_get_rts_pin()

uint8_t lr11868mhz_get_rts_pin ( lr11868mhz_t ctx)

LR 11 868MHz get RTS pin function.

This function returns the ready to send pin logic state.

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

◆ lr11868mhz_init()

err_t lr11868mhz_init ( lr11868mhz_t ctx,
lr11868mhz_cfg_t cfg 
)

LR 11 868MHz initialization function.

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

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

◆ lr11868mhz_reset_device()

void lr11868mhz_reset_device ( lr11868mhz_t ctx)

LR 11 868MHz reset device function.

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

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

◆ lr11868mhz_set_cts_pin()

void lr11868mhz_set_cts_pin ( lr11868mhz_t ctx,
uint8_t  state 
)

LR 11 868MHz set CTS pin function.

This function sets the clear to send pin logic state.

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

◆ lr11868mhz_set_rst_pin()

void lr11868mhz_set_rst_pin ( lr11868mhz_t ctx,
uint8_t  state 
)

LR 11 868MHz set RST pin function.

This function sets the reset pin logic state.

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