Airoha M0 BLE API  1.0.5.4
ble_l2cap.h
1 /******************************************************************************
2 Copyright (c) Airoha 2016 - All rights reserved
3 
4 FILE NAME
5  ble_l2cap.h
6 DESCRIPTION
7 NOTES
8 ********************************************************************************/
9 #ifndef __L2CAP_HH__
10 #define __L2CAP_HH__
11 
12 
25 typedef struct
26 {
27 
28  uint8_t *parm;
29  uint16_t len;
30 }cid_parm;
31 
35 typedef enum
36 {
40 }cid_event;
41 
48 typedef void (*cid_callback)(uint8_t idx, cid_event evt, cid_parm parm);
49 
50 
51 /*************************************************************************
52 * API Functions
53 *************************************************************************/
60 bool BLE_l2cap_cid_register(uint16_t cid, cid_callback cb);
61 
66 void BLE_l2cap_cid_unregister(uint16_t cid);
71 #endif
uint8_t * parm
parameter
Definition: ble_l2cap.h:28
ACL Link was disconnected.
Definition: ble_l2cap.h:39
ACL Link was connected.
Definition: ble_l2cap.h:38
PDU incomming.
Definition: ble_l2cap.h:37
bool BLE_l2cap_cid_register(uint16_t cid, cid_callback cb)
Register a fix CID.
void(* cid_callback)(uint8_t idx, cid_event evt, cid_parm parm)
Fix CID event callback function.
Definition: ble_l2cap.h:48
cid_event
fix CID event id
Definition: ble_l2cap.h:35
void BLE_l2cap_cid_unregister(uint16_t cid)
Unregister a fix CID.
Parameter for fix CID event.
Definition: ble_l2cap.h:25
uint16_t len
parameter length
Definition: ble_l2cap.h:29