|
btaudio4 2.2.0
|
API for configuring and manipulating BT Audio 4 Click driver. More...
Topics | |
| BT Audio 4 Device Settings | |
| Settings for registers of BT Audio 4 Click driver. | |
| BT Audio 4 MikroBUS Map | |
| MikroBUS pin mapping of BT Audio 4 Click driver. | |
Functions | |
| void | btaudio4_cfg_setup (btaudio4_cfg_t *cfg) |
| BT Audio 4 configuration object setup function. | |
| err_t | btaudio4_init (btaudio4_t *ctx, btaudio4_cfg_t *cfg) |
| BT Audio 4 initialization function. | |
| err_t | btaudio4_generic_write (btaudio4_t *ctx, uint8_t *data_in, uint16_t len) |
| BT Audio 4 data writing function. | |
| err_t | btaudio4_generic_read (btaudio4_t *ctx, uint8_t *data_out, uint16_t len) |
| BT Audio 4 data reading function. | |
| void | btaudio4_set_rst_pin (btaudio4_t *ctx, uint8_t state) |
| BT Audio 4 set RST pin function. | |
| void | btaudio4_reset_device (btaudio4_t *ctx) |
| BT Audio 4 reset device function. | |
| void | btaudio4_set_cts_pin (btaudio4_t *ctx, uint8_t state) |
| BT Audio 4 set CTS pin function. | |
| uint8_t | btaudio4_get_rts_pin (btaudio4_t *ctx) |
| BT Audio 4 get RTS pin function. | |
| void | btaudio4_cmd_run (btaudio4_t *ctx, uint8_t *cmd) |
| BT Audio 4 cmd run function. | |
| void | btaudio4_cmd_set (btaudio4_t *ctx, uint8_t *param, uint8_t *value) |
| BT Audio 4 cmd set function. | |
| void | btaudio4_cmd_get (btaudio4_t *ctx, uint8_t *param) |
| BT Audio 4 cmd get function. | |
API for configuring and manipulating BT Audio 4 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void btaudio4_cfg_setup | ( | btaudio4_cfg_t * | cfg | ) |
BT Audio 4 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See btaudio4_cfg_t object definition for detailed explanation. |
| void btaudio4_cmd_get | ( | btaudio4_t * | ctx, |
| uint8_t * | param ) |
BT Audio 4 cmd get function.
This function is used to get the value of a given command parameter from the Click module.
| [in] | ctx | : Click context object. See btaudio4_t object definition for detailed explanation. |
| [in] | param | : Command parameter string, see BTAUDIO4_PARAM_x definitions. |
| void btaudio4_cmd_run | ( | btaudio4_t * | ctx, |
| uint8_t * | cmd ) |
BT Audio 4 cmd run function.
This function sends a specified command to the Click module.
| [in] | ctx | : Click context object. See btaudio4_t object definition for detailed explanation. |
| [in] | cmd | : Command string, see BTAUDIO4_CMD_x definitions. |
| void btaudio4_cmd_set | ( | btaudio4_t * | ctx, |
| uint8_t * | param, | ||
| uint8_t * | value ) |
BT Audio 4 cmd set function.
This function sets a value to a specified command parameter of the Click module.
| [in] | ctx | : Click context object. See btaudio4_t object definition for detailed explanation. |
| [in] | param | : Command parameter string, see BTAUDIO4_PARAM_x definitions. |
| [in] | value | : Value string. |
| err_t btaudio4_generic_read | ( | btaudio4_t * | ctx, |
| uint8_t * | data_out, | ||
| uint16_t | len ) |
BT Audio 4 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
| [in] | ctx | : Click context object. See btaudio4_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 btaudio4_generic_write | ( | btaudio4_t * | ctx, |
| uint8_t * | data_in, | ||
| uint16_t | len ) |
BT Audio 4 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
| [in] | ctx | : Click context object. See btaudio4_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. | uint8_t btaudio4_get_rts_pin | ( | btaudio4_t * | ctx | ) |
BT Audio 4 get RTS pin function.
This function returns the ready to send pin logic state.
| [in] | ctx | : Click context object. See btaudio4_t object definition for detailed explanation. |
| err_t btaudio4_init | ( | btaudio4_t * | ctx, |
| btaudio4_cfg_t * | cfg ) |
BT Audio 4 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See btaudio4_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See btaudio4_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void btaudio4_reset_device | ( | btaudio4_t * | ctx | ) |
BT Audio 4 reset device function.
This function resets the device by toggling the reset pin logic state.
| [in] | ctx | : Click context object. See btaudio4_t object definition for detailed explanation. |
| void btaudio4_set_cts_pin | ( | btaudio4_t * | ctx, |
| uint8_t | state ) |
BT Audio 4 set CTS pin function.
This function sets the clear to send pin logic state.
| [in] | ctx | : Click context object. See btaudio4_t object definition for detailed explanation. |
| [in] | state | : Pin logic state. |
| void btaudio4_set_rst_pin | ( | btaudio4_t * | ctx, |
| uint8_t | state ) |
BT Audio 4 set RST pin function.
This function sets the reset pin logic state.
| [in] | ctx | : Click context object. See btaudio4_t object definition for detailed explanation. |
| [in] | state | : Pin logic state. |