Functions | |
| uint16_t | wiced_bt_l2cap_allocate_psm (void) |
| wiced_bool_t | wiced_bt_l2cap_cancel_ble_connect_req (wiced_bt_device_address_t rem_bda) |
| uint16_t | wiced_bt_l2cap_connect_req (uint16_t psm, wiced_bt_device_address_t p_bd_addr, wiced_bt_l2cap_ertm_information_t *p_ertm_information) |
| uint8_t | wiced_bt_l2cap_data_write (uint16_t cid, uint8_t *p_buf, uint16_t buf_len, uint16_t flags) |
| void | wiced_bt_l2cap_deregister (uint16_t psm) |
| wiced_bool_t | wiced_bt_l2cap_disconnect_req (uint16_t cid) |
| wiced_bool_t | wiced_bt_l2cap_disconnect_rsp (uint16_t cid) |
| wiced_bool_t | wiced_bt_l2cap_enable_update_ble_conn_params (wiced_bt_device_address_t rem_bda, wiced_bool_t enable) |
| 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) |
| void | wiced_bt_l2cap_ertm_enable (void) |
| wiced_bool_t | wiced_bt_l2cap_flow_control (uint16_t cid, wiced_bool_t data_enabled) |
| uint16_t | wiced_bt_l2cap_flush_channel (uint16_t lcid, uint16_t num_to_flush) |
| wiced_bool_t | wiced_bt_l2cap_get_bdaddrby_handle (uint16_t handle, wiced_bt_device_address_t bd_addr) |
| uint8_t | wiced_bt_l2cap_get_ble_conn_role (wiced_bt_device_address_t bd_addr) |
| uint8_t | wiced_bt_l2cap_get_chnl_fcr_mode (uint16_t lcid) |
| wiced_bool_t | wiced_bt_l2cap_get_current_config (uint16_t lcid, wiced_bt_l2cap_cfg_information_t **pp_our_cfg, wiced_bt_l2cap_ch_cfg_bits_t *p_our_cfg_bits, wiced_bt_l2cap_cfg_information_t **pp_peer_cfg, wiced_bt_l2cap_ch_cfg_bits_t *p_peer_cfg_bits) |
| uint16_t | wiced_bt_l2cap_get_disconnect_reason (wiced_bt_device_address_t remote_bda, tBT_TRANSPORT transport) |
| 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) |
| uint16_t | wiced_bt_l2cap_le_connect_req (uint16_t le_psm, wiced_bt_device_address_t p_bd_addr, wiced_bt_ble_address_type_t bd_addr_type, wiced_bt_ble_conn_mode_t conn_mode, uint16_t rx_mtu, uint8_t rx_sdu_pool_id, uint8_t req_security, uint8_t req_encr_key_size) |
| wiced_bool_t | wiced_bt_l2cap_le_connect_rsp (wiced_bt_device_address_t p_bd_addr, uint8_t id, uint16_t lcid, uint16_t result, uint16_t rx_mtu, uint8_t rx_sdu_pool_id) |
| uint8_t | wiced_bt_l2cap_le_data_write (uint16_t cid, uint8_t *p_data, uint16_t buf_len, uint16_t flags) |
| wiced_bool_t | wiced_bt_l2cap_le_deregister (uint16_t le_psm) |
| uint16_t | wiced_bt_l2cap_le_determ_secur_rsp (wiced_bt_device_address_t bd_addr, uint8_t req_secur, uint8_t req_encr_key_size) |
| wiced_bool_t | wiced_bt_l2cap_le_disconnect_req (uint16_t lcid) |
| wiced_bool_t | wiced_bt_l2cap_le_disconnect_rsp (uint16_t lcid) |
| uint16_t | wiced_bt_l2cap_le_get_peer_mtu (uint16_t lcid) |
| uint16_t | wiced_bt_l2cap_le_register (uint16_t le_psm, wiced_bt_l2cap_le_appl_information_t *p_cb_information, void *context) |
| wiced_bool_t | wiced_bt_l2cap_le_set_user_congestion (uint16_t lcid, wiced_bool_t is_congested) |
| uint16_t | wiced_bt_l2cap_register (uint16_t psm, wiced_bt_l2cap_appl_information_t *p_cb_information, void *context) |
| wiced_bool_t | wiced_bt_l2cap_set_acl_priority (wiced_bt_device_address_t bd_addr, uint8_t priority) |
| wiced_bool_t | wiced_bt_l2cap_set_acl_priority_ext (wiced_bt_device_address_t bd_addr, uint8_t priority, uint8_t direction) |
| wiced_bool_t | wiced_bt_l2cap_set_chnl_flushability (uint16_t cid, wiced_bool_t is_flushable) |
| uint8_t | wiced_bt_l2cap_set_desire_role (uint8_t new_role) |
| wiced_bool_t | wiced_bt_l2cap_set_flush_timeout (wiced_bt_device_address_t bd_addr, uint16_t flush_timeout) |
| wiced_bool_t | wiced_bt_l2cap_set_idle_timeout (uint16_t cid, uint16_t timeout, wiced_bool_t is_global) |
| wiced_bool_t | wiced_bt_l2cap_set_idle_timeout_by_bd_addr (wiced_bt_device_address_t bd_addr, uint16_t timeout, tBT_TRANSPORT transport) |
| uint8_t | wiced_bt_l2cap_set_trace_level (uint8_t trace_level) |
| wiced_bool_t | wiced_bt_l2cap_set_tx_priority (uint16_t cid, wiced_bt_l2cap_chnl_priority_t priority) |
| wiced_bool_t | wiced_bt_l2cap_update_ble_conn_params (wiced_bt_device_address_t rem_bdRa, uint16_t min_int, uint16_t max_int, uint16_t latency, uint16_t timeout) |
API Functions module for L2CAP.
| uint16_t wiced_bt_l2cap_allocate_psm | ( | void | ) |
Function wiced_bt_l2cap_allocate_psm
Other layers call this function to find an unused PSM for
L2CAP services.
| wiced_bool_t wiced_bt_l2cap_cancel_ble_connect_req | ( | wiced_bt_device_address_t | rem_bda | ) |
Function wiced_bt_l2cap_cancel_ble_connect_req
Cancel a pending connection attempt to a BLE device.
| [in] | rem_bda | BD Address of remote |
| uint16_t wiced_bt_l2cap_connect_req | ( | uint16_t | psm, |
| wiced_bt_device_address_t | p_bd_addr, | ||
| wiced_bt_l2cap_ertm_information_t * | p_ertm_information ) |
Function wiced_bt_l2cap_connect_req
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 |
| [in] | p_ertm_information | : ERTM info |
| uint8_t wiced_bt_l2cap_data_write | ( | uint16_t | cid, |
| uint8_t * | p_buf, | ||
| uint16_t | buf_len, | ||
| uint16_t | flags ) |
Function wiced_bt_l2cap_data_write
Higher layers call this function to write data with extended
| [in] | cid | TODO |
| [in] | p_data | TODO |
| [in] | flags | L2CAP_FLUSHABLE_CH_BASED L2CAP_FLUSHABLE_PACKET L2CAP_NON_FLUSHABLE_PACKET |
| void wiced_bt_l2cap_deregister | ( | uint16_t | psm | ) |
Function wiced_bt_l2cap_deregister
Other layers call this function to deregister for L2CAP
services.
| [in] | psm | PSM value |
| wiced_bool_t wiced_bt_l2cap_disconnect_req | ( | uint16_t | cid | ) |
Function wiced_bt_l2cap_disconnect_req
Higher layers call this function to disconnect a channel.
| [in] | cid | CID value |
| wiced_bool_t wiced_bt_l2cap_disconnect_rsp | ( | uint16_t | cid | ) |
Function wiced_bt_l2cap_disconnect_rsp
Higher layers call this function to acknowledge the
disconnection of a channel.
| [in] | cid | CID value |
| wiced_bool_t wiced_bt_l2cap_enable_update_ble_conn_params | ( | wiced_bt_device_address_t | rem_bda, |
| wiced_bool_t | enable ) |
Function wiced_bt_l2cap_enable_update_ble_conn_params
Update BLE connection parameters.
| [in] | rem_bda | Remote Bd Address |
| [in] | enable | Enable Flag |
| 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 ) |
Function wiced_bt_l2cap_ertm_connect_req
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_info | ERTM info |
| void wiced_bt_l2cap_ertm_enable | ( | void | ) |
Function wiced_bt_l2cap_ertm_enable
Description Enable ERTM.
Calling this function will cause the linker to include
ERTM related functions.
| [in] | void |
| wiced_bool_t wiced_bt_l2cap_flow_control | ( | uint16_t | cid, |
| wiced_bool_t | data_enabled ) |
Function wiced_bt_l2cap_flow_control
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 |
| uint16_t wiced_bt_l2cap_flush_channel | ( | uint16_t | lcid, |
| uint16_t | num_to_flush ) |
Function wiced_bt_l2cap_flush_channel
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 | LCID value |
| [in] | num_to_flush | Number of items for flushing |
| wiced_bool_t wiced_bt_l2cap_get_bdaddrby_handle | ( | uint16_t | handle, |
| wiced_bt_device_address_t | bd_addr ) |
Function wiced_bt_l2cap_get_bdaddrby_handle
Get BD address for the given HCI handle
| [in] | handle | HCI handle |
| [in] | bd_addr | Peer Bd Address |
| uint8_t wiced_bt_l2cap_get_ble_conn_role | ( | wiced_bt_device_address_t | bd_addr | ) |
Function wiced_bt_l2cap_get_ble_conn_role
This function returns the connection role.
| [in] | bd_addr | BD Address |
| uint8_t wiced_bt_l2cap_get_chnl_fcr_mode | ( | uint16_t | lcid | ) |
Function wiced_bt_l2cap_get_chnl_fcr_mode
Get the channel FCR mode
| [in] | lcid | Local CID |
| wiced_bool_t wiced_bt_l2cap_get_current_config | ( | uint16_t | lcid, |
| wiced_bt_l2cap_cfg_information_t ** | pp_our_cfg, | ||
| wiced_bt_l2cap_ch_cfg_bits_t * | p_our_cfg_bits, | ||
| wiced_bt_l2cap_cfg_information_t ** | pp_peer_cfg, | ||
| wiced_bt_l2cap_ch_cfg_bits_t * | p_peer_cfg_bits ) |
Function wiced_bt_l2cap_get_current_config
This function returns configurations of L2CAP channel
| [in] | lcid | Local CID |
| [in] | pp_our_cfg | pointer of our saved configuration options |
| [in] | p_our_cfg_bits | valid config in bitmap |
| [in] | pp_peer_cfg | pointer of peer's saved configuration options |
| [in] | p_peer_cfg_bits | : valid config in bitmap |
| uint16_t wiced_bt_l2cap_get_disconnect_reason | ( | wiced_bt_device_address_t | remote_bda, |
| tBT_TRANSPORT | transport ) |
Function wiced_bt_l2cap_get_disconnect_reason
This function returns the disconnect reason code.
| [in] | remote_bda | Remote BD Address |
| [in] | transport | Transport (BR-EDR or LE) |
| 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 ) |
Function wiced_bt_l2cap_get_peer_features
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 |
| uint16_t wiced_bt_l2cap_le_connect_req | ( | uint16_t | le_psm, |
| wiced_bt_device_address_t | p_bd_addr, | ||
| wiced_bt_ble_address_type_t | bd_addr_type, | ||
| wiced_bt_ble_conn_mode_t | conn_mode, | ||
| uint16_t | rx_mtu, | ||
| uint8_t | rx_sdu_pool_id, | ||
| uint8_t | req_security, | ||
| uint8_t | req_encr_key_size ) |
Function wiced_bt_l2cap_le_connect_req
Higher layers call this function to create an L2CAP connection
for LE_PSM.
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] | le_psm | : LE PSM value |
| [in] | p_bd_addr | : BD Address |
| [in] | bd_addr_type | : BLE_ADDR_PUBLIC or BLE_ADDR_RANDOM |
| [in] | conn_mode | : BLE_CONN_MODE_HIGH_DUTY or BLE_CONN_MODE_LOW_DUTY |
| [in] | rx_mtu | : Rx MTU value (must be <= ACL_POOL_SIZE) |
| [in] | rx_sdu_pool_id | : Rx SDU pool ID (typically L2CAP_DEFAULT_BLE_CB_POOL_ID) |
| [in] | req_security | : Security required |
| [in] | req_encr_key_size | : key size |
| wiced_bool_t wiced_bt_l2cap_le_connect_rsp | ( | wiced_bt_device_address_t | p_bd_addr, |
| uint8_t | id, | ||
| uint16_t | lcid, | ||
| uint16_t | result, | ||
| uint16_t | rx_mtu, | ||
| uint8_t | rx_sdu_pool_id ) |
Function wiced_bt_l2cap_le_connect_rsp
Higher layers call this function to accept an incoming
LE L2CAP connection, for which they had gotten an connect
indication callback.
| [in] | p_bd_addr | TODO |
| [in] | id | TODO |
| [in] | lcid | TODO |
| [in] | result | TODO |
| [in] | rx_mtu | TODO |
| [in] | rx_sdu_pool_id | TODO |
| uint8_t wiced_bt_l2cap_le_data_write | ( | uint16_t | cid, |
| uint8_t * | p_data, | ||
| uint16_t | buf_len, | ||
| uint16_t | flags ) |
Function wiced_bt_l2cap_le_data_write
Send data over LE connection-oriented channel.
| [in] | cid | Channel ID |
| [in] | p_data | Input buffer |
| [in] | buf_len | p_data buffer size |
| wiced_bool_t wiced_bt_l2cap_le_deregister | ( | uint16_t | le_psm | ) |
Function wiced_bt_l2cap_le_deregister
Other layers call this function to deregister L2CAP services
for LE_PSM.
| [in] | le_psm | LE PSM value |
| uint16_t wiced_bt_l2cap_le_determ_secur_rsp | ( | wiced_bt_device_address_t | bd_addr, |
| uint8_t | req_secur, | ||
| uint8_t | req_encr_key_size ) |
Function wiced_bt_l2cap_le_determ_secur_rsp
Higher layers call this function to check if the current
device security settings are sufficient to continue with
call establishment.
It is called by call acceptor on reception of LE Credit
Based Connection Request.
| [in] | bd_addr | BD Address |
| [in] | req_secur | Security required |
| [in] | req_encr_key_size | Key size |
| wiced_bool_t wiced_bt_l2cap_le_disconnect_req | ( | uint16_t | lcid | ) |
Function wiced_bt_l2cap_le_disconnect_req
Higher layers call this function to disconnect a LE COC
channel.
| [in] | lcid | LCID value |
| wiced_bool_t wiced_bt_l2cap_le_disconnect_rsp | ( | uint16_t | lcid | ) |
Function wiced_bt_l2cap_le_disconnect_rsp
Higher layers call this function to acknowledge the
disconnection of a LE COC channel.
| [in] | lcid | TODO |
| uint16_t wiced_bt_l2cap_le_get_peer_mtu | ( | uint16_t | lcid | ) |
Function wiced_bt_l2cap_le_get_peer_mtu
Higher layers call this function to get peer MTU.
| [in] | lcid | LCID value |
| uint16_t wiced_bt_l2cap_le_register | ( | uint16_t | le_psm, |
| wiced_bt_l2cap_le_appl_information_t * | p_cb_information, | ||
| void * | context ) |
Function wiced_bt_l2cap_le_register
Other layers call this function to register L2CAP services
for LE_PSM.
| [in] | le_psm | LE PSM value |
| [in] | p_cb_info | L2CAP cb info |
| [in] | context | Caller context to return in callbacks |
| wiced_bool_t wiced_bt_l2cap_le_set_user_congestion | ( | uint16_t | lcid, |
| wiced_bool_t | is_congested ) |
Function wiced_bt_l2cap_le_set_user_congestion
Higher layers call this function to tell if the connection
is congested or not
| [in] | lcid | LCID value |
| [in] | is_congested | TRUE, if congested |
| uint16_t wiced_bt_l2cap_register | ( | uint16_t | psm, |
| wiced_bt_l2cap_appl_information_t * | p_cb_information, | ||
| void * | context ) |
Function wiced_bt_l2cap_register
Other layers call this function to register for L2CAP
services.
| [in] | psm | PSM value |
| [in] | p_cb_info | L2CAP cb info |
| [in] | context | Caller context to return in callbacks |
| wiced_bool_t wiced_bt_l2cap_set_acl_priority | ( | wiced_bt_device_address_t | bd_addr, |
| uint8_t | priority ) |
Function wiced_bt_l2cap_set_acl_priority
Sets the priority for an ACL channel
| [in] | bd_addr | BD Address |
| [in] | priority | [L2CAP_PRIORITY_NORMAL | L2CAP_PRIORITY_HIGH] |
| wiced_bool_t wiced_bt_l2cap_set_acl_priority_ext | ( | wiced_bt_device_address_t | bd_addr, |
| uint8_t | priority, | ||
| uint8_t | direction ) |
Function wiced_bt_l2cap_set_acl_priority_ext
Sets the priority for an ACL channel
with extended parameters.
| [in] | bd_addr | BD Address |
| [in] | priority | [L2CAP_PRIORITY_NORMAL | L2CAP_PRIORITY_HIGH] |
| [in] | direction | [L2CAP_DIRECTION_DATA_SOURCE | L2CAP_DIRECTION_DATA_SINK] |
| wiced_bool_t wiced_bt_l2cap_set_chnl_flushability | ( | uint16_t | cid, |
| wiced_bool_t | is_flushable ) |
Function wiced_bt_l2cap_set_chnl_flushability
Higher layers call this function to set a channels
flushability flags
| [in] | cid | CID value |
| [in] | is_flushable | TRUE, if flushable |
| uint8_t wiced_bt_l2cap_set_desire_role | ( | uint8_t | new_role | ) |
Function wiced_bt_l2cap_set_desire_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_MASTER or HCI_ROLE_SLAVE),
the desire role is set to the new value. Otherwise, it is not changed.
| [in] | new_role | New role value |
| wiced_bool_t wiced_bt_l2cap_set_flush_timeout | ( | wiced_bt_device_address_t | bd_addr, |
| uint16_t | flush_timeout ) |
Function wiced_bt_l2cap_set_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 |
NOTE This flush timeout applies to all logical channels active on the ACL link.
| wiced_bool_t wiced_bt_l2cap_set_idle_timeout | ( | uint16_t | cid, |
| uint16_t | timeout, | ||
| wiced_bool_t | is_global ) |
Function wiced_bt_l2cap_set_idle_timeout
Higher layers call this function to set the idle timeout for
a connection, or for all future connections. The "idle timeout"
is the amount of time that a connection can remain up with
no L2CAP channels on it. A timeout of zero means that the
connection will be torn down immediately when the last channel
is removed. A timeout of 0xFFFF means no timeout. Values are
in seconds.
| [in] | cid | CID value |
| [in] | timeout | Timeout value |
| [in] | is_global | TRUE, if global |
| wiced_bool_t wiced_bt_l2cap_set_idle_timeout_by_bd_addr | ( | wiced_bt_device_address_t | bd_addr, |
| uint16_t | timeout, | ||
| tBT_TRANSPORT | transport ) |
Function wiced_bt_l2cap_set_idle_timeout_by_bd_addr
Higher layers call this function to set the idle timeout for
a connection. The "idle timeout" is the amount of time that
a connection can remain up with no L2CAP channels on it.
A timeout of zero means that the connection will be torn
down immediately when the last channel is removed.
A timeout of 0xFFFF means no timeout. Values are in seconds.
A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY,
then the idle timeouts for all active l2cap links will be
changed.
| [in] | bd_addr | BD Address |
| [in] | timeout | Timeout value |
NOTE This timeout applies to all logical channels active on the ACL link.
| uint8_t wiced_bt_l2cap_set_trace_level | ( | uint8_t | trace_level | ) |
Function wiced_bt_l2cap_set_trace_level
This function sets the trace level for L2CAP. If called with
a value of 0xFF, it simply reads the current trace level.
| [in] | trace_level | Trace level |
| wiced_bool_t wiced_bt_l2cap_set_tx_priority | ( | uint16_t | cid, |
| wiced_bt_l2cap_chnl_priority_t | priority ) |
Function wiced_bt_l2cap_set_tx_priority
Sets the transmission priority for a channel. (FCR Mode)
| [in] | cid | CID |
| [in] | priority | [L2CAP_PRIORITY_NORMAL | L2CAP_PRIORITY_HIGH] |
| wiced_bool_t wiced_bt_l2cap_update_ble_conn_params | ( | wiced_bt_device_address_t | rem_bdRa, |
| uint16_t | min_int, | ||
| uint16_t | max_int, | ||
| uint16_t | latency, | ||
| uint16_t | timeout ) |
Function wiced_bt_l2cap_update_ble_conn_params
Update BLE connection parameters.
| [in] | rem_bdRa | Remote BD Address |
| [in] | min_int | Min interval |
| [in] | max_int | Max interval |
| [in] | latency | Latency value |
| [in] | timeout | Timeout value |