lyra24p
2.1.0.0
|
API for configuring and manipulating LYRA 24P Click driver. More...
Modules | |
LYRA 24P Device Settings | |
Settings for registers of LYRA 24P Click driver. | |
LYRA 24P MikroBUS Map | |
MikroBUS pin mapping of LYRA 24P Click driver. | |
Functions | |
void | lyra24p_cfg_setup (lyra24p_cfg_t *cfg) |
LYRA 24P configuration object setup function. More... | |
err_t | lyra24p_init (lyra24p_t *ctx, lyra24p_cfg_t *cfg) |
LYRA 24P initialization function. More... | |
void | lyra24p_hw_reset (lyra24p_t *ctx) |
LYRA 24P HW reset function. More... | |
void | lyra24p_set_bt_pin (lyra24p_t *ctx, uint8_t state) |
LYRA 24P set BT pin state function. More... | |
void | lyra24p_request_to_send (lyra24p_t *ctx, uint8_t state) |
LYRA 24P set request to send pin state function. More... | |
uint8_t | lyra24p_clear_to_send (lyra24p_t *ctx) |
LYRA 24P get clear to send pin state function. More... | |
err_t | lyra24p_generic_write (lyra24p_t *ctx, uint8_t *data_in, uint16_t len) |
LYRA 24P data writing function. More... | |
err_t | lyra24p_generic_read (lyra24p_t *ctx, uint8_t *data_out, uint16_t len) |
LYRA 24P data reading function. More... | |
err_t | lyra24p_write_command (lyra24p_t *ctx, uint8_t *command) |
LYRA 24P command writing function. More... | |
err_t | lyra24p_write_cmd_param (lyra24p_t *ctx, uint8_t *command, uint8_t *cmd_val, uint8_t *prefix, uint8_t *param) |
LYRA 24P command - command value - prefix - parameter writing function. More... | |
err_t | lyra24p_set_device_name (lyra24p_t *ctx, uint8_t *device_name) |
LYRA 24P set device name function. More... | |
err_t | lyra24p_inquire_command (lyra24p_t *ctx, uint8_t *command, uint8_t *cmd_val, uint8_t en_query) |
LYRA 24P inquire command function. More... | |
API for configuring and manipulating LYRA 24P Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void lyra24p_cfg_setup | ( | lyra24p_cfg_t * | cfg | ) |
LYRA 24P configuration object setup function.
This function initializes Click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See lyra24p_cfg_t object definition for detailed explanation. |
uint8_t lyra24p_clear_to_send | ( | lyra24p_t * | ctx | ) |
LYRA 24P get clear to send pin state function.
This function return logic state of the CTS pin.
[in] | ctx | : Click context object. See lyra24p_t object definition for detailed explanation. |
err_t lyra24p_generic_read | ( | lyra24p_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len | ||
) |
LYRA 24P data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See lyra24p_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 lyra24p_generic_write | ( | lyra24p_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len | ||
) |
LYRA 24P data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See lyra24p_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 lyra24p_hw_reset | ( | lyra24p_t * | ctx | ) |
LYRA 24P HW reset function.
This function performs a hardware reset of the device.
[in] | ctx | : Click context object. See lyra24p_t object definition for detailed explanation. |
err_t lyra24p_init | ( | lyra24p_t * | ctx, |
lyra24p_cfg_t * | cfg | ||
) |
LYRA 24P initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
[out] | ctx | : Click context object. See lyra24p_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See lyra24p_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t lyra24p_inquire_command | ( | lyra24p_t * | ctx, |
uint8_t * | command, | ||
uint8_t * | cmd_val, | ||
uint8_t | en_query | ||
) |
LYRA 24P inquire command function.
This function writes a desired inquire command, command value and enable/disable quote by using UART serial interface.
[in] | ctx | : Click context object. See lyra24p_t object definition for detailed explanation. |
[in] | command | : Command buffer for sending. |
[in] | cmd_val | : Command value buffer for sending. |
[in] | en_query | : Enable query. |
>=0
- Success, <0
- Error See #err_t definition for detailed explanation. void lyra24p_request_to_send | ( | lyra24p_t * | ctx, |
uint8_t | state | ||
) |
LYRA 24P set request to send pin state function.
This function sets a desired logic state of the RTS pin.
[in] | ctx | : Click context object. See lyra24p_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void lyra24p_set_bt_pin | ( | lyra24p_t * | ctx, |
uint8_t | state | ||
) |
LYRA 24P set BT pin state function.
This function sets a desired logic state of the BT pin.
[in] | ctx | : Click context object. See lyra24p_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t lyra24p_set_device_name | ( | lyra24p_t * | ctx, |
uint8_t * | device_name | ||
) |
LYRA 24P set device name function.
This function writes a desired name of the device by using UART serial interface.
[in] | ctx | : Click context object. See lyra24p_t object definition for detailed explanation. |
[in] | device_name | : Device name buffer for sending. |
>=0
- Success, <0
- Error See #err_t definition for detailed explanation. err_t lyra24p_write_cmd_param | ( | lyra24p_t * | ctx, |
uint8_t * | command, | ||
uint8_t * | cmd_val, | ||
uint8_t * | prefix, | ||
uint8_t * | param | ||
) |
LYRA 24P command - command value - prefix - parameter writing function.
This function writes a desired command, command value, prefix and parameter by using UART serial interface.
[in] | ctx | : Click context object. See lyra24p_t object definition for detailed explanation. |
[in] | command | : Command buffer for sending. |
[in] | cmd_val | : Command value buffer for sending. |
[in] | prefix | : Prefix buffer for sending. |
[in] | param | : Parameter buffer for sending. |
>=0
- Success, <0
- Error See #err_t definition for detailed explanation. err_t lyra24p_write_command | ( | lyra24p_t * | ctx, |
uint8_t * | command | ||
) |
LYRA 24P command writing function.
This function writes a desired command by using UART serial interface.
[in] | ctx | : Click context object. See lyra24p_t object definition for detailed explanation. |
[in] | command | : Command buffer for sending. |
>=0
- Success, <0
- Error See #err_t definition for detailed explanation.