|
TuyaOS
|
This is tkl_bluetooth_bredr file 更多...
#include "tuya_cloud_types.h"#include "tuya_error_code.h"
结构体 | |
| struct | TUYA_BT_BREDR_EVENT_T |
类型定义 | |
| typedef VOID(* | TUYA_BT_BREDR_EVT_FUNC_CB) (TUYA_BT_BREDR_EVENT_T *p_event) |
函数 | |
| OPERATE_RET | tkl_bt_bredr_control (TUYA_BT_BREDR_CONTROL_E crtl_event, UCHAR_T *user_data, USHORT_T data_len) |
| Control the audio or phone, please refer to @TUYA_BT_BREDR_CONTROL_E. 更多... | |
| OPERATE_RET | tkl_bt_bredr_deinit (TUYA_BT_BREDR_ROLE_E role) |
| De-Init the Bluetooth BR-EDR Interface. 更多... | |
| OPERATE_RET | tkl_bt_bredr_enable (TUYA_BT_SCAN_MODE_E mode) |
| Enable the Bluetooth BR-EDR Interface. 更多... | |
| OPERATE_RET | tkl_bt_bredr_equalizer_set (UCHAR_T eq_mode, UCHAR_T *eq_data, USHORT_T eq_data_len) |
| Control the bredr eq 更多... | |
| OPERATE_RET | tkl_bt_bredr_equalizer_switch (UCHAR_T eq_mode, BOOL_T enable) |
| Swicth the bredr eq mode 更多... | |
| OPERATE_RET | tkl_bt_bredr_init (TUYA_BT_BREDR_ROLE_E role, TUYA_BT_BREDR_EVT_FUNC_CB p_event, VOID_T *user_data) |
| Init the Bluetooth BR-EDR Interface. 更多... | |
| OPERATE_RET | tkl_bt_bredr_inquiry_enable (BOOL_T enable) |
| Enable the Bluetooth BR-EDR Interface. 更多... | |
| OPERATE_RET | tkl_bt_bredr_noise_set (UCHAR_T noise_mode, USHORT_T noise_data) |
| Control the bredr noise 更多... | |
| OPERATE_RET | tkl_bt_bredr_noise_switch (UCHAR_T noise_mode, BOOL_T enable) |
| Swicth the bredr noise mode 更多... | |
| OPERATE_RET | tkl_bt_bredr_page_enable (BOOL_T enable, TUYA_BT_GAP_ADDR_T *p_peer_addr) |
| Enable the Bluetooth BR-EDR Interface. 更多... | |
| OPERATE_RET | tkl_bt_bredr_pair_set (TUYA_BT_PAIR_INIT_PARAM_T pair) |
| Set the Bluetooth BR-EDR pair mode Interface. 更多... | |
| OPERATE_RET | tkl_bt_bredr_reset (TUYA_BT_BREDR_ROLE_E role) |
| Reset the Bluetooth BR-EDR Interface. 更多... | |
| OPERATE_RET | tkl_bt_gap_address_get (TUYA_BT_GAP_ADDR_T *p_peer_addr) |
| Get the BT Address 更多... | |
| OPERATE_RET | tkl_bt_gap_address_set (TUYA_BT_GAP_ADDR_T CONST *p_peer_addr) |
| Set the BT Address 更多... | |
| OPERATE_RET | tkl_bt_gap_disconnect (TUYA_BT_PAIR_BOND_INFO_T *bond_info) |
| disconnect the link. 更多... | |
| OPERATE_RET | tkl_bt_gap_name_get (CHAR_T *name) |
| Get the BT GAP Name 更多... | |
| OPERATE_RET | tkl_bt_gap_name_set (CHAR_T *name) |
| Set the BT GAP Name 更多... | |
| OPERATE_RET | tkl_bt_gap_paring_delete (TUYA_BT_PAIR_BOND_INFO_T *bond_info) |
| Delete the pair informations. 更多... | |
| OPERATE_RET | tkl_bt_gap_paring_enable_send (BOOL_T en) |
| Enable or Disable pair when pairing request 更多... | |
| OPERATE_RET | tkl_bt_gap_paring_passkey_send (UINT_T passkey) |
| Send paring passkey when in keyboard mode. 更多... | |
| OPERATE_RET | tkl_bt_gap_paring_request (TUYA_BT_PAIR_DEVICE_T *p_device) |
| Request the pair while in BT-Master Mode. 更多... | |
| BOOL_T | tkl_bt_pairing_status_get (VOID_T) |
| check if device is paired 更多... | |
This is tkl_bluetooth_bredr file
| typedef VOID(* TUYA_BT_BREDR_EVT_FUNC_CB) (TUYA_BT_BREDR_EVENT_T *p_event) |
< Tuya Bluetooth BR-EDR Callback Register function definition
| enum TUYA_BT_BREDR_ROLE_E |
| enum TUYA_BT_PAIR_MODE_E |
| enum TUYA_BT_SCAN_MODE_E |
| OPERATE_RET tkl_bt_bredr_control | ( | TUYA_BT_BREDR_CONTROL_E | crtl_event, |
| UCHAR_T * | user_data, | ||
| USHORT_T | data_len | ||
| ) |
Control the audio or phone, please refer to @TUYA_BT_BREDR_CONTROL_E.
| [in] | crtl_event | control operations. [in] user_data: post the user-data for audio-control. [in] data_len: post the user-data length for audio-control. |
| OPERATE_RET tkl_bt_bredr_deinit | ( | TUYA_BT_BREDR_ROLE_E | role | ) |
De-Init the Bluetooth BR-EDR Interface.
| [in] | role | De-init the bt bredr role; |
| OPERATE_RET tkl_bt_bredr_enable | ( | TUYA_BT_SCAN_MODE_E | mode | ) |
Enable the Bluetooth BR-EDR Interface.
| [in] | mode | see TUYA_BT_SCAN_MODE_E |
| OPERATE_RET tkl_bt_bredr_equalizer_set | ( | UCHAR_T | eq_mode, |
| UCHAR_T * | eq_data, | ||
| USHORT_T | eq_data_len | ||
| ) |
Control the bredr eq
| [in] | eq_mode | control equalizer mode. [in] eq_data: post the eq-data for eq. [in] eq_data_len: post the eq-data length for eq. |
| OPERATE_RET tkl_bt_bredr_equalizer_switch | ( | UCHAR_T | eq_mode, |
| BOOL_T | enable | ||
| ) |
Swicth the bredr eq mode
| [in] | eq_mode | Switch equalizer mode. [in] enable: Enable the current mode or not |
| OPERATE_RET tkl_bt_bredr_init | ( | TUYA_BT_BREDR_ROLE_E | role, |
| TUYA_BT_BREDR_EVT_FUNC_CB | p_event, | ||
| VOID_T * | user_data | ||
| ) |
Init the Bluetooth BR-EDR Interface.
| [in] | role | Init the bt bredr role; [in] p_event: register callback; [in] user_data: Init the user data; |
| OPERATE_RET tkl_bt_bredr_inquiry_enable | ( | BOOL_T | enable | ) |
Enable the Bluetooth BR-EDR Interface.
| [in] | enable | TRUE: Enable the bluetooth bredr inquiry. FALSE: Disable the bluetooth bredr inquiry. |
| OPERATE_RET tkl_bt_bredr_noise_set | ( | UCHAR_T | noise_mode, |
| USHORT_T | noise_data | ||
| ) |
Control the bredr noise
| [in] | noise_mode | control noise mode. [in] noise_data: post the noise data. |
| OPERATE_RET tkl_bt_bredr_noise_switch | ( | UCHAR_T | noise_mode, |
| BOOL_T | enable | ||
| ) |
Swicth the bredr noise mode
| [in] | noise_mode | Switch noise mode. [in] enable: Enable the current mode or not |
| OPERATE_RET tkl_bt_bredr_page_enable | ( | BOOL_T | enable, |
| TUYA_BT_GAP_ADDR_T * | p_peer_addr | ||
| ) |
Enable the Bluetooth BR-EDR Interface.
| [in] | enable | TRUE: Enable the bluetooth bredr page. FALSE: Disable the bluetooth bredr page. [in] peer_addr: peer address for device which should be paging. if is NULL, will page the last device |
| OPERATE_RET tkl_bt_bredr_pair_set | ( | TUYA_BT_PAIR_INIT_PARAM_T | pair | ) |
Set the Bluetooth BR-EDR pair mode Interface.
| [in] | pair | Bluetooth BR-EDR pair mode; [in] user_data: Init the user data; |
| OPERATE_RET tkl_bt_bredr_reset | ( | TUYA_BT_BREDR_ROLE_E | role | ) |
Reset the Bluetooth BR-EDR Interface.
| [in] | role | Reset the bt bredr role; |
| OPERATE_RET tkl_bt_gap_address_get | ( | TUYA_BT_GAP_ADDR_T * | p_peer_addr | ) |
Get the BT Address
| [out] | p_peer_addr | get peer address for BT; |
| OPERATE_RET tkl_bt_gap_address_set | ( | TUYA_BT_GAP_ADDR_T CONST * | p_peer_addr | ) |
Set the BT Address
| [in] | p_peer_addr | set peer address for BT; |
| OPERATE_RET tkl_bt_gap_disconnect | ( | TUYA_BT_PAIR_BOND_INFO_T * | bond_info | ) |
disconnect the link.
| [in] | bond_info | disconnect the bond info. |
| OPERATE_RET tkl_bt_gap_name_get | ( | CHAR_T * | name | ) |
Get the BT GAP Name
| [in] | p_peer_addr | get local bluetooth gap name for BT; |
| OPERATE_RET tkl_bt_gap_name_set | ( | CHAR_T * | name | ) |
Set the BT GAP Name
| [in] | p_peer_addr | set local bluetooth gap name for BT; |
| OPERATE_RET tkl_bt_gap_paring_delete | ( | TUYA_BT_PAIR_BOND_INFO_T * | bond_info | ) |
Delete the pair informations.
| [in] | bond_info | delete the bond info. |
| OPERATE_RET tkl_bt_gap_paring_enable_send | ( | BOOL_T | en | ) |
Enable or Disable pair when pairing request
| [in] | en | TRUE for enable and FALSE for disable pair |
| OPERATE_RET tkl_bt_gap_paring_passkey_send | ( | UINT_T | passkey | ) |
Send paring passkey when in keyboard mode.
| [in] | passkey | eg: 0x0001E240 means the passkey is 123456 |
| OPERATE_RET tkl_bt_gap_paring_request | ( | TUYA_BT_PAIR_DEVICE_T * | p_device | ) |
Request the pair while in BT-Master Mode.
| [in] | mode | request security pairing mode for BT; [in] bond_info: post the major information for pairing. |
| BOOL_T tkl_bt_pairing_status_get | ( | VOID_T | ) |
check if device is paired
| [in] | NULL |