11#ifndef __TKL_BLUETOOTH_BREDR_H__
12#define __TKL_BLUETOOTH_BREDR_H__
14#include "tuya_cloud_types.h"
15#include "tuya_error_code.h"
154 TUYA_BT_PAIR_REQUEST_PRESSKEY,
178 UCHAR_T link_key[16];
Definition: tkl_bluetooth_bredr.h:224
TUYA_BT_BREDR_PHONE_T phone
Definition: tkl_bluetooth_bredr.h:235
TUYA_BT_PAIR_BOND_EVT_T pair
Definition: tkl_bluetooth_bredr.h:229
TUYA_BT_PAIR_INQUIRY_EVT_T device
Definition: tkl_bluetooth_bredr.h:230
TUYA_BT_BREDR_STEAM_T audio
Definition: tkl_bluetooth_bredr.h:234
TUYA_BT_PAIR_BOND_INFO_T bond
Definition: tkl_bluetooth_bredr.h:232
TUYA_BT_DISCONNECT_EVT_T disconnect
Definition: tkl_bluetooth_bredr.h:231
TUYA_BT_BREDR_EVENT_TYPE_E type
Definition: tkl_bluetooth_bredr.h:225
INT_T result
Definition: tkl_bluetooth_bredr.h:226
Definition: tkl_bluetooth_bredr.h:218
VOID_T * user_data
Definition: tkl_bluetooth_bredr.h:221
TUYA_BT_BREDR_PHONE_STATUS_E status
Definition: tkl_bluetooth_bredr.h:219
UINT8_T user_data_len
Definition: tkl_bluetooth_bredr.h:220
Definition: tkl_bluetooth_bredr.h:210
TUYA_BT_BREDR_STEAM_STATUS_E status
Definition: tkl_bluetooth_bredr.h:211
VOID_T * p_connection
Definition: tkl_bluetooth_bredr.h:214
VOID_T * p_endpoint
Definition: tkl_bluetooth_bredr.h:213
VOID_T * user_data
Definition: tkl_bluetooth_bredr.h:215
Definition: tkl_bluetooth_bredr.h:190
TUYA_BT_GAP_ADDR_T addr
Definition: tkl_bluetooth_bredr.h:191
UINT_T reason
Definition: tkl_bluetooth_bredr.h:192
Definition: tkl_bluetooth_bredr.h:161
UCHAR_T type
Definition: tkl_bluetooth_bredr.h:162
Definition: tkl_bluetooth_bredr.h:196
TUYA_BT_PAIR_REQUEST_T req
Definition: tkl_bluetooth_bredr.h:197
UINT_T passkey
Definition: tkl_bluetooth_bredr.h:198
Definition: tkl_bluetooth_bredr.h:176
TUYA_BT_GAP_ADDR_T addr
Definition: tkl_bluetooth_bredr.h:177
Definition: tkl_bluetooth_bredr.h:183
TUYA_BT_GAP_ADDR_T addr
Definition: tkl_bluetooth_bredr.h:184
UINT_T passkey
Definition: tkl_bluetooth_bredr.h:185
Definition: tkl_bluetooth_bredr.h:166
BOOL_T ble_secure_conn
Definition: tkl_bluetooth_bredr.h:172
TUYA_BT_PAIR_IO_CAP_E io_cap
Definition: tkl_bluetooth_bredr.h:168
UINT_T passkey
Definition: tkl_bluetooth_bredr.h:173
UCHAR_T mitm
Definition: tkl_bluetooth_bredr.h:171
TUYA_BT_PAIR_MODE_E mode
Definition: tkl_bluetooth_bredr.h:167
Definition: tkl_bluetooth_bredr.h:202
UCHAR_T * name
Definition: tkl_bluetooth_bredr.h:204
TUYA_BT_GAP_ADDR_T addr
Definition: tkl_bluetooth_bredr.h:203
TUYA_BT_PAIR_MODE_E
Definition: tkl_bluetooth_bredr.h:137
@ TUYA_BT_PAIR_MODE_INITIATE
Definition: tkl_bluetooth_bredr.h:140
@ TUYA_BT_PAIR_MODE_WAIT_FOR_REQ
Definition: tkl_bluetooth_bredr.h:139
@ TUYA_BT_PAIR_MODE_NO_PAIRING
Definition: tkl_bluetooth_bredr.h:138
OPERATE_RET tkl_bt_gap_paring_enable_send(BOOL_T en)
Enable or Disable pair when pairing request
TUYA_BT_PAIR_REQUEST_T
Definition: tkl_bluetooth_bredr.h:151
@ TUYA_BT_PAIR_REQUEST_CONFIRMATION
Definition: tkl_bluetooth_bredr.h:152
@ TUYA_BT_PAIR_REQUEST_PASSKEY
Definition: tkl_bluetooth_bredr.h:153
@ TUYA_BT_PAIR_REQUEST_PIN
Definition: tkl_bluetooth_bredr.h:155
OPERATE_RET tkl_bt_bredr_equalizer_switch(UCHAR_T eq_mode, BOOL_T enable)
Swicth the bredr eq mode
OPERATE_RET tkl_bt_gap_disconnect(TUYA_BT_PAIR_BOND_INFO_T *bond_info)
disconnect the link.
OPERATE_RET tkl_bt_gap_address_set(TUYA_BT_GAP_ADDR_T CONST *p_peer_addr)
Set the BT Address
BOOL_T tkl_bt_pairing_status_get(VOID_T)
check if device is paired
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_noise_switch(UCHAR_T noise_mode, BOOL_T enable)
Swicth the bredr noise mode
TUYA_BT_PAIR_EVENT_TYPE_E
Definition: tkl_bluetooth_bredr.h:66
@ TUYA_BT_PAIR_BOND_FAIL
Definition: tkl_bluetooth_bredr.h:71
@ TUYA_BT_PAIR_BOND_SUCCESS
Definition: tkl_bluetooth_bredr.h:70
@ TUYA_BT_PAIR_BOND_CONFIRM
Definition: tkl_bluetooth_bredr.h:69
@ TUYA_BT_PAIR_BOND_REQUEST
Definition: tkl_bluetooth_bredr.h:68
@ TUYA_BT_PAIR_BOND_START
Definition: tkl_bluetooth_bredr.h:67
TUYA_BT_BREDR_CONTROL_E
Definition: tkl_bluetooth_bredr.h:74
@ TUYA_BT_BREDR_RCP_PLAY
Definition: tkl_bluetooth_bredr.h:77
@ TUYA_BT_BREDR_RCP_REPEAT
Definition: tkl_bluetooth_bredr.h:84
@ TUYA_BT_BREDR_A2DP_DISCONNECT
Definition: tkl_bluetooth_bredr.h:104
@ TUYA_BT_BREDR_CANCEL_CONNECTION
Definition: tkl_bluetooth_bredr.h:107
@ TUYA_BT_BREDR_HFP_GET_VOLUME
Definition: tkl_bluetooth_bredr.h:102
@ TUYA_BT_BREDR_HFP_REJECT
Definition: tkl_bluetooth_bredr.h:93
@ TUYA_BT_BREDR_RCP_PREV
Definition: tkl_bluetooth_bredr.h:81
@ TUYA_BT_BREDR_HFP_HANGUP
Definition: tkl_bluetooth_bredr.h:92
@ TUYA_BT_BREDR_RCP_NEXT
Definition: tkl_bluetooth_bredr.h:80
@ TUYA_BT_BREDR_RCP_PAUSE
Definition: tkl_bluetooth_bredr.h:79
@ TUYA_BT_BREDR_HFP_START
Definition: tkl_bluetooth_bredr.h:90
@ TUYA_BT_BREDR_RCP_FORWARD
Definition: tkl_bluetooth_bredr.h:82
@ TUYA_BT_BREDR_HFP_CALL
Definition: tkl_bluetooth_bredr.h:94
@ TUYA_BT_BREDR_HFP_SET_VOLUME
Definition: tkl_bluetooth_bredr.h:100
@ TUYA_BT_BREDR_RCP_START
Definition: tkl_bluetooth_bredr.h:76
@ TUYA_BT_BREDR_RCP_STOP
Definition: tkl_bluetooth_bredr.h:78
@ TUYA_BT_BREDR_HFP_UPDATE_BATTERY
Definition: tkl_bluetooth_bredr.h:97
@ TUYA_BT_BREDR_START_CONNECTION
Definition: tkl_bluetooth_bredr.h:106
@ TUYA_BT_BREDR_RCP_VOLUME_UP
Definition: tkl_bluetooth_bredr.h:86
@ TUYA_BT_BREDR_HFP_VOLUME_UP
Definition: tkl_bluetooth_bredr.h:98
@ TUYA_BT_BREDR_RCP_REWIND
Definition: tkl_bluetooth_bredr.h:83
@ TUYA_BT_BREDR_HFP_VOLUME_DOWN
Definition: tkl_bluetooth_bredr.h:99
@ TUYA_BT_BREDR_RCP_VOLUME_DOWN
Definition: tkl_bluetooth_bredr.h:87
@ TUYA_BT_BREDR_HFP_ANSWER
Definition: tkl_bluetooth_bredr.h:91
@ TUYA_BT_BREDR_HFP_DISCONNECT
Definition: tkl_bluetooth_bredr.h:105
@ TUYA_BT_BREDR_RCP_MUTE
Definition: tkl_bluetooth_bredr.h:85
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_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_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
TUYA_BT_SCAN_MODE_E
Definition: tkl_bluetooth_bredr.h:59
@ TUYA_BT_BREDR_MODE_IDLE
Definition: tkl_bluetooth_bredr.h:60
@ TUYA_BT_BREDR_MODE_SCAN_PAGE_ONLY
Definition: tkl_bluetooth_bredr.h:62
@ TUYA_BT_BREDR_MODE_SCAN_INQUIRY_AND_SCAN_PAGE
Definition: tkl_bluetooth_bredr.h:63
@ TUYA_BT_BREDR_MODE_SCAN_INQUIRY_ONLY
Definition: tkl_bluetooth_bredr.h:61
OPERATE_RET tkl_bt_bredr_noise_set(UCHAR_T noise_mode, USHORT_T noise_data)
Control the bredr noise
TUYA_BT_BREDR_PHONE_STATUS_E
Definition: tkl_bluetooth_bredr.h:125
@ TUYA_BT_PHONE_STATUS_CONNECTED
Definition: tkl_bluetooth_bredr.h:127
@ TUYA_BT_PHONE_STATUS_DISCONNECTED
Definition: tkl_bluetooth_bredr.h:128
@ TUYA_BT_PHONE_INCOMING
Definition: tkl_bluetooth_bredr.h:129
@ TUYA_BT_PHONE_UPDATE_BATTERY
Definition: tkl_bluetooth_bredr.h:134
@ TUYA_BT_PHONE_STATUS_IDLE
Definition: tkl_bluetooth_bredr.h:126
@ TUYA_BT_PHONE_OUTGOING
Definition: tkl_bluetooth_bredr.h:130
@ TUYA_BT_PHONE_VOLOUME_CHANGED
Definition: tkl_bluetooth_bredr.h:133
@ TUYA_BT_PHONE_HANGUP
Definition: tkl_bluetooth_bredr.h:132
@ TUYA_BT_PHONE_ACTIVE
Definition: tkl_bluetooth_bredr.h:131
OPERATE_RET tkl_bt_bredr_deinit(TUYA_BT_BREDR_ROLE_E role)
De-Init the Bluetooth BR-EDR Interface.
TUYA_BT_BREDR_ROLE_E
Definition: tkl_bluetooth_bredr.h:111
@ TUYA_BT_BREDR_ROLE_MASTER
Definition: tkl_bluetooth_bredr.h:112
@ TUYA_BT_BREDR_ROLE_SLAVE
Definition: tkl_bluetooth_bredr.h:113
OPERATE_RET tkl_bt_gap_paring_passkey_send(UINT_T passkey)
Send paring passkey when in keyboard mode.
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_inquiry_enable(BOOL_T enable)
Enable the Bluetooth BR-EDR Interface.
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_reset(TUYA_BT_BREDR_ROLE_E role)
Reset the Bluetooth BR-EDR Interface.
OPERATE_RET tkl_bt_gap_paring_delete(TUYA_BT_PAIR_BOND_INFO_T *bond_info)
Delete the pair informations.
OPERATE_RET tkl_bt_gap_address_get(TUYA_BT_GAP_ADDR_T *p_peer_addr)
Get the BT Address
OPERATE_RET tkl_bt_gap_paring_request(TUYA_BT_PAIR_DEVICE_T *p_device)
Request the pair while in BT-Master Mode.
TUYA_BT_BREDR_EVENT_TYPE_E
Definition: tkl_bluetooth_bredr.h:39
@ TUYA_BT_BREDR_GAP_EVT_CONNECT
Definition: tkl_bluetooth_bredr.h:46
@ TUYA_BT_BREDR_GAP_EVT_PAIR
Definition: tkl_bluetooth_bredr.h:50
@ TUYA_BT_BREDR_STACK_RESET
Definition: tkl_bluetooth_bredr.h:44
@ TUYA_BT_BREDR_STACK_DEINIT
Definition: tkl_bluetooth_bredr.h:42
@ TUYA_BT_BREDR_STACK_INIT
Definition: tkl_bluetooth_bredr.h:40
@ TUYA_BT_BREDR_PHONE_STATUS
Definition: tkl_bluetooth_bredr.h:56
@ TUYA_BT_BREDR_GAP_EVT_DISCONNECT
Definition: tkl_bluetooth_bredr.h:48
@ TUYA_BT_BREDR_STREAM_STATUS
Definition: tkl_bluetooth_bredr.h:54
@ TUYA_BT_BREDR_GAP_INFO_INQUIRY
Definition: tkl_bluetooth_bredr.h:52
TUYA_BT_BREDR_STEAM_STATUS_E
Definition: tkl_bluetooth_bredr.h:116
@ TUYA_BT_STREAM_STATUS_IDLE
Definition: tkl_bluetooth_bredr.h:117
@ TUYA_BT_STREAM_STATUS_SUSPENDING
Definition: tkl_bluetooth_bredr.h:121
@ TUYA_BT_STREAM_STATUS_START
Definition: tkl_bluetooth_bredr.h:120
@ TUYA_BT_STREAM_STATUS_CONNECTED
Definition: tkl_bluetooth_bredr.h:118
@ TUYA_BT_STREAM_STATUS_DISCONNECTED
Definition: tkl_bluetooth_bredr.h:119
@ TUYA_BT_STREAM_STATUS_STOP
Definition: tkl_bluetooth_bredr.h:122
OPERATE_RET tkl_bt_bredr_enable(TUYA_BT_SCAN_MODE_E mode)
Enable the Bluetooth BR-EDR Interface.
VOID(* TUYA_BT_BREDR_EVT_FUNC_CB)(TUYA_BT_BREDR_EVENT_T *p_event)
Definition: tkl_bluetooth_bredr.h:244
TUYA_BT_PAIR_IO_CAP_E
Definition: tkl_bluetooth_bredr.h:143
@ TUYA_BT_IO_CAP_KEYBOARD_DISPLAY
Definition: tkl_bluetooth_bredr.h:148
@ TUYA_BT_IO_CAP_DISPLAY_YES_NO
Definition: tkl_bluetooth_bredr.h:145
@ TUYA_BT_IO_CAP_DISPLAY_ONLY
Definition: tkl_bluetooth_bredr.h:144
@ TUYA_BT_IO_CAP_NO_INPUT_NO_OUTPUT
Definition: tkl_bluetooth_bredr.h:147
@ TUYA_BT_IO_CAP_KEYBOARD_ONLY
Definition: tkl_bluetooth_bredr.h:146