40 #define L2C_CTRL_FLOW_ENABLE_IND 0 41 #define L2C_CTRL_FLOW_DISABLE_IND 1 45 #define L2C_COC_REG_ID_NONE 0 48 #define L2C_COC_CID_NONE 0 54 #define L2C_COC_ROLE_NONE 0x00 55 #define L2C_COC_ROLE_INITIATOR 0x01 56 #define L2C_COC_ROLE_ACCEPTOR 0x02 63 #define L2C_COC_DATA_SUCCESS 0 64 #define L2C_COC_DATA_ERR_MEMORY 1 65 #define L2C_COC_DATA_ERR_OVERFLOW 2 72 #define L2C_COC_CBACK_START 0x70 82 #define L2C_COC_CBACK_CBACK_END L2C_COC_DATA_CNF void L2cDataReq(uint16_t cid, uint16_t handle, uint16_t len, uint8_t *pL2cPacket)
Send an L2CAP data packet on the given CID.
Connection oriented channel registration structure.
void L2cInit(void)
Initialize L2C subsystem.
uint16_t dataLen
packet data length
uint8_t dmConnId_t
Connection identifier.
void(* l2cCocCback_t)(l2cCocEvt_t *pMsg)
This callback function sends data and other events to connection oriented channels clients...
void L2cCocDataReq(uint16_t cid, uint16_t len, uint8_t *pPayload)
Send an L2CAP data packet on the given connection oriented CID.
void L2cCocCreditSendTest(uint16_t cid, uint16_t credits)
For testing purposes only.
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...
void L2cCocDisconnectReq(uint16_t cid)
Disconnect the channel for the given CID.
wsfMsgHdr_t hdr
Header structure.
void(* l2cDataCback_t)(uint16_t handle, uint16_t len, uint8_t *pPacket)
This callback function sends a received L2CAP packet to the client.
uint8_t bool_t
Boolean data type.
uint16_t L2cCocConnectReq(dmConnId_t connId, l2cCocRegId_t regId, uint16_t psm)
Initiate a connection to the given peer PSM.
uint16_t(* l2cCocAuthorCback_t)(dmConnId_t connId, l2cCocRegId_t regId, uint16_t psm)
This callback function is used for authoriztion of connection oriented channels.
uint8_t role
Channel initiator/acceptor role.
bool_t authoriz
TRUE if authorization is required.
l2cCocDisconnectInd_t disconnectInd
Channel disconnect indication.
uint16_t cid
Local channel ID.
Connection oriented channel disconnect indication structure.
Received data indication.
Connection oriented channel connect indication structure.
wsfMsgHdr_t hdr
Header structure.
l2cCocConnectInd_t connectInd
Channel connect indication.
Connection oriented channel event structure.
L2CAP constants and definitions from the Bluetooth specification.
void L2cCocInit(void)
Initialize L2C connection oriented channel subsystem.
uint8_t secLevel
Channel minimum security level requirements.
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.
l2cCocDataInd_t dataInd
Received data indication.
void(* l2cCtrlCback_t)(wsfMsgHdr_t *pMsg)
This callback function sends control messages to the client.
Connection specification type.
uint16_t l2cCocRegId_t
Connection oriented channel registration ID.
uint16_t credits
Data packet receive credits for this channel.
void L2cSlaveInit(void)
Initialize L2C for operation as a Bluetooth LE slave.
uint16_t mps
Maximum receive PDU fragment size.
Connection oriented channel data indication structure.
uint8_t * pData
Pointer to packet data.
l2cCocDataCnf_t dataCnf
Transmit data confirm.
void L2cCocErrorTest(uint16_t result)
For testing purposes only.
uint16_t cid
Local channel ID.
uint16_t reqTimeout
Request timeout in seconds.
Device Manager subsystem API.
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.
Channel connect indication.
Connection oriented channel disconnect indication structure.
unsigned short uint16_t
Unsigned 16-bit value.
uint16_t psm
Connected PSM.
wsfMsgHdr_t hdr
Header structure.
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...
uint16_t psm
Protocol service multiplexer.
uint16_t mtu
Maximum receive data packet size.
uint16_t cid
Local channel ID.
void L2cCocDeregister(l2cCocRegId_t regId)
Deregister and deallocate a connection oriented channel registration instance. This function should o...
wsfMsgHdr_t hdr
Header structure.
uint16_t peerMtu
Data packet MTU peer can receive.
uint16_t result
Connection failure result code.
wsfMsgHdr_t hdr
Header structure.
void L2cMasterInit(void)
Initialize L2C for operation as a Bluetooth LE master.
Common message structure passed to event handler.
#define L2C_COC_CBACK_START
L2C callback event starting value.
uint16_t cid
Local channel ID.
unsigned char uint8_t
Unsigned 8-bit value.
l2cCfg_t * pL2cCfg
Configuration pointer.
Channel disconnect indication.