TI BLE-Stack for Bluetooth 4.2 API Documentation
3.01.00.07
|
This module implements the Logical Link Control and Adaption Protocol For a detailed usage section describing how to send these commands and receive events, see the L2CAP Section of the User's Guide. More...
Modules | |
L2CAP Callbacks | |
L2CAP Constants | |
L2CAP Data Structures | |
L2CAP Events | |
Files | |
file | l2cap.h |
L2CAP layer interface. | |
Functions | |
void * | L2CAP_bm_alloc (uint16 size) |
L2CAP implementation of the allocator functionality. More... | |
uint16 | L2CAP_BuildCmdReject (uint8 *pBuf, uint8 *pCmd) |
Build Command Reject. More... | |
uint16 | L2CAP_BuildConnectReq (uint8 *pBuf, uint8 *pData) |
Build Connection Request. More... | |
uint16 | L2CAP_BuildInfoRsp (uint8 *pBuf, uint8 *pData) |
Build Information Response. More... | |
uint16 | L2CAP_BuildParamUpdateRsp (uint8 *pBuf, uint8 *pData) |
Build Connection Parameter Update Response. More... | |
bStatus_t | L2CAP_ChannelInfo (uint16 CID, l2capChannelInfo_t *pInfo) |
Get information about a given active Connection Oriented Channel. More... | |
bStatus_t | L2CAP_CmdReject (uint16 connHandle, uint8 id, l2capCmdReject_t *pCmdReject) |
Send Command Reject. More... | |
bStatus_t | L2CAP_ConnectReq (uint16 connHandle, uint16 psm, uint16 peerPsm) |
Send Connection Request. More... | |
bStatus_t | L2CAP_ConnectRsp (uint16 connHandle, uint8 id, uint16 result) |
Send Connection Response. More... | |
bStatus_t | L2CAP_ConnParamUpdateReq (uint16 connHandle, l2capParamUpdateReq_t *pUpdateReq, uint8 taskId) |
Send Connection Parameter Update Request. More... | |
bStatus_t | L2CAP_ConnParamUpdateRsp (uint16 connHandle, uint8 id, l2capParamUpdateRsp_t *pUpdateRsp) |
Send Connection Parameter Update Response. More... | |
bStatus_t | L2CAP_DeregisterPsm (uint8 taskId, uint16 psm) |
Deregister a Protocol/Service Multiplexer with L2CAP. More... | |
bStatus_t | L2CAP_DisconnectReq (uint16 CID) |
Send Disconnection Request. More... | |
bStatus_t | L2CAP_FlowCtrlCredit (uint16 CID, uint16 peerCredits) |
Send Flow Control Credit. More... | |
uint16 | L2CAP_GetMTU (void) |
Get the maximum payload size that L2CAP is capable of receiving. More... | |
uint16 | L2CAP_GetParamValue (void) |
Get the L2CAP parameter value. More... | |
void | L2CAP_HostNumCompletedPkts (uint16 connHandle, uint16 numCompletedPkts) |
Host Number of Completed Packets. More... | |
bStatus_t | L2CAP_InfoReq (uint16 connHandle, l2capInfoReq_t *pInfoReq, uint8 taskId) |
Send Information Request. More... | |
bStatus_t | L2CAP_ParseConnectReq (l2capSignalCmd_t *pCmd, uint8 *pData, uint16 len) |
Parse Connection Request message. More... | |
bStatus_t | L2CAP_ParseFlowCtrlCredit (l2capSignalCmd_t *pCmd, uint8 *pData, uint16 len) |
Parse Flow Control Credit message. More... | |
bStatus_t | L2CAP_ParseInfoReq (l2capSignalCmd_t *pCmd, uint8 *pData, uint16 len) |
Parse Information Request message. More... | |
bStatus_t | L2CAP_ParseParamUpdateReq (l2capSignalCmd_t *pCmd, uint8 *pData, uint16 len) |
Parse Connection Parameter Update Request. More... | |
bStatus_t | L2CAP_PsmChannels (uint16 psm, uint8 numCIDs, uint16 *pCIDs) |
Get all active channels for a given registered PSM. More... | |
bStatus_t | L2CAP_PsmInfo (uint16 psm, l2capPsmInfo_t *pInfo) |
Get information about a given registered PSM. More... | |
bStatus_t | L2CAP_RegisterApp (uint8 taskId, uint16 CID) |
Register a protocol/application with an L2CAP fixed channel. More... | |
void | L2CAP_RegisterFlowCtrlTask (uint8 taskId) |
Register task to recevie L2CAP Flow Control events when there are data buffers available for sending messages. More... | |
bStatus_t | L2CAP_RegisterPsm (l2capPsm_t *pPsm) |
Register a Protocol/Service Multiplexer (PSM) with L2CAP. More... | |
bStatus_t | L2CAP_SendData (uint16 connHandle, l2capPacket_t *pPkt) |
Send data packet over an L2CAP fixed channel established over a physical connection. More... | |
bStatus_t | L2CAP_SendSDU (l2capPacket_t *pPkt) |
Send data packet over an L2CAP connection oriented channel established over a physical connection. More... | |
void | L2CAP_SetBufSize (uint16 dataPktLen, uint8 numDataPkts) |
This API is used by the upper layer to set the maximum data packet size and the number of data packets allowed by the Controller. More... | |
void | L2CAP_SetControllerToHostFlowCtrl (uint16 hostBuffSize, uint8 flowCtrlMode) |
Turn flow control on or off for data packets sent from the Controller to the Host. More... | |
void | L2CAP_SetParamValue (uint16 value) |
Set the L2CAP parameter value. More... | |
void | L2CAP_SetUserConfig (l2capUserCfg_t *pUserCfg) |
Set the user configurable variables for the L2CAP layer. More... | |
This module implements the Logical Link Control and Adaption Protocol For a detailed usage section describing how to send these commands and receive events, see the L2CAP Section of the User's Guide.
void* L2CAP_bm_alloc | ( | uint16 | size | ) |
L2CAP implementation of the allocator functionality.
size | - number of bytes to allocate from the heap. |
uint16 L2CAP_BuildCmdReject | ( | uint8 * | pBuf, |
uint8 * | pCmd | ||
) |
Build Command Reject.
pBuf | - pointer to buffer to hold command data |
pCmd | - pointer to command data |
uint16 L2CAP_BuildConnectReq | ( | uint8 * | pBuf, |
uint8 * | pData | ||
) |
Build Connection Request.
pBuf | - pointer to buffer to hold command data |
pData | - pointer to command data |
uint16 L2CAP_BuildInfoRsp | ( | uint8 * | pBuf, |
uint8 * | pData | ||
) |
Build Information Response.
pBuf | - pointer to buffer to hold command data |
pData | - pointer to command data |
uint16 L2CAP_BuildParamUpdateRsp | ( | uint8 * | pBuf, |
uint8 * | pData | ||
) |
Build Connection Parameter Update Response.
pBuf | - pointer to buffer to hold command data |
pData | - pointer to command data |
bStatus_t L2CAP_ChannelInfo | ( | uint16 | CID, |
l2capChannelInfo_t * | pInfo | ||
) |
Get information about a given active Connection Oriented Channel.
CID | - local channel id. |
pInfo | - structure to copy channel info into. |
bStatus_t L2CAP_CmdReject | ( | uint16 | connHandle, |
uint8 | id, | ||
l2capCmdReject_t * | pCmdReject | ||
) |
Send Command Reject.
connHandle | - connection to use |
id | - identifier of the request packet being rejected |
pCmdReject | - pointer to Command Reject to be sent |
bStatus_t L2CAP_ConnectReq | ( | uint16 | connHandle, |
uint16 | psm, | ||
uint16 | peerPsm | ||
) |
Send Connection Request.
connHandle | - connection to create channel on |
psm | - local PSM |
peerPsm | - peer PSM |
bStatus_t L2CAP_ConnectRsp | ( | uint16 | connHandle, |
uint8 | id, | ||
uint16 | result | ||
) |
Send Connection Response.
connHandle | - connection handle |
id | - identifier received in connection request |
result | - L2CAP Connection Response Result Values |
bStatus_t L2CAP_ConnParamUpdateReq | ( | uint16 | connHandle, |
l2capParamUpdateReq_t * | pUpdateReq, | ||
uint8 | taskId | ||
) |
Send Connection Parameter Update Request.
connHandle | - connection to use |
pUpdateReq | - pointer to Update Request to be sent |
taskId | - task to be notified about result |
bStatus_t L2CAP_ConnParamUpdateRsp | ( | uint16 | connHandle, |
uint8 | id, | ||
l2capParamUpdateRsp_t * | pUpdateRsp | ||
) |
Send Connection Parameter Update Response.
connHandle | - connection to use |
id | - identifier received in request |
pUpdateRsp | - pointer to Update Response to be sent |
bStatus_t L2CAP_DeregisterPsm | ( | uint8 | taskId, |
uint16 | psm | ||
) |
Deregister a Protocol/Service Multiplexer with L2CAP.
taskId | - task PSM belongs to. |
psm | - PSM to deregister. |
bStatus_t L2CAP_DisconnectReq | ( | uint16 | CID | ) |
Send Disconnection Request.
CID | - local CID to disconnect |
bStatus_t L2CAP_FlowCtrlCredit | ( | uint16 | CID, |
uint16 | peerCredits | ||
) |
Send Flow Control Credit.
CID | - local CID |
peerCredits | - number of credits to give to peer device |
uint16 L2CAP_GetMTU | ( | void | ) |
Get the maximum payload size that L2CAP is capable of receiving.
uint16 L2CAP_GetParamValue | ( | void | ) |
Get the L2CAP parameter value.
void L2CAP_HostNumCompletedPkts | ( | uint16 | connHandle, |
uint16 | numCompletedPkts | ||
) |
Host Number of Completed Packets.
This API is used by the upper layer to notify L2CAP of the number of data packets that have been completed for connection handle since this API was previously called.
connHandle | - connection handle |
numCompletedPkts | - number of completed packets |
bStatus_t L2CAP_InfoReq | ( | uint16 | connHandle, |
l2capInfoReq_t * | pInfoReq, | ||
uint8 | taskId | ||
) |
Send Information Request.
connHandle | - connection to use |
pInfoReq | - pointer to Info Request to be sent |
taskId | - task to be notified about result |
bStatus_t L2CAP_ParseConnectReq | ( | l2capSignalCmd_t * | pCmd, |
uint8 * | pData, | ||
uint16 | len | ||
) |
bStatus_t L2CAP_ParseFlowCtrlCredit | ( | l2capSignalCmd_t * | pCmd, |
uint8 * | pData, | ||
uint16 | len | ||
) |
bStatus_t L2CAP_ParseInfoReq | ( | l2capSignalCmd_t * | pCmd, |
uint8 * | pData, | ||
uint16 | len | ||
) |
bStatus_t L2CAP_ParseParamUpdateReq | ( | l2capSignalCmd_t * | pCmd, |
uint8 * | pData, | ||
uint16 | len | ||
) |
bStatus_t L2CAP_PsmChannels | ( | uint16 | psm, |
uint8 | numCIDs, | ||
uint16 * | pCIDs | ||
) |
Get all active channels for a given registered PSM.
psm | - PSM Id. |
numCIDs | - number of CIDs can be copied. |
pCIDs | - structure to copy CIDs into. |
bStatus_t L2CAP_PsmInfo | ( | uint16 | psm, |
l2capPsmInfo_t * | pInfo | ||
) |
Get information about a given registered PSM.
psm | - PSM Id. |
pInfo | - structure to copy PSM info into. |
bStatus_t L2CAP_RegisterApp | ( | uint8 | taskId, |
uint16 | CID | ||
) |
Register a protocol/application with an L2CAP fixed channel.
taskId | - task to be registered with channel. |
CID | - fixed channel ID. |
void L2CAP_RegisterFlowCtrlTask | ( | uint8 | taskId | ) |
Register task to recevie L2CAP Flow Control events when there are data buffers available for sending messages.
taskId | - Application's task ID. |
bStatus_t L2CAP_RegisterPsm | ( | l2capPsm_t * | pPsm | ) |
Register a Protocol/Service Multiplexer (PSM) with L2CAP.
pPsm | - pointer to PSM structure. |
bStatus_t L2CAP_SendData | ( | uint16 | connHandle, |
l2capPacket_t * | pPkt | ||
) |
Send data packet over an L2CAP fixed channel established over a physical connection.
connHandle | - connection to be used. |
pPkt | - pointer to packet to be sent. |
bStatus_t L2CAP_SendSDU | ( | l2capPacket_t * | pPkt | ) |
Send data packet over an L2CAP connection oriented channel established over a physical connection.
Note: Packet 'pPayload' must be allocated using L2CAP_bm_alloc().
pPkt | - pointer to packet to be sent. |
void L2CAP_SetBufSize | ( | uint16 | dataPktLen, |
uint8 | numDataPkts | ||
) |
This API is used by the upper layer to set the maximum data packet size and the number of data packets allowed by the Controller.
dataPktLen | - data packet size |
numDataPkts | - number of data packets |
void L2CAP_SetControllerToHostFlowCtrl | ( | uint16 | hostBuffSize, |
uint8 | flowCtrlMode | ||
) |
Turn flow control on or off for data packets sent from the Controller to the Host.
hostBuffSize | - total data buffer available on Host |
flowCtrlMode | - flow control mode: TRUE or FALSE |
void L2CAP_SetParamValue | ( | uint16 | value | ) |
Set the L2CAP parameter value.
Use this function to change the default L2CAP parameter value.
value | - new parameter value |
void L2CAP_SetUserConfig | ( | l2capUserCfg_t * | pUserCfg | ) |
Set the user configurable variables for the L2CAP layer.
pUserCfg | - pointer to user configuration |