![]() |
Cordio Stack and Cordio Profiles
r2p3-02rel0
|
L2CAP subsystem API. More...
Go to the source code of this file.
Data Structures | |
struct | l2cCocReg_t |
Connection oriented channel registration structure. More... | |
struct | l2cCocConnectInd_t |
Connection oriented channel connect indication structure. More... | |
struct | l2cCocDisconnectInd_t |
Connection oriented channel disconnect indication structure. More... | |
struct | l2cCocDataInd_t |
Connection oriented channel data indication structure. More... | |
struct | l2cCocDataCnf_t |
Connection oriented channel disconnect indication structure. More... | |
union | l2cCocEvt_t |
Connection oriented channel event structure. More... | |
struct | l2cCfg_t |
Configurable parameters. More... | |
Macros | |
#define | L2C_COC_REG_ID_NONE 0 |
Invalid channel registration ID for connection oriented channels. | |
#define | L2C_COC_CID_NONE 0 |
Invalid channel ID for connection oriented channels. | |
L2CAP Control Callback Events | |
Control callback message events | |
#define | L2C_CTRL_FLOW_ENABLE_IND 0 |
Data flow enabled. | |
#define | L2C_CTRL_FLOW_DISABLE_IND 1 |
Data flow disabled. | |
L2CAP COC Channel Roles | |
Connection oriented channel initiator/acceptor role | |
#define | L2C_COC_ROLE_NONE 0x00 |
No role (unallocated) | |
#define | L2C_COC_ROLE_INITIATOR 0x01 |
Channel initiator. | |
#define | L2C_COC_ROLE_ACCEPTOR 0x02 |
Channel acceptor. | |
L2CAP COC Data Confirm Codes | |
Connection oriented channel data confirm status values | |
#define | L2C_COC_DATA_SUCCESS 0 |
Data request successful. | |
#define | L2C_COC_DATA_ERR_MEMORY 1 |
Out of memory. | |
#define | L2C_COC_DATA_ERR_OVERFLOW 2 |
Transaction overflow. | |
Typedefs | |
typedef uint16_t | l2cCocRegId_t |
Connection oriented channel registration ID. | |
typedef void(* | l2cDataCback_t) (uint16_t handle, uint16_t len, uint8_t *pPacket) |
This callback function sends a received L2CAP packet to the client. More... | |
typedef void(* | l2cCtrlCback_t) (wsfMsgHdr_t *pMsg) |
This callback function sends control messages to the client. More... | |
typedef void(* | l2cCocCback_t) (l2cCocEvt_t *pMsg) |
This callback function sends data and other events to connection oriented channels clients. More... | |
typedef uint16_t(* | l2cCocAuthorCback_t) (dmConnId_t connId, l2cCocRegId_t regId, uint16_t psm) |
This callback function is used for authoriztion of connection oriented channels. More... | |
Functions | |
L2CAP Initialization | |
Initialization and registration functions | |
void | L2cInit (void) |
Initialize L2C subsystem. More... | |
void | L2cMasterInit (void) |
Initialize L2C for operation as a Bluetooth LE master. More... | |
void | L2cSlaveInit (void) |
Initialize L2C for operation as a Bluetooth LE slave. More... | |
L2CAP CID Functions | |
Register and send data over a CID | |
void | L2cRegister (uint16_t cid, l2cDataCback_t dataCback, l2cCtrlCback_t ctrlCback) |
called by the L2C client, such as ATT or SMP, to register for the given CID. More... | |
void | L2cDataReq (uint16_t cid, uint16_t handle, uint16_t len, uint8_t *pL2cPacket) |
Send an L2CAP data packet on the given CID. More... | |
L2CAP COC Functions | |
Connection Oriented Channels Functions | |
void | L2cCocInit (void) |
Initialize L2C connection oriented channel subsystem. More... | |
l2cCocRegId_t | L2cCocRegister (l2cCocCback_t cback, l2cCocReg_t *pReg) |
Register to use a connection oriented channel, as either a channel acceptor, initiator, or both. If registering as channel acceptor then the PSM is specified. After registering a connection can be established by the client using this registration instance. More... | |
void | L2cCocDeregister (l2cCocRegId_t regId) |
Deregister and deallocate a connection oriented channel registration instance. This function should only be called if there are no active channels using this registration instance. More... | |
uint16_t | L2cCocConnectReq (dmConnId_t connId, l2cCocRegId_t regId, uint16_t psm) |
Initiate a connection to the given peer PSM. More... | |
void | L2cCocDisconnectReq (uint16_t cid) |
Disconnect the channel for the given CID. More... | |
void | L2cCocDataReq (uint16_t cid, uint16_t len, uint8_t *pPayload) |
Send an L2CAP data packet on the given connection oriented CID. More... | |
void | L2cCocErrorTest (uint16_t result) |
For testing purposes only. More... | |
void | L2cCocCreditSendTest (uint16_t cid, uint16_t credits) |
For testing purposes only. More... | |
L2CAP Connection Parameter Update Functions | |
void | L2cDmConnUpdateReq (uint16_t handle, hciConnSpec_t *pConnSpec) |
For internal use only. This function is called by DM to send an L2CAP connection update request. More... | |
void | L2cDmConnUpdateRsp (uint8_t identifier, uint16_t handle, uint16_t result) |
For internal use only. This function is called by DM to send an L2CAP connection update response. More... | |
Variables | |
L2CAP Configuration Structure | |
Pointer to structure containing initialization details of the L2CAP Subsystem. To be configured by Application. | |
l2cCfg_t * | pL2cCfg |
Configuration pointer. | |
L2CAP COC Callback Events | |
#define | L2C_COC_CBACK_START 0x70 |
L2C callback event starting value. | |
#define | L2C_COC_CBACK_CBACK_END L2C_COC_DATA_CNF |
L2C callback event ending value. | |
enum | { L2C_COC_CONNECT_IND = L2C_COC_CBACK_START, L2C_COC_DISCONNECT_IND, L2C_COC_DATA_IND, L2C_COC_DATA_CNF } |
COC callback events. More... | |
L2CAP subsystem API.
Copyright (c) 2009-2018 Arm Ltd. All Rights Reserved. ARM Ltd. confidential and proprietary.
IMPORTANT. Your use of this file is governed by a Software License Agreement ("Agreement") that must be accepted in order to download or otherwise receive a copy of this file. You may not use or copy this file for any purpose other than as described in the Agreement. If you do not agree to all of the terms of the Agreement do not use this file and delete all copies in your possession or control; if you do not have a copy of the Agreement, you must contact ARM Ltd. prior to any use, copying or further distribution of this software.
Definition in file l2c_api.h.