L2CAP Interface Functions
L2CAP_IF API Brief
Application |
Brief |
|---|---|
TWS private channel init function |
|
TWS private cmd send API |
|
TWS private connection link connect API |
|
l2cap pending channel restore run API |
|
Get L2CAP base CID by address |
L2CAP_IF API Reference
Header File
Functions
-
void l2cap_if_tws_channel_init(tws_l2cap_env_t *p_tws_l2cap_init)
l2cap_if_tws_channel_init brief description
TWS private channel init function
- 参数:
p_tws_l2cap_init – [in]
- 返回:
N/A
-
btif_ret_t l2cap_if_tws_cmd_send(void *p_data, uint16_t length, uint16_t cmd_seq)
l2cap_if_tws_cmd_send brief description
TWS private cmd send API
- 参数:
p_data – [in] data buffer will be sent
length – [in] p_data length
cmd_seq – [in] commnad sequenece
- 返回值:
0 – success
other – fail
- 返回:
result
-
btif_ret_t l2cap_if_tws_create_connection(btif_bd_addr_t addr)
l2cap_if_tws_create_connection brief description
TWS private connection link connect API
- 参数:
addr – [in] remote BT MAC address
- 返回值:
0 – success
other – fail
- 返回:
result
-
void l2cap_if_pending_chan_run(uint16_t handle)
l2cap_if_pending_chan_run brief description
l2cap pending channel restore run API
- 参数:
handle – [in] acl_handle
- 返回:
N/A
-
btif_ret_t l2cap_if_get_base_cid(btif_bd_addr_t addr, uint16_t *p_base_cid)
l2cap_if_get_base_cid brief description
Get L2CAP base CID by address
- 参数:
addr – [in] remote BT MAC address
p_base_cid – [out] base CID value
- 返回值:
0 – success
other – fail
- 返回:
result
Structures
-
struct tws_l2cap_env_t
TWS private channel L2CAP environment struct definition.
Public Members
-
l2cap_tws_data_handle data_callback
TWS private channel data callback struct
-
l2cap_tws_event_handle event_callback
TWS private channel event callback struct
-
btif_bd_addr_t addr
remote BT MAC address
-
uint16_t handle
connection handle
-
tws_l2cap_state_t state
TWS private channel connection state
-
l2cap_tws_data_handle data_callback
-
struct l2cap_if_cb_param_t
TWS private channel L2CAP callback interface data struct definition.
Macros
-
BTIF_L2CAP_CONN_REQ
-
BTIF_L2CACP_LOCAL_OPEN
-
BTIF_L2CAP_REMOTE_OPEN
-
BTIF_L2CAP_TX_DONE
-
BTIF_L2CAP_CLOSED
-
L2CAP_TWS_CID
-
L2CAP_TWS_CONNECTED
-
L2CAP_TWS_DISCONNECTED
Type Definitions
-
typedef void (*l2cap_tws_data_handle)(uint8_t *p_data, uint16_t length)
-
typedef void (*l2cap_tws_event_handle)(uint8_t event)
-
typedef uint8_t tws_l2cap_state_t
TWS private channel L2CAP state definition.