| 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 {
37 cid_event_l2cap_pdu = 0,
38 cid_event_link_connected,
39 cid_event_link_disconnected
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
cid_parm::parm
uint8_t * parm
parameter
Definition: ble_l2cap.h:28
cid_event_link_disconnected
ACL Link was disconnected.
Definition: ble_l2cap.h:39
cid_event_link_connected
ACL Link was connected.
Definition: ble_l2cap.h:38
cid_event_l2cap_pdu
PDU incomming.
Definition: ble_l2cap.h:37
BLE_l2cap_cid_register
bool BLE_l2cap_cid_register(uint16_t cid, cid_callback cb)
Register a fix CID.
cid_callback
void(* cid_callback)(uint8_t idx, cid_event evt, cid_parm parm)
Fix CID event callback function.
Definition: ble_l2cap.h:48
cid_event
cid_event
fix CID event id
Definition: ble_l2cap.h:35
BLE_l2cap_cid_unregister
void BLE_l2cap_cid_unregister(uint16_t cid)
Unregister a fix CID.
cid_parm
Parameter for fix CID event.
Definition: ble_l2cap.h:25
cid_parm::len
uint16_t len
parameter length
Definition: ble_l2cap.h:29