lr9
2.1.0.0
|
API for configuring and manipulating LR 9 Click driver. More...
Modules | |
LR 9 Device Settings | |
Settings for registers of LR 9 Click driver. | |
LR 9 MikroBUS Map | |
MikroBUS pin mapping of LR 9 Click driver. | |
Functions | |
void | lr9_cfg_setup (lr9_cfg_t *cfg) |
LR 9 configuration object setup function. More... | |
err_t | lr9_init (lr9_t *ctx, lr9_cfg_t *cfg) |
LR 9 initialization function. More... | |
void | lr9_hw_reset (lr9_t *ctx) |
LR 9 HW reset function. More... | |
void | lr9_set_boot_pin (lr9_t *ctx, uint8_t state) |
LR 9 set BOOT pin state function. More... | |
err_t | lr9_generic_write (lr9_t *ctx, uint8_t *data_in, uint16_t len) |
LR 9 data writing function. More... | |
err_t | lr9_generic_read (lr9_t *ctx, uint8_t *data_out, uint16_t len) |
LR 9 data reading function. More... | |
err_t | lr9_write_command (lr9_t *ctx, uint8_t *command, uint8_t *param) |
LR 9 command writing function. More... | |
err_t | lr9_inquire_command (lr9_t *ctx, uint8_t *command, lr9_en_set_t en_set) |
LR 9 inquire writing function. More... | |
err_t | lr9_send_data_frame (lr9_t *ctx, uint8_t confirm, uint8_t nbtrials, uint8_t *data_frame) |
LR 9 send data frame function. More... | |
API for configuring and manipulating LR 9 Click driver.
void lr9_cfg_setup | ( | lr9_cfg_t * | cfg | ) |
LR 9 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See lr9_cfg_t object definition for detailed explanation. |
err_t lr9_generic_read | ( | lr9_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len | ||
) |
LR 9 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See lr9_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 lr9_generic_write | ( | lr9_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len | ||
) |
LR 9 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See lr9_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. void lr9_hw_reset | ( | lr9_t * | ctx | ) |
LR 9 HW reset function.
This function performs a hardware reset of the device.
[in] | ctx | : Click context object. See lr9_t object definition for detailed explanation. |
LR 9 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See lr9_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See lr9_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t lr9_inquire_command | ( | lr9_t * | ctx, |
uint8_t * | command, | ||
lr9_en_set_t | en_set | ||
) |
LR 9 inquire writing function.
Using the UART serial interface, this function writes the desired query command with or without the included equals symbol.
[in] | ctx | : Click context object. See lr9_t object definition for detailed explanation. |
[in] | command | : Command buffer for sending. |
[in] | param | : Parameter buffer for sending. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation. err_t lr9_send_data_frame | ( | lr9_t * | ctx, |
uint8_t | confirm, | ||
uint8_t | nbtrials, | ||
uint8_t * | data_frame | ||
) |
LR 9 send data frame function.
This function sends the desired data frame by using the UART serial interface.
[in] | ctx | : Click context object. See lr9_t object definition for detailed explanation. |
[in] | command | : Command buffer for sending. |
[in] | param | : Parameter buffer for sending. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation. void lr9_set_boot_pin | ( | lr9_t * | ctx, |
uint8_t | state | ||
) |
LR 9 set BOOT pin state function.
This function sets a desired logic state of the BT pin.
[in] | ctx | : Click context object. See lr9_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t lr9_write_command | ( | lr9_t * | ctx, |
uint8_t * | command, | ||
uint8_t * | param | ||
) |
LR 9 command writing function.
This function writes a desired command and parameter by using UART serial interface.
[in] | ctx | : Click context object. See lr9_t object definition for detailed explanation. |
[in] | command | : Command buffer for sending. |
[in] | param | : Parameter buffer for sending. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation.