TWS Bluetooth Interface Functions
TWS_BT_IF API Brief
Application |
Brief |
|---|---|
TWS HCI event handler |
|
TWS HFP event handler |
|
TWS AVRCP event handler |
|
TWS A2DP event handler |
|
Register TWS sub FSM callback function |
|
TWS connection request callback |
|
TWS SPP event handler |
|
TWS RX host event handler |
|
trigger tws ui re-run fsm |
TWS_BT_IF API Reference
Header File
Functions
-
void tws_bt_if_hci_event_handler(uint8_t *p_data, uint16_t length)
TWS HCI event handler.
Handle TWS HCI events in the BT task.
- 参数:
p_data – [in] HCI event data pointer
length – [in] HCI event data length
- 返回:
N/A
-
void tws_bt_if_hfp_event_handler(uint8_t *p_data, uint16_t size)
TWS HFP event handler.
Handle TWS HFP events in the BT task.
- 参数:
p_data – [in] HFP event data pointer
length – [in] HFP event data length
- 返回:
N/A
-
void tws_bt_if_avrcp_event_handle(const void *p_cb_param, uint16_t length)
TWS AVRCP event handler.
Handle TWS AVRCP events in the BT task.
- 参数:
p_cb_param – [in] AVRCP event parameter pointer
length – [in] AVRCP event parameter length
- 返回:
N/A
-
void tws_bt_if_a2dp_event_handle(const void *p_cb_param, uint16_t length)
TWS A2DP event handler.
Handle TWS A2DP events in the BT task.
- 参数:
p_cb_param – [in] A2DP event parameter pointer
length – [in] A2DP event parameter length
- 返回:
N/A
-
void tws_bt_if_register_subfsm_callback(tws_bt_if_sub_fsm_callback callback)
Register TWS sub FSM callback function.
Register the TWS sub FSM callback function running in the BT task.
- 参数:
callback – [in] TWS sub FSM callback function.
- 返回:
N/A
-
uint8_t tws_bt_if_connect_req_callback(void *p_addr)
TWS connection request callback.
TWS connection request callback running in the BT task.
- 参数:
p_addr – [in] The address pointer of the connection requesting device.
- 返回值:
0 – success [BTIF_EXIT_SUCCESS]
other – fail
- 返回:
result
-
void tws_bt_if_spp_event_handle(uint8_t *p_data, uint16_t size)
TWS SPP event handler.
Handle TWS SPP events in the BT task.
- 参数:
p_data – [in] SPP event data pointer
size – [in] SPP event data size
- 返回:
N/A
-
void tws_bt_if_rx_host_evt(uint8_t *p_data, uint16_t length)
TWS RX host event handler.
Handle TWS RX host events in the TWS task.
- 参数:
p_data – [in] RX host event data pointer
length – [in] RX host event data length
- 返回:
N/A
-
void tws_bt_if_trigger_fsm(void)
trigger tws ui re-run fsm.
send one re-run message to tws task.
- 参数:
N/A – [in]
- 返回:
N/A TWS_BT_IF_H EOF
Type Definitions
-
typedef void (*tws_bt_if_sub_fsm_callback)(btif_bd_addr_t addr, uint8_t action, uint8_t status, void *p_para)
Define the callback function pointer for the TWS sub finite state machine (FSM).