Infineon Logo AIROC BTSDK v4.0 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Callback functions for Logical Link Control and Adaptation Layer Protocol (L2CAP). More...

Data Structures

struct  wiced_bt_l2cap_appl_information_t
 Define the structure that applications use to register with L2CAP. More...
 
struct  wiced_bt_l2cap_fixed_chnl_reg_t
 Fixed channel registration info (the callback addresses and channel config) More...
 
struct  wiced_bt_l2cap_le_appl_information_t
 Define the structure that applications use to register with LE L2CAP. More...
 

Typedefs

typedef void( wiced_bt_l2cap_connected_cback_t )(void *context, wiced_bt_device_address_t bd_addr, uint16_t local_cid, uint16_t peer_mtu)
 Connection established callback prototype. More...
 
typedef void( wiced_bt_l2cap_disconnect_indication_cback_t )(void *context, uint16_t local_cid, wiced_bool_t ack)
 Disconnect indication callback prototype. More...
 
typedef void( wiced_bt_l2cap_disconnect_confirm_cback_t )(void *context, uint16_t local_cid, uint16_t result)
 Disconnect confirm callback prototype. More...
 
typedef void( wiced_bt_l2cap_data_indication_cback_t )(void *context, uint16_t local_cid, uint8_t *p_buff, uint16_t buf_len)
 Data received indication callback prototype. More...
 
typedef void( wiced_bt_l2cap_congestion_status_cback_t )(void *context, uint16_t local_cid, wiced_bool_t congested)
 Congestion status callback protype. More...
 
typedef void( wiced_bt_l2cap_tx_complete_cback_t )(void *context, uint16_t local_cid, uint16_t num_sdu)
 Transmit complete callback protype. More...
 
typedef void( wiced_bt_l2cap_fixed_chnl_cback_t )(wiced_bt_device_address_t bd_addr, wiced_bool_t connected, uint16_t reason, tBT_TRANSPORT transport)
 Fixed channel connected and disconnected. More...
 
typedef void( wiced_bt_l2cap_fixed_data_cback_t )(wiced_bt_device_address_t bd_addr, uint8_t *p_buff, uint16_t buf_len)
 Signalling data received. More...
 
typedef void( wiced_bt_l2cap_fixed_congestion_status_cback_t )(wiced_bt_device_address_t bd_addr, wiced_bool_t congested)
 Congestion status callback protype. More...
 
typedef void( wiced_bt_l2cap_le_connect_indication_cback_t )(void *context, wiced_bt_device_address_t bd_addr, uint16_t local_cid, uint16_t psm, uint8_t id, uint16_t mtu_peer)
 LE Connection indication callback prototype. More...
 
typedef void( wiced_bt_l2cap_le_connect_confirm_cback_t )(void *context, uint16_t local_cid, uint16_t result, uint16_t mtu_peer)
 LE Connection confirmation callback prototype. More...
 
typedef void( wiced_bt_l2cap_le_tx_complete_cback_t )(void *context, uint16_t local_cid, uint16_t buf_count)
 LE TX complete callback. More...
 
typedef void( wiced_bt_l2cap_le_conformance_test_cback_t )(uint16_t)
 

Detailed Description

Callback functions for Logical Link Control and Adaptation Layer Protocol (L2CAP).

Typedef Documentation

typedef void( wiced_bt_l2cap_congestion_status_cback_t)(void *context, uint16_t local_cid, wiced_bool_t congested)

Congestion status callback protype.

This callback is optional. If an application tries to send data when the transmit queue is full, the data will anyways be dropped.

Parameters
context: Caller context provided with wiced_bt_l2cap_register()
local_cid: Local CID
congested: TRUE if congested, FALSE if uncongested
Returns
void
typedef void( wiced_bt_l2cap_connected_cback_t)(void *context, wiced_bt_device_address_t bd_addr, uint16_t local_cid, uint16_t peer_mtu)

Connection established callback prototype.

Parameters
context: Caller context provided with wiced_bt_l2cap_register()
bd_addr: BD Address of remote
local_cid: Local CID assigned to the connection
peer_mtu: Peer MTU
Returns
void
typedef void( wiced_bt_l2cap_data_indication_cback_t)(void *context, uint16_t local_cid, uint8_t *p_buff, uint16_t buf_len)

Data received indication callback prototype.

Parameters
context: Caller context provided with wiced_bt_l2cap_register()
local_cid: Local CID
p_addr_buff: Address of buffer
Returns
void
typedef void( wiced_bt_l2cap_disconnect_confirm_cback_t)(void *context, uint16_t local_cid, uint16_t result)

Disconnect confirm callback prototype.

Parameters
context: Caller context provided with wiced_bt_l2cap_register()
local_cid: Local CID
result: Result
Returns
void
typedef void( wiced_bt_l2cap_disconnect_indication_cback_t)(void *context, uint16_t local_cid, wiced_bool_t ack)

Disconnect indication callback prototype.

Parameters
context: Caller context provided with wiced_bt_l2cap_register()
local_cid: Local CID
ack: Boolean whether upper layer should ack this
Returns
void
typedef void( wiced_bt_l2cap_fixed_chnl_cback_t)(wiced_bt_device_address_t bd_addr, wiced_bool_t connected, uint16_t reason, tBT_TRANSPORT transport)

Fixed channel connected and disconnected.

Parameters
bd_addr: BD Address of remote
connected: TRUE if channel is connected, FALSE if disconnected
reason: Reason for connection failure
transport: Bluetooth Transport (BR/EDR or LE)
Returns
void
typedef void( wiced_bt_l2cap_fixed_congestion_status_cback_t)(wiced_bt_device_address_t bd_addr, wiced_bool_t congested)

Congestion status callback protype.

This callback is optional. If an application tries to send data when the transmit queue is full, the data will anyways be dropped.

Parameters
bd_addr: remote wiced_bt_device_address_t
congested: TRUE if congested, FALSE if uncongested
Returns
void
typedef void( wiced_bt_l2cap_fixed_data_cback_t)(wiced_bt_device_address_t bd_addr, uint8_t *p_buff, uint16_t buf_len)

Signalling data received.

Parameters
bd_addr: BD Address of remote
p_buff: Pointer to buffer with data
Returns
void
typedef void( wiced_bt_l2cap_le_conformance_test_cback_t)(uint16_t)
Returns
void
typedef void( wiced_bt_l2cap_le_connect_confirm_cback_t)(void *context, uint16_t local_cid, uint16_t result, uint16_t mtu_peer)

LE Connection confirmation callback prototype.

Parameters
context: Caller context provided with wiced_bt_l2cap_le_register()
local_cid: Local CID
result: Result - 0 = connected, non-zero means failure reason
mtu_peer: MTU of the peer
Returns
void
typedef void( wiced_bt_l2cap_le_connect_indication_cback_t)(void *context, wiced_bt_device_address_t bd_addr, uint16_t local_cid, uint16_t psm, uint8_t id, uint16_t mtu_peer)

LE Connection indication callback prototype.

Parameters
context: Caller context provided with wiced_bt_l2cap_le_register()
bd_addr: BD Address of remote
local_cid: Local CID assigned to the connection
psm: PSM that the remote wants to connect to
id: Identifier that the remote sent
mtu_peer: MTU of the peer
Returns
void
typedef void( wiced_bt_l2cap_le_tx_complete_cback_t)(void *context, uint16_t local_cid, uint16_t buf_count)

LE TX complete callback.

(Optional) Notification after wiced_bt_l2cap_le_data_write has sent buffer to transport layer

Parameters
context: Caller context provided with wiced_bt_l2cap_le_register()
local_cid: Local CID
buf_count: Number of buffers sent
Returns
void
typedef void( wiced_bt_l2cap_tx_complete_cback_t)(void *context, uint16_t local_cid, uint16_t num_sdu)

Transmit complete callback protype.

This callback is optional. If set, L2CAP will call it when packets are sent or flushed. If the count is 0xFFFF, it means all packets are sent for that CID (eRTM mode only).

Parameters
context: Caller context provided with wiced_bt_l2cap_register()
local_cid: Local CID
num_sdu: Number of SDUs sent or dropped
Returns
void