42 #define ATT_METHOD_ERR 0 43 #define ATT_METHOD_MTU 1 44 #define ATT_METHOD_FIND_INFO 2 45 #define ATT_METHOD_FIND_TYPE 3 46 #define ATT_METHOD_READ_TYPE 4 47 #define ATT_METHOD_READ 5 48 #define ATT_METHOD_READ_BLOB 6 49 #define ATT_METHOD_READ_MULTIPLE 7 50 #define ATT_METHOD_READ_GROUP_TYPE 8 51 #define ATT_METHOD_WRITE 9 52 #define ATT_METHOD_WRITE_CMD 10 53 #define ATT_METHOD_PREPARE_WRITE 11 54 #define ATT_METHOD_EXECUTE_WRITE 12 55 #define ATT_METHOD_VALUE_NTF 13 56 #define ATT_METHOD_VALUE_IND 14 57 #define ATT_METHOD_VALUE_CNF 15 58 #define ATT_METHOD_READ_MULT_VAR 16 59 #define ATT_METHOD_SIGNED_WRITE_CMD 17 62 #define ATT_OPCODE_2_METHOD(op) (((op) & ~ATT_PDU_MASK_SERVER) / 2) 65 #define ATTC_MSG_START 0x00 66 #define ATTS_MSG_START 0x20 67 #define EATTC_MSG_START 0x40 68 #define EATTS_MSG_START 0x60 69 #define EATT_MSG_START 0x80 72 #define ATT_VALUE_IND_NTF_BUF_LEN (ATT_VALUE_NTF_LEN + L2C_PAYLOAD_START) 73 #define ATT_MULT_VALUE_NTF_BUF_LEN (ATT_PDU_MULT_VALUE_NTF_LEN + L2C_PAYLOAD_START) 76 #define ATT_CCB_STATUS_MTU_SENT (1<<0) 77 #define ATT_CCB_STATUS_FLOW_DISABLED (1<<1) 78 #define ATT_CCB_STATUS_TX_TIMEOUT (1<<2) 79 #define ATT_CCB_STATUS_RSP_PENDING (1<<3) 80 #define ATT_CCB_STATUS_CNF_PENDING (1<<4) 83 #define ATT_BEARER_MAX (EATT_CONN_CHAN_MAX + 1) 86 #define ATT_BEARER_SLOT_ID 0 87 #define ATT_BEARER_SLOT_INVALID 0xff 116 typedef void (*attMsgHandler_t)(
void *pMsg);
122 typedef void (*eattEventCback_t)(
wsfMsgHdr_t *pMsg);
125 typedef void (*eattL2cDataReq_t)(
attCcb_t *pCcb, uint8_t slot, uint16_t len, uint8_t *pPacket);
132 attMsgHandler_t msgCback;
133 attConnCback_t connCback;
141 attMsgHandler_t msgCback;
142 attConnCback_t connCback;
153 eattEventCback_t eattHandler;
155 eattL2cDataReq_t eattL2cDataReq;
177 void attEmptyDataCback(uint16_t handle, uint16_t len, uint8_t *pPacket);
181 attCcb_t *attCcbByHandle(uint16_t handle);
184 bool_t attUuidCmp16to128(
const uint8_t *pUuid16,
const uint8_t *pUuid128);
185 void attSetMtu(
attCcb_t *pCcb, uint8_t slot, uint16_t peerMtu, uint16_t localMtu);
186 void attExecCallback(
dmConnId_t connId, uint8_t event, uint16_t handle, uint8_t status, uint16_t mtu);
187 void *attMsgAlloc(uint16_t len);
189 void attL2cDataReq(
attCcb_t *pCcb, uint8_t slot, uint16_t len, uint8_t *pPacket);
190 uint16_t attMsgParam(
dmConnId_t connId, uint8_t slot);
191 void attDecodeMsgParam(uint16_t param,
dmConnId_t *pConnId, uint8_t *pSlot);
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(* l2cDataCback_t)(uint16_t handle, uint16_t len, uint8_t *pPacket)
This callback function sends a received L2CAP packet to the client.
void(* attCback_t)(attEvt_t *pEvt)
ATT event callback type.
Connection oriented channel event structure.
Union of DM callback event data types.
void(* l2cCtrlCback_t)(wsfMsgHdr_t *pMsg)
This callback function sends control messages to the client.
uint8_t wsfHandlerId_t
Event handler ID data type.
void(* dmCback_t)(dmEvt_t *pDmEvt)
Callback type.
Device Manager subsystem API.
General purpose queue service.
#define DM_CONN_MAX
Maximum number of connections.
Attribute protocol client and server API.
Common message structure passed to event handler.