API's used for BR/EDR L2CAP.
Functions | |
| uint16_t | wiced_bt_l2cap_connect_req (uint16_t psm, wiced_bt_device_address_t p_bd_addr) |
| Higher layers call this function to create an L2CAP connection. More... | |
| void | wiced_bt_l2cap_ertm_enable (void) |
| Enable ERTM. More... | |
| uint16_t | wiced_bt_l2cap_ertm_connect_req (uint16_t psm, wiced_bt_device_address_t p_bd_addr, wiced_bt_l2cap_ertm_information_t *p_ertm_information) |
| Higher layers call this function to create an L2CAP connection that needs to use Enhanced Retransmission Mode. More... | |
| wiced_bool_t | wiced_bt_l2cap_register_ertm_drb (uint16_t lcid, tDRB *p_drb, uint16_t drb_max_payload_len, wiced_bt_l2cap_drb_release_cb *p_unreg_cb) |
| Higher layers call this function to register a DRM for an ERTM connection. More... | |
| uint8_t | wiced_bt_l2cap_set_desire_role (uint8_t new_role) |
| This function sets the desire role for L2CAP. More... | |
| uint16_t | wiced_bt_l2cap_flush_channel (uint16_t lcid, uint16_t num_to_flush) |
| This function flushes none, some or all buffers queued up for xmission for a particular CID. More... | |
| wiced_bool_t | wiced_bt_l2cap_set_acl_priority (wiced_bt_device_address_t bd_addr, uint8_t priority) |
| Sets the priority for an ACL channel. More... | |
| wiced_bool_t | wiced_bt_l2cap_set_acl_priority_ext (wiced_bt_device_address_t bd_addr, uint8_t priority, uint8_t direction) |
| Sets the priority for an ACL channel with extended parameters. More... | |
| wiced_bool_t | wiced_bt_l2cap_flow_control (uint16_t cid, wiced_bool_t data_enabled) |
| Higher layers call this function to flow control a channel. More... | |
| wiced_bool_t | wiced_bt_l2cap_set_tx_priority (uint16_t cid, wiced_bt_l2cap_chnl_priority_t priority) |
| Sets the transmission priority for a channel. More... | |
| wiced_bool_t | wiced_bt_l2cap_set_flush_timeout (wiced_bt_device_address_t bd_addr, uint16_t flush_timeout) |
| This function set the automatic flush time out in Baseband for ACL-U packets. More... | |
| wiced_bool_t | wiced_bt_l2cap_get_peer_features (wiced_bt_device_address_t bd_addr, uint32_t *p_ext_feat, uint8_t *p_chnl_mask) |
| Get a peers features and fixed channel map. More... | |
| uint8_t | wiced_bt_l2cap_get_chnl_fcr_mode (uint16_t lcid) |
| Get the channel FCR mode. More... | |
| uint16_t wiced_bt_l2cap_connect_req | ( | uint16_t | psm, |
| wiced_bt_device_address_t | p_bd_addr | ||
| ) |
Higher layers call this function to create an L2CAP connection.
Note that the connection is not established at this time, but connection establishment gets started. The callback function will be invoked when connection establishes or fails.
| [in] | psm | : PSM value |
| [in] | p_bd_addr | : BD Address |
| void wiced_bt_l2cap_ertm_enable | ( | void | ) |
Enable ERTM.
Calling this function will cause the linker to include
ERTM related functions.
| uint16_t wiced_bt_l2cap_ertm_connect_req | ( | uint16_t | psm, |
| wiced_bt_device_address_t | p_bd_addr, | ||
| wiced_bt_l2cap_ertm_information_t * | p_ertm_information | ||
| ) |
Higher layers call this function to create an L2CAP connection that needs to use Enhanced Retransmission Mode.
Note that the connection is not established at this time, but connection establishment gets started. The callback function will be invoked when connection establishes or fails.
| [in] | psm | : PSM value |
| [in] | p_bd_addr | : BD Address |
| [in] | p_ertm_information | : ERTM info |
| wiced_bool_t wiced_bt_l2cap_register_ertm_drb | ( | uint16_t | lcid, |
| tDRB * | p_drb, | ||
| uint16_t | drb_max_payload_len, | ||
| wiced_bt_l2cap_drb_release_cb * | p_unreg_cb | ||
| ) |
Higher layers call this function to register a DRM for an ERTM connection.
| [in] | lcid | : Local CID value |
| [in] | p_drb | : DRB to be used to receive data for this channel |
| [in] | drb_max_payload_len | : DRB Size. It should greater than or equal to to MTU. |
| [in] | p_unreg_cb | : wiced_bt_l2cap_drb_release_cb to release the DRB |
p_drb passed here has been allocated, it can be released when the stack calls p_unreg_cb | uint8_t wiced_bt_l2cap_set_desire_role | ( | uint8_t | new_role | ) |
This function sets the desire role for L2CAP.
If the new role is L2CAP_ROLE_ALLOW_SWITCH, allow switch on HciCreateConnection. If the new role is L2CAP_ROLE_DISALLOW_SWITCH, do not allow switch on HciCreateConnection.
If the new role is a valid role (HCI_ROLE_CENTRAL or HCI_ROLE_PERIPHERAL), the desire role is set to the new value. Otherwise, it is not changed.
| [in] | new_role | : New role value. Refer L2CAP role |
| uint16_t wiced_bt_l2cap_flush_channel | ( | uint16_t | lcid, |
| uint16_t | num_to_flush | ||
| ) |
This function flushes none, some or all buffers queued up for xmission for a particular CID.
If called with L2CAP_FLUSH_CHANNELS_GET (0), it simply returns the number of buffers queued for that CID L2CAP_FLUSH_CHANNELS_ALL (0xffff) flushes all buffers. All other values specifies the maximum buffers to flush.
| [in] | lcid | : Local CID value |
| [in] | num_to_flush | : Number of items for flushing, Refer L2CAP flush channels |
| wiced_bool_t wiced_bt_l2cap_set_acl_priority | ( | wiced_bt_device_address_t | bd_addr, |
| uint8_t | priority | ||
| ) |
Sets the priority for an ACL channel.
| [in] | bd_addr | : BD Address |
| [in] | priority | : Refer L2CAP ACL Priority Value |
| wiced_bool_t wiced_bt_l2cap_set_acl_priority_ext | ( | wiced_bt_device_address_t | bd_addr, |
| uint8_t | priority, | ||
| uint8_t | direction | ||
| ) |
Sets the priority for an ACL channel with extended parameters.
| [in] | bd_addr | : BD Address |
| [in] | priority | : Refer L2CAP ACL Priority Value |
| [in] | direction | : Refer L2CAP ACL Priority Direction |
| wiced_bool_t wiced_bt_l2cap_flow_control | ( | uint16_t | cid, |
| wiced_bool_t | data_enabled | ||
| ) |
Higher layers call this function to flow control a channel.
data_enabled - TRUE data flows, FALSE data is stopped
| [in] | cid | : CID value |
| [in] | data_enabled | : data enabled |
| wiced_bool_t wiced_bt_l2cap_set_tx_priority | ( | uint16_t | cid, |
| wiced_bt_l2cap_chnl_priority_t | priority | ||
| ) |
Sets the transmission priority for a channel.
(FCR Mode)
| [in] | cid | : CID value |
| [in] | priority | : refer wiced_bt_l2cap_chnl_priority_t |
| wiced_bool_t wiced_bt_l2cap_set_flush_timeout | ( | wiced_bt_device_address_t | bd_addr, |
| uint16_t | flush_timeout | ||
| ) |
This function set the automatic flush time out in Baseband for ACL-U packets.
| [in] | bd_addr | : The remote BD address of ACL link. If it is BT_DB_ANY then the flush time out will be applied to all ACL link. |
| [in] | flush_timeout | : flush time out in ms 0x0000 : No automatic flush L2CAP_NO_RETRANSMISSION : No retransmission 0x0002 - 0xFFFE : flush time out, if (flush_timeout*8)+3/5) <= HCI_MAX_AUTO_FLUSH_TOUT (in 625us slot). Otherwise, return FALSE. L2CAP_NO_AUTOMATIC_FLUSH : No automatic flush |
| wiced_bool_t wiced_bt_l2cap_get_peer_features | ( | wiced_bt_device_address_t | bd_addr, |
| uint32_t * | p_ext_feat, | ||
| uint8_t * | p_chnl_mask | ||
| ) |
Get a peers features and fixed channel map.
| [in] | bd_addr | : Peer Bd Address |
| [in] | p_ext_feat | : features |
| [in] | p_chnl_mask | : mask storage area of type wiced_bt_l2cap_fixed_channel_mask_t |
| uint8_t wiced_bt_l2cap_get_chnl_fcr_mode | ( | uint16_t | lcid | ) |