diff options
Diffstat (limited to 'stack/include/l2c_api.h')
-rw-r--r-- | stack/include/l2c_api.h | 184 |
1 files changed, 67 insertions, 117 deletions
diff --git a/stack/include/l2c_api.h b/stack/include/l2c_api.h index c85d76b65..010161428 100644 --- a/stack/include/l2c_api.h +++ b/stack/include/l2c_api.h @@ -24,6 +24,8 @@ #ifndef L2C_API_H #define L2C_API_H +#include <stdbool.h> + #include "bt_target.h" #include "l2cdefs.h" #include "hcidefs.h" @@ -347,7 +349,7 @@ extern "C" ** BTM_SetSecurityLevel(). ** *******************************************************************************/ -L2C_API extern UINT16 L2CA_Register (UINT16 psm, tL2CAP_APPL_INFO *p_cb_info); +extern UINT16 L2CA_Register (UINT16 psm, tL2CAP_APPL_INFO *p_cb_info); /******************************************************************************* ** @@ -359,7 +361,7 @@ L2C_API extern UINT16 L2CA_Register (UINT16 psm, tL2CAP_APPL_INFO *p_cb_info); ** Returns void ** *******************************************************************************/ -L2C_API extern void L2CA_Deregister (UINT16 psm); +extern void L2CA_Deregister (UINT16 psm); /******************************************************************************* ** @@ -371,7 +373,7 @@ L2C_API extern void L2CA_Deregister (UINT16 psm); ** Returns PSM to use. ** *******************************************************************************/ -L2C_API extern UINT16 L2CA_AllocatePSM(void); +extern UINT16 L2CA_AllocatePSM(void); /******************************************************************************* ** @@ -385,7 +387,7 @@ L2C_API extern UINT16 L2CA_AllocatePSM(void); ** Returns the CID of the connection, or 0 if it failed to start ** *******************************************************************************/ -L2C_API extern UINT16 L2CA_ConnectReq (UINT16 psm, BD_ADDR p_bd_addr); +extern UINT16 L2CA_ConnectReq (UINT16 psm, BD_ADDR p_bd_addr); /******************************************************************************* ** @@ -398,7 +400,7 @@ L2C_API extern UINT16 L2CA_ConnectReq (UINT16 psm, BD_ADDR p_bd_addr); ** Returns TRUE for success, FALSE for failure ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_ConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid, +extern BOOLEAN L2CA_ConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid, UINT16 result, UINT16 status); /******************************************************************************* @@ -414,9 +416,16 @@ L2C_API extern BOOLEAN L2CA_ConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid ** Returns the CID of the connection, or 0 if it failed to start ** *******************************************************************************/ -L2C_API extern UINT16 L2CA_ErtmConnectReq (UINT16 psm, BD_ADDR p_bd_addr, +extern UINT16 L2CA_ErtmConnectReq (UINT16 psm, BD_ADDR p_bd_addr, tL2CAP_ERTM_INFO *p_ertm_info); +// This function sets the callback routines for the L2CAP connection referred to by +// |local_cid|. The callback routines can only be modified for outgoing connections +// established by |L2CA_ConnectReq| or accepted incoming connections. |callbacks| +// must not be NULL. This function returns true if the callbacks could be updated, +// false if not (e.g. |local_cid| was not found). +bool L2CA_SetConnectionCallbacks(uint16_t local_cid, const tL2CAP_APPL_INFO *callbacks); + /******************************************************************************* ** ** Function L2CA_ErtmConnectRsp @@ -429,7 +438,7 @@ L2C_API extern UINT16 L2CA_ErtmConnectReq (UINT16 psm, BD_ADDR p_bd_addr, ** Returns TRUE for success, FALSE for failure ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_ErtmConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid, +extern BOOLEAN L2CA_ErtmConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid, UINT16 result, UINT16 status, tL2CAP_ERTM_INFO *p_ertm_info); @@ -442,7 +451,7 @@ L2C_API extern BOOLEAN L2CA_ErtmConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 ** Returns TRUE if configuration sent, else FALSE ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_ConfigReq (UINT16 cid, tL2CAP_CFG_INFO *p_cfg); +extern BOOLEAN L2CA_ConfigReq (UINT16 cid, tL2CAP_CFG_INFO *p_cfg); /******************************************************************************* ** @@ -454,7 +463,7 @@ L2C_API extern BOOLEAN L2CA_ConfigReq (UINT16 cid, tL2CAP_CFG_INFO *p_cfg); ** Returns TRUE if configuration response sent, else FALSE ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_ConfigRsp (UINT16 cid, tL2CAP_CFG_INFO *p_cfg); +extern BOOLEAN L2CA_ConfigRsp (UINT16 cid, tL2CAP_CFG_INFO *p_cfg); /******************************************************************************* ** @@ -465,7 +474,7 @@ L2C_API extern BOOLEAN L2CA_ConfigRsp (UINT16 cid, tL2CAP_CFG_INFO *p_cfg); ** Returns TRUE if disconnect sent, else FALSE ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_DisconnectReq (UINT16 cid); +extern BOOLEAN L2CA_DisconnectReq (UINT16 cid); /******************************************************************************* ** @@ -477,7 +486,7 @@ L2C_API extern BOOLEAN L2CA_DisconnectReq (UINT16 cid); ** Returns void ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_DisconnectRsp (UINT16 cid); +extern BOOLEAN L2CA_DisconnectRsp (UINT16 cid); /******************************************************************************* ** @@ -490,7 +499,7 @@ L2C_API extern BOOLEAN L2CA_DisconnectRsp (UINT16 cid); ** L2CAP_DW_FAILED, if error ** *******************************************************************************/ -L2C_API extern UINT8 L2CA_DataWrite (UINT16 cid, BT_HDR *p_data); +extern UINT8 L2CA_DataWrite (UINT16 cid, BT_HDR *p_data); /******************************************************************************* ** @@ -501,7 +510,7 @@ L2C_API extern UINT8 L2CA_DataWrite (UINT16 cid, BT_HDR *p_data); ** Returns TRUE if echo request sent, else FALSE. ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_Ping (BD_ADDR p_bd_addr, tL2CA_ECHO_RSP_CB *p_cb); +extern BOOLEAN L2CA_Ping (BD_ADDR p_bd_addr, tL2CA_ECHO_RSP_CB *p_cb); /******************************************************************************* ** @@ -513,7 +522,13 @@ L2C_API extern BOOLEAN L2CA_Ping (BD_ADDR p_bd_addr, tL2CA_ECHO_RSP_CB *p_cb); ** Returns TRUE if echo request sent, else FALSE. ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_Echo (BD_ADDR p_bd_addr, BT_HDR *p_data, tL2CA_ECHO_DATA_CB *p_callback); +extern BOOLEAN L2CA_Echo (BD_ADDR p_bd_addr, BT_HDR *p_data, tL2CA_ECHO_DATA_CB *p_callback); + +// Given a local channel identifier, |lcid|, this function returns the bound remote +// channel identifier, |rcid|, and the ACL link handle, |handle|. If |lcid| is not +// known or is invalid, this function returns false and does not modify the values +// pointed at by |rcid| and |handle|. |rcid| and |handle| may be NULL. +bool L2CA_GetIdentifiers(uint16_t lcid, uint16_t *rcid, uint16_t *handle); /******************************************************************************* ** @@ -530,7 +545,7 @@ L2C_API extern BOOLEAN L2CA_Echo (BD_ADDR p_bd_addr, BT_HDR *p_data, tL2CA_ECHO ** Returns TRUE if command succeeded, FALSE if failed ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_SetIdleTimeout (UINT16 cid, UINT16 timeout, +extern BOOLEAN L2CA_SetIdleTimeout (UINT16 cid, UINT16 timeout, BOOLEAN is_global); /******************************************************************************* @@ -552,7 +567,7 @@ L2C_API extern BOOLEAN L2CA_SetIdleTimeout (UINT16 cid, UINT16 timeout, ** NOTE This timeout applies to all logical channels active on the ** ACL link. *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_SetIdleTimeoutByBdAddr(BD_ADDR bd_addr, UINT16 timeout); +extern BOOLEAN L2CA_SetIdleTimeoutByBdAddr(BD_ADDR bd_addr, UINT16 timeout); /******************************************************************************* ** @@ -564,7 +579,7 @@ L2C_API extern BOOLEAN L2CA_SetIdleTimeoutByBdAddr(BD_ADDR bd_addr, UINT16 timeo ** Returns the new (current) trace level ** *******************************************************************************/ -L2C_API extern UINT8 L2CA_SetTraceLevel (UINT8 trace_level); +extern UINT8 L2CA_SetTraceLevel (UINT8 trace_level); /******************************************************************************* ** @@ -582,7 +597,7 @@ L2C_API extern UINT8 L2CA_SetTraceLevel (UINT8 trace_level); ** Returns the new (current) role ** *******************************************************************************/ -L2C_API extern UINT8 L2CA_SetDesireRole (UINT8 new_role); +extern UINT8 L2CA_SetDesireRole (UINT8 new_role); /******************************************************************************* ** @@ -593,7 +608,7 @@ L2C_API extern UINT8 L2CA_SetDesireRole (UINT8 new_role); ** Returns CID of 0 if none. ** *******************************************************************************/ -L2C_API extern UINT16 L2CA_LocalLoopbackReq (UINT16 psm, UINT16 handle, BD_ADDR p_bd_addr); +extern UINT16 L2CA_LocalLoopbackReq (UINT16 psm, UINT16 handle, BD_ADDR p_bd_addr); /******************************************************************************* ** @@ -609,7 +624,7 @@ L2C_API extern UINT16 L2CA_LocalLoopbackReq (UINT16 psm, UINT16 handle, BD_ADDR ** Returns Number of buffers left queued for that CID ** *******************************************************************************/ -L2C_API extern UINT16 L2CA_FlushChannel (UINT16 lcid, UINT16 num_to_flush); +extern UINT16 L2CA_FlushChannel (UINT16 lcid, UINT16 num_to_flush); /******************************************************************************* @@ -623,7 +638,7 @@ L2C_API extern UINT16 L2CA_FlushChannel (UINT16 lcid, UINT16 num_to_flush); ** Returns TRUE if a valid channel, else FALSE ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_SetAclPriority (BD_ADDR bd_addr, UINT8 priority); +extern BOOLEAN L2CA_SetAclPriority (BD_ADDR bd_addr, UINT8 priority); /******************************************************************************* ** @@ -636,7 +651,7 @@ L2C_API extern BOOLEAN L2CA_SetAclPriority (BD_ADDR bd_addr, UINT8 priority); ** Returns TRUE if valid channel, else FALSE ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_FlowControl (UINT16 cid, BOOLEAN data_enabled); +extern BOOLEAN L2CA_FlowControl (UINT16 cid, BOOLEAN data_enabled); /******************************************************************************* ** @@ -647,7 +662,7 @@ L2C_API extern BOOLEAN L2CA_FlowControl (UINT16 cid, BOOLEAN data_enabled); ** Returns TRUE if valid Channel, else FALSE ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_SendTestSFrame (UINT16 cid, UINT8 sup_type, +extern BOOLEAN L2CA_SendTestSFrame (UINT16 cid, UINT8 sup_type, UINT8 back_track); /******************************************************************************* @@ -659,7 +674,7 @@ L2C_API extern BOOLEAN L2CA_SendTestSFrame (UINT16 cid, UINT8 sup_type, ** Returns TRUE if a valid channel, else FALSE ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_SetTxPriority (UINT16 cid, tL2CAP_CHNL_PRIORITY priority); +extern BOOLEAN L2CA_SetTxPriority (UINT16 cid, tL2CAP_CHNL_PRIORITY priority); /******************************************************************************* ** @@ -673,7 +688,7 @@ L2C_API extern BOOLEAN L2CA_SetTxPriority (UINT16 cid, tL2CAP_CHNL_PRIORITY prio ** Returns ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_RegForNoCPEvt(tL2CA_NOCP_CB *p_cb, BD_ADDR p_bda); +extern BOOLEAN L2CA_RegForNoCPEvt(tL2CA_NOCP_CB *p_cb, BD_ADDR p_bda); /******************************************************************************* ** @@ -684,7 +699,7 @@ L2C_API extern BOOLEAN L2CA_RegForNoCPEvt(tL2CA_NOCP_CB *p_cb, BD_ADDR p_bda); ** Returns TRUE if a valid channel, else FALSE ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_SetChnlDataRate (UINT16 cid, tL2CAP_CHNL_DATA_RATE tx, tL2CAP_CHNL_DATA_RATE rx); +extern BOOLEAN L2CA_SetChnlDataRate (UINT16 cid, tL2CAP_CHNL_DATA_RATE tx, tL2CAP_CHNL_DATA_RATE rx); typedef void (tL2CA_RESERVE_CMPL_CBACK) (void); @@ -709,7 +724,7 @@ typedef void (tL2CA_RESERVE_CMPL_CBACK) (void); ** NOTE This flush timeout applies to all logical channels active on the ** ACL link. *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout); +extern BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout); /******************************************************************************* ** @@ -726,7 +741,7 @@ L2C_API extern BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout) ** L2CAP_DW_FAILED, if error ** *******************************************************************************/ -L2C_API extern UINT8 L2CA_DataWriteEx (UINT16 cid, BT_HDR *p_data, UINT16 flags); +extern UINT8 L2CA_DataWriteEx (UINT16 cid, BT_HDR *p_data, UINT16 flags); /******************************************************************************* ** @@ -738,7 +753,7 @@ L2C_API extern UINT8 L2CA_DataWriteEx (UINT16 cid, BT_HDR *p_data, UINT16 flags) ** Returns TRUE if CID found, else FALSE ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_SetChnlFlushability (UINT16 cid, BOOLEAN is_flushable); +extern BOOLEAN L2CA_SetChnlFlushability (UINT16 cid, BOOLEAN is_flushable); /******************************************************************************* ** @@ -752,7 +767,7 @@ L2C_API extern BOOLEAN L2CA_SetChnlFlushability (UINT16 cid, BOOLEAN is_flushabl ** Return value: TRUE if peer is connected ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_GetPeerFeatures (BD_ADDR bd_addr, UINT32 *p_ext_feat, UINT8 *p_chnl_mask); +extern BOOLEAN L2CA_GetPeerFeatures (BD_ADDR bd_addr, UINT32 *p_ext_feat, UINT8 *p_chnl_mask); /******************************************************************************* ** @@ -766,7 +781,7 @@ L2C_API extern BOOLEAN L2CA_GetPeerFeatures (BD_ADDR bd_addr, UINT32 *p_ext_feat ** Return value: TRUE if found lcb for the given handle, FALSE otherwise ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_GetBDAddrbyHandle (UINT16 handle, BD_ADDR bd_addr); +extern BOOLEAN L2CA_GetBDAddrbyHandle (UINT16 handle, BD_ADDR bd_addr); /******************************************************************************* ** @@ -779,7 +794,7 @@ L2C_API extern BOOLEAN L2CA_GetBDAddrbyHandle (UINT16 handle, BD_ADDR bd_addr); ** Return value: Channel mode ** *******************************************************************************/ -L2C_API extern UINT8 L2CA_GetChnlFcrMode (UINT16 lcid); +extern UINT8 L2CA_GetChnlFcrMode (UINT16 lcid); /******************************************************************************* @@ -832,7 +847,7 @@ typedef struct ** Return value: TRUE if successs ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_UcdRegister ( UINT16 psm, tL2CAP_UCD_CB_INFO *p_cb_info ); +extern BOOLEAN L2CA_UcdRegister ( UINT16 psm, tL2CAP_UCD_CB_INFO *p_cb_info ); /******************************************************************************* ** @@ -845,7 +860,7 @@ L2C_API extern BOOLEAN L2CA_UcdRegister ( UINT16 psm, tL2CAP_UCD_CB_INFO *p_cb_i ** Return value: TRUE if successs ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_UcdDeregister ( UINT16 psm ); +extern BOOLEAN L2CA_UcdDeregister ( UINT16 psm ); /******************************************************************************* ** @@ -862,7 +877,7 @@ L2C_API extern BOOLEAN L2CA_UcdDeregister ( UINT16 psm ); ** Return value: TRUE if successs ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_UcdDiscover ( UINT16 psm, BD_ADDR rem_bda, UINT8 info_type ); +extern BOOLEAN L2CA_UcdDiscover ( UINT16 psm, BD_ADDR rem_bda, UINT8 info_type ); /******************************************************************************* ** @@ -881,7 +896,7 @@ L2C_API extern BOOLEAN L2CA_UcdDiscover ( UINT16 psm, BD_ADDR rem_bda, UINT8 inf ** L2CAP_DW_FAILED, if error ** *******************************************************************************/ -L2C_API extern UINT16 L2CA_UcdDataWrite (UINT16 psm, BD_ADDR rem_bda, BT_HDR *p_buf, UINT16 flags); +extern UINT16 L2CA_UcdDataWrite (UINT16 psm, BD_ADDR rem_bda, BT_HDR *p_buf, UINT16 flags); /******************************************************************************* ** @@ -895,7 +910,7 @@ L2C_API extern UINT16 L2CA_UcdDataWrite (UINT16 psm, BD_ADDR rem_bda, BT_HDR *p_ ** Return value: TRUE if successs ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_UcdSetIdleTimeout ( BD_ADDR rem_bda, UINT16 timeout ); +extern BOOLEAN L2CA_UcdSetIdleTimeout ( BD_ADDR rem_bda, UINT16 timeout ); /******************************************************************************* ** @@ -906,7 +921,7 @@ L2C_API extern BOOLEAN L2CA_UcdSetIdleTimeout ( BD_ADDR rem_bda, UINT16 timeout ** Returns TRUE if a valid channel, else FALSE ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_UCDSetTxPriority ( BD_ADDR rem_bda, tL2CAP_CHNL_PRIORITY priority ); +extern BOOLEAN L2CA_UCDSetTxPriority ( BD_ADDR rem_bda, tL2CAP_CHNL_PRIORITY priority ); /******************************************************************************* @@ -963,7 +978,7 @@ typedef struct ** Return value: TRUE if registered OK ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_RegisterFixedChannel (UINT16 fixed_cid, tL2CAP_FIXED_CHNL_REG *p_freg); +extern BOOLEAN L2CA_RegisterFixedChannel (UINT16 fixed_cid, tL2CAP_FIXED_CHNL_REG *p_freg); /******************************************************************************* ** @@ -977,7 +992,7 @@ L2C_API extern BOOLEAN L2CA_RegisterFixedChannel (UINT16 fixed_cid, tL2CAP_FIXE ** Return value: TRUE if connection started ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR bd_addr); +extern BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR bd_addr); /******************************************************************************* ** @@ -993,7 +1008,7 @@ L2C_API extern BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR bd_addr) ** L2CAP_DW_FAILED, if error ** *******************************************************************************/ -L2C_API extern UINT16 L2CA_SendFixedChnlData (UINT16 fixed_cid, BD_ADDR rem_bda, BT_HDR *p_buf); +extern UINT16 L2CA_SendFixedChnlData (UINT16 fixed_cid, BD_ADDR rem_bda, BT_HDR *p_buf); /******************************************************************************* ** @@ -1008,7 +1023,7 @@ L2C_API extern UINT16 L2CA_SendFixedChnlData (UINT16 fixed_cid, BD_ADDR rem_bda, ** Return value: TRUE if channel removed ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_RemoveFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda); +extern BOOLEAN L2CA_RemoveFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda); /******************************************************************************* ** @@ -1027,7 +1042,7 @@ L2C_API extern BOOLEAN L2CA_RemoveFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda); ** Returns TRUE if command succeeded, FALSE if failed ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_SetFixedChannelTout (BD_ADDR rem_bda, UINT16 fixed_cid, UINT16 idle_tout); +extern BOOLEAN L2CA_SetFixedChannelTout (BD_ADDR rem_bda, UINT16 fixed_cid, UINT16 idle_tout); #endif /* (L2CAP_NUM_FIXED_CHNLS > 0) */ @@ -1044,74 +1059,9 @@ L2C_API extern BOOLEAN L2CA_SetFixedChannelTout (BD_ADDR rem_bda, UINT16 fixed_c ** Returns TRUE if successful ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_GetCurrentConfig (UINT16 lcid, - tL2CAP_CFG_INFO **pp_our_cfg, tL2CAP_CH_CFG_BITS *p_our_cfg_bits, - tL2CAP_CFG_INFO **pp_peer_cfg, tL2CAP_CH_CFG_BITS *p_peer_cfg_bits); - -#if (L2CAP_CORRUPT_ERTM_PKTS == TRUE) -/******************************************************************************* -** -** Function L2CA_SetupErtmTest -** -** Description This function is used for testing purposes only. -** It corrupts or drops one or more packets used with ERTM channels. -** -** Parameters -** cid - channel ID (0 uses RFCOMM PSM's CID) -** -** type - type of test to run (L2CAP_FCR_TTYPE_CORR_IFRAMES -** L2CAP_FCR_TTYPE_CORR_SFRAME -** L2CAP_FCR_TTYPE_STOP_TEST -** L2CAP_FCR_TTYPE_GET_CID - returns rfcomm cid only) -** -** is_rx - TRUE to corrupt Rx packet, FALSE for Tx packet) -** -** freq - L2CAP_FCR_FREQ_RANDOM (turns on random corruptions/drops) -** L2CAP_FCR_FREQ_NORMAL (turns on test with "count" corruptions/drops) -** -** count - number of packets in a row to drop or corrupt -** -** Returns CID of channel running test -** -*******************************************************************************/ -L2C_API extern UINT16 L2CA_SetupErtmTest (UINT16 cid, UINT8 type, BOOLEAN is_rx, UINT8 freq, UINT16 count); - -/******************************************************************************* -** -** Function L2CA_SendPolledSFrame -** -** Description This function is used for testing purposes only. -** It Sends a Polled RR or RNR to the peer -** -** Parameters -** cid - channel ID -** -** sup_type - (L2CAP_FCR_SUP_RR or L2CAP_FCR_SUP_RNR) -** -** Returns void -** -*******************************************************************************/ -L2C_API extern void L2CA_SendPolledSFrame (UINT16 cid, UINT16 sup_type); - -/******************************************************************************* -** -** Function L2CA_BypassSFrame -** -** Description This function is used for testing purposes only. -** It skips sending 'count' S-Frames. -** -** Parameters -** cid - channel ID -** -** count - Number of S-Frames to skip sending -** -** Returns void -** -*******************************************************************************/ -L2C_API extern void L2CA_BypassSFrame (UINT16 cid, UINT8 count); - -#endif /* (L2CAP_CORRUPT_ERTM_PKTS == TRUE) */ - +extern BOOLEAN L2CA_GetCurrentConfig (UINT16 lcid, + tL2CAP_CFG_INFO **pp_our_cfg, tL2CAP_CH_CFG_BITS *p_our_cfg_bits, + tL2CAP_CFG_INFO **pp_peer_cfg, tL2CAP_CH_CFG_BITS *p_peer_cfg_bits); #if (BLE_INCLUDED == TRUE) /******************************************************************************* @@ -1125,7 +1075,7 @@ L2C_API extern void L2CA_BypassSFrame (UINT16 cid, UINT8 count); ** Return value: TRUE if connection was cancelled ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_CancelBleConnectReq (BD_ADDR rem_bda); +extern BOOLEAN L2CA_CancelBleConnectReq (BD_ADDR rem_bda); /******************************************************************************* ** @@ -1138,8 +1088,8 @@ L2C_API extern BOOLEAN L2CA_CancelBleConnectReq (BD_ADDR rem_bda); ** Return value: TRUE if update started ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_UpdateBleConnParams (BD_ADDR rem_bdRa, UINT16 min_int, - UINT16 max_int, UINT16 latency, UINT16 timeout); +extern BOOLEAN L2CA_UpdateBleConnParams (BD_ADDR rem_bdRa, UINT16 min_int, + UINT16 max_int, UINT16 latency, UINT16 timeout); /******************************************************************************* ** @@ -1153,7 +1103,7 @@ L2C_API extern BOOLEAN L2CA_UpdateBleConnParams (BD_ADDR rem_bdRa, UINT16 min_in ** Return value: TRUE if update started ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_EnableUpdateBleConnParams (BD_ADDR rem_bda, BOOLEAN enable); +extern BOOLEAN L2CA_EnableUpdateBleConnParams (BD_ADDR rem_bda, BOOLEAN enable); /******************************************************************************* ** @@ -1164,7 +1114,7 @@ L2C_API extern BOOLEAN L2CA_EnableUpdateBleConnParams (BD_ADDR rem_bda, BOOLEAN ** Returns link role. ** *******************************************************************************/ -L2C_API extern UINT8 L2CA_GetBleConnRole (BD_ADDR bd_addr); +extern UINT8 L2CA_GetBleConnRole (BD_ADDR bd_addr); /******************************************************************************* ** @@ -1178,7 +1128,7 @@ L2C_API extern UINT8 L2CA_GetBleConnRole (BD_ADDR bd_addr); ** Returns disconnect reason ** *******************************************************************************/ -L2C_API extern UINT16 L2CA_GetDisconnectReason (BD_ADDR remote_bda, tBT_TRANSPORT transport); +extern UINT16 L2CA_GetDisconnectReason (BD_ADDR remote_bda, tBT_TRANSPORT transport); #endif /* (BLE_INCLUDED == TRUE) */ |