lr14
2.1.0.0
|
API for configuring and manipulating LR 14 Click driver. More...
Modules | |
LR 14 Device Settings | |
Settings for registers of LR 14 Click driver. | |
LR 14 MikroBUS Map | |
MikroBUS pin mapping of LR 14 Click driver. | |
Functions | |
void | lr14_cfg_setup (lr14_cfg_t *cfg) |
LR 14 configuration object setup function. More... | |
err_t | lr14_init (lr14_t *ctx, lr14_cfg_t *cfg) |
LR 14 initialization function. More... | |
err_t | lr14_generic_write (lr14_t *ctx, uint8_t *data_in, uint16_t len) |
LR 14 data writing function. More... | |
err_t | lr14_generic_read (lr14_t *ctx, uint8_t *data_out, uint16_t len) |
LR 14 data reading function. More... | |
void | lr14_set_rst_pin (lr14_t *ctx, uint8_t state) |
LR 14 set RST pin function. More... | |
void | lr14_reset_device (lr14_t *ctx) |
LR 14 reset device function. More... | |
void | lr14_cmd_run (lr14_t *ctx, uint8_t *cmd) |
LR 14 cmd run function. More... | |
void | lr14_cmd_set (lr14_t *ctx, uint8_t *cmd, uint8_t *value) |
LR 14 cmd set function. More... | |
void | lr14_cmd_get (lr14_t *ctx, uint8_t *cmd) |
LR 14 cmd get function. More... | |
void | lr14_cmd_help (lr14_t *ctx, uint8_t *cmd) |
LR 14 cmd help function. More... | |
API for configuring and manipulating LR 14 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void lr14_cfg_setup | ( | lr14_cfg_t * | cfg | ) |
LR 14 configuration object setup function.
This function initializes Click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See lr14_cfg_t object definition for detailed explanation. |
void lr14_cmd_get | ( | lr14_t * | ctx, |
uint8_t * | cmd | ||
) |
LR 14 cmd get function.
This function is used to get the value of a given command from the Click module.
[in] | ctx | : Click context object. See lr14_t object definition for detailed explanation. |
[in] | cmd | : Command string. |
void lr14_cmd_help | ( | lr14_t * | ctx, |
uint8_t * | cmd | ||
) |
LR 14 cmd help function.
This function provides a short description of the given command of the Click module.
[in] | ctx | : Click context object. See lr14_t object definition for detailed explanation. |
[in] | cmd | : Command string. |
void lr14_cmd_run | ( | lr14_t * | ctx, |
uint8_t * | cmd | ||
) |
LR 14 cmd run function.
This function sends a specified command to the Click module.
[in] | ctx | : Click context object. See lr14_t object definition for detailed explanation. |
[in] | cmd | : Command string. |
void lr14_cmd_set | ( | lr14_t * | ctx, |
uint8_t * | cmd, | ||
uint8_t * | value | ||
) |
LR 14 cmd set function.
This function sets a value to a specified command of the Click module.
[in] | ctx | : Click context object. See lr14_t object definition for detailed explanation. |
[in] | cmd | : Command string. |
[in] | value | : Value string. |
err_t lr14_generic_read | ( | lr14_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len | ||
) |
LR 14 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See lr14_t object definition for detailed explanation. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. err_t lr14_generic_write | ( | lr14_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len | ||
) |
LR 14 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See lr14_t object definition for detailed explanation. |
[in] | data_in | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation. err_t lr14_init | ( | lr14_t * | ctx, |
lr14_cfg_t * | cfg | ||
) |
LR 14 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
[out] | ctx | : Click context object. See lr14_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See lr14_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void lr14_reset_device | ( | lr14_t * | ctx | ) |
LR 14 reset device function.
This function resets the device by toggling the reset pin logic state.
[in] | ctx | : Click context object. See lr14_t object definition for detailed explanation. |