dotstack API Reference
1.10.37
|
Functions | |
void | btx_csr_init (void) |
Initialize CSR support layer. More... | |
void | btx_csr_autobaud (btx_csr_autobaud_buffer_t *buffer, btx_csr_autobaud_callback_fp callback, void *callback_param) |
Configure controller's UART speed. More... | |
void | btx_csr_bc7_sel_host_interface_h4 (btx_csr_autobaud_buffer_t *buffer, bt_byte interval, btx_csr_autobaud_callback_fp callback, void *callback_param) |
Configure controller's UART speed and host interface. More... | |
void | btx_csr_exec_script (const btx_csr_script_t *script, btx_csr_exec_script_buffer_t *buffer, btx_csr_exec_script_callback_fp callback, void *callback_param) |
Patch controller's firmware. More... | |
void | btx_csr_set_ps_vars (const bt_uint *ps_vars, btx_csr_set_ps_vars_buffer_t *buffer, btx_csr_set_ps_vars_callback_fp callback, void *callback_param) |
Write PS variables. More... | |
void | btx_csr_set_ps_vars_ex (const bt_uint *ps_vars, btx_csr_set_ps_vars_buffer_t *buffer, bt_uint store, btx_csr_set_ps_vars_callback_fp callback, void *callback_param) |
Write PS variables. More... | |
bt_bool | btx_csr_warm_reset (void) |
Warm reset. More... | |
bt_bool | btx_csr_warm_reset_ex (bt_hci_cmd_callback_fp callback, void *callback_param) |
Warm reset. More... | |
bt_bool | btx_csr_enable_tx (bt_bool enable, bt_hci_cmd_callback_fp callback, void *callback_param) |
Enable/disable transmitter. More... | |
bt_bool | btx_csr_get_cached_temperature (btx_csr_get_var_callback_fp callback, void *callback_param) |
Get chip's cached temperature. More... | |
bt_bool | btx_csr_get_rssi_acl (bt_hci_hconn_t hconn, btx_csr_get_var_callback_fp callback, void *callback_param) |
Get RSSI. More... | |
void | btx_csr_patch_controller (const btx_csr_get_script_fp *scripts, bt_int script_count, btx_csr_exec_script_buffer_t *buffer, btx_csr_exec_script_callback_fp callback, void *callback_param) |
Patch controller's firmware. More... | |
const btx_csr_script_t * | btx_csr_get_script__PB_27_R20_BC6ROM_A04 (void) |
Return script for patching BlueCore 6. | |
const btx_csr_script_t * | btx_csr_get_script__PB_90_REV6 (void) |
Return script for patching CSR8810 (BlueCore 7) | |
const btx_csr_script_t * | btx_csr_get_script__PB_101_CSR8811_CSP28_UART (void) |
Return script for patching CSR8x11 A06 (BlueCore 7) | |
const btx_csr_script_t * | btx_csr_get_script__PB_109_CSR8811_REV16 (void) |
Return script for patching CSR8x11 A08 (BlueCore 7) | |
const btx_csr_script_t * | btx_csr_get_script__dsp_script__PB_109_DSP_rev8 (void) |
Return script for patching DSP in CSR8x11 A08 (BlueCore 7) | |
const btx_csr_script_t * | btx_csr_get_script__PB_173_CSR8X11_REV1 (void) |
Return script for patching CSR8x11 A12 (BlueCore 7) | |
const btx_csr_script_t * | btx_csr_get_script__PB_207_CSR8X11_REV4 (void) |
Return script for patching CSR8x11 A12 (BlueCore 7)the latest version. | |
const btx_csr_script_t * | btx_csr_get_script__PB_207_CSR8X11_REV8 (void) |
Return script for patching CSR8x11 A12 (BlueCore 7)the latest version. | |
void btx_csr_autobaud | ( | btx_csr_autobaud_buffer_t * | buffer, |
btx_csr_autobaud_callback_fp | callback, | ||
void * | callback_param | ||
) |
Configure controller's UART speed.
This function makes the controller auto-configure its UART speed. The host transport must be set to H4. This function works only with BC6 controllers.
void btx_csr_bc7_sel_host_interface_h4 | ( | btx_csr_autobaud_buffer_t * | buffer, |
bt_byte | interval, | ||
btx_csr_autobaud_callback_fp | callback, | ||
void * | callback_param | ||
) |
Configure controller's UART speed and host interface.
This function makes the controller auto-configure its UART speed and select H4 as host interface. PS_KEY_HOST_INTERFACE must not be set. PS_KEY_UART_BITRATE must be set to 0. This function works only with BC7 controllers.
bt_bool btx_csr_enable_tx | ( | bt_bool | enable, |
bt_hci_cmd_callback_fp | callback, | ||
void * | callback_param | ||
) |
Enable/disable transmitter.
enable | Specifies whether the transmitter should be enable or disabled. |
callback | The callback function that will be called after the command has completed. |
callback_param | A pointer to arbitrary data to be passed to the callback callback. |
void btx_csr_exec_script | ( | const btx_csr_script_t * | script, |
btx_csr_exec_script_buffer_t * | buffer, | ||
btx_csr_exec_script_callback_fp | callback, | ||
void * | callback_param | ||
) |
Patch controller's firmware.
This function executes a script that patches the controller's firmware. The script
must point to a structure that contain a complete patch script for a particular controller model and revision. If the revision specified in the script and revision read from the controller are the same btx_csr_patch_controller() loads the script to the controller and calls the callback
with the first parameter TRUE. Otherwise the callback
is called with the first parameter FALSE.
If support for multiple firmware revisions is neede use btx_csr_patch_controller().
script | Array of patch scripts. |
buffer | A buffer for storing temporary data needed for script execution. |
callback | The callback function that will be called when the script has been executed. |
callback_param | A pointer to arbitrary data to be passed to the callback callback.. |
bt_bool btx_csr_get_cached_temperature | ( | btx_csr_get_var_callback_fp | callback, |
void * | callback_param | ||
) |
Get chip's cached temperature.
callback | The callback function that will be called after the command has completed. |
callback_param | A pointer to arbitrary data to be passed to the callback callback. |
bt_bool btx_csr_get_rssi_acl | ( | bt_hci_hconn_t | hconn, |
btx_csr_get_var_callback_fp | callback, | ||
void * | callback_param | ||
) |
Get RSSI.
This function retrieves the RSSI for a given HCI ACL handle.
hconn | ACL connection handle. |
callback | The callback function that will be called after the command has completed. |
callback_param | A pointer to arbitrary data to be passed to the callback callback. |
void btx_csr_init | ( | void | ) |
Initialize CSR support layer.
This function initializes all internal variables of the CSR support layer. CSR controllers use vendor specific event (0xFF) to carry the BCCMD protocol. They also do not report number of completed packets for BCCMD commands. This function installs a vendor specific event handler that makes sure that callback are called on corresponding vendor specific commands and the number of free command buffers in the controller is kept correct.
void btx_csr_patch_controller | ( | const btx_csr_get_script_fp * | scripts, |
bt_int | script_count, | ||
btx_csr_exec_script_buffer_t * | buffer, | ||
btx_csr_exec_script_callback_fp | callback, | ||
void * | callback_param | ||
) |
Patch controller's firmware.
This function executes a script that patches the controller's firmware. Each entry of the scripts
array must be a complete patch script for a particular controller model and revision. btx_csr_patch_controller() reads the revision number from the controller then tries to find the corresponding script in the scripts
. If there is a matching script it is loaded to the controller and callback
is called with the first parameter TRUE. If no suitable script found callback
is called with the first parameter FALSE.
scripts | Array of patch scripts. |
script_count | The number of scripts in scripts . |
buffer | A buffer for storing temporary data needed for script execution. |
callback | The callback function that will be called when the script has been executed. |
callback_param | A pointer to arbitrary data to be passed to the callback callback.. |
void btx_csr_set_ps_vars | ( | const bt_uint * | ps_vars, |
btx_csr_set_ps_vars_buffer_t * | buffer, | ||
btx_csr_set_ps_vars_callback_fp | callback, | ||
void * | callback_param | ||
) |
Write PS variables.
ps_vars | PS values |
buffer | A buffer for storing temporary data during function execution. |
callback | The callback function that will be called when all PS values have been sent to the controller or error occurred. |
callback_param | A pointer to arbitrary data to be passed to the callback callback.. |
void btx_csr_set_ps_vars_ex | ( | const bt_uint * | ps_vars, |
btx_csr_set_ps_vars_buffer_t * | buffer, | ||
bt_uint | store, | ||
btx_csr_set_ps_vars_callback_fp | callback, | ||
void * | callback_param | ||
) |
Write PS variables.
ps_vars | PS values |
buffer | A buffer for storing temporary data during function execution. |
store | |
callback | The callback function that will be called when all PS values have been sent to the controller or error occurred. |
callback_param | A pointer to arbitrary data to be passed to the callback callback.. |
bt_bool btx_csr_warm_reset | ( | void | ) |
Warm reset.
This function performs warm reset of the controller. All patches and configuration parameters sent to the controller before warm reset are kept intact.
bt_bool btx_csr_warm_reset_ex | ( | bt_hci_cmd_callback_fp | callback, |
void * | callback_param | ||
) |
Warm reset.
This function performs warm reset of the controller. All patches and configuration parameters sent to the controller before warm reset are kept intact. Since the controller does not respond to the warm reset command as it starts resetting immediately upon receiving the command, the callback
is called right after the command packet has been transmitted to the controller.
callback | The callback function that will be called after the warm reset command has been sent to the controller. |
callback_param | A pointer to arbitrary data to be passed to the callback callback. |