InPlay API
in_ble_l2cc_evt.h
1 
13 #ifndef L2CC_EVT_H
14 #define L2CC_EVT_H
15 
16 #include "./ble/in_ble_evt.h"
17 
27 /*
28  * Enumerations
29  ****************************************************************************************
30  */
32 enum in_ble_l2cap_evt{
34  L2CAP_EVT_LECB_CONN_REQ = L2CAP_EVT_CODE +1,
35 
37  L2CAP_EVT_LECB_CONN_IND,
38 
40  L2CAP_EVT_LECB_DISCONNECT,
41 
43  L2CAP_EVT_LECB_SDU_RECV,
44 
45 };
46 
47 /*
48  * Structures
49  ****************************************************************************************
50  */
51 
53 typedef struct
54 {
56  uint8_t conidx;
58  uint16_t le_psm;
60  uint16_t peer_cid;
62  uint16_t peer_mtu;
64  uint16_t peer_mps;
66 
67 
69 typedef struct
70 {
72  uint8_t conidx;
75 
77 
79 typedef struct
80 {
82  uint8_t conidx;
84  uint16_t local_cid;
86  uint8_t reason;
88 
90 typedef struct
91 {
93  uint16_t cid;
95  uint16_t credit;
97  uint16_t length;
99  uint8_t data[];
100 } sdu_t;
101 
103 typedef struct
104 {
106  uint8_t conidx;
108  uint8_t status;
112 
113 
115 
116 #endif
uint8_t conidx
Connection index.
Definition: in_ble_l2cc_evt.h:72
ble_lecb_connect_ind_t lecb_conn_ind
Connected parameters.
Definition: in_ble_l2cc_evt.h:74
uint8_t conidx
Connection index.
Definition: in_ble_l2cc_evt.h:56
LE credit based connection request indication.
Definition: in_ble_l2cc_evt.h:53
Default L2Cap SDU definition.
Definition: in_ble_l2cc_evt.h:90
uint8_t conidx
Connection index.
Definition: in_ble_l2cc_evt.h:106
uint16_t peer_mps
Maximum Packet size.
Definition: in_ble_l2cc_evt.h:64
uint8_t conidx
Connection index.
Definition: in_ble_l2cc_evt.h:82
uint8_t status
Status information.
Definition: in_ble_l2cc_evt.h:108
LE credit based connection indication.
Definition: in_ble_l2cc_evt.h:69
LE credit based disconnect indication.
Definition: in_ble_l2cc_evt.h:79
uint16_t peer_cid
Peer Channel identifier.
Definition: in_ble_l2cc_evt.h:60
LE credit based connection indication.
Definition: in_ble_l2cc.h:68
uint16_t cid
Channel Identifier.
Definition: in_ble_l2cc_evt.h:93
uint16_t le_psm
LE Protocol/Service Multiplexer.
Definition: in_ble_l2cc_evt.h:58
uint16_t local_cid
Local Channel identifier.
Definition: in_ble_l2cc_evt.h:84
uint8_t reason
Reason.
Definition: in_ble_l2cc_evt.h:86
L2CAP event code start with 0x0200.
Definition: in_ble_evt.h:35
uint16_t length
SDU Data length.
Definition: in_ble_l2cc_evt.h:97
uint16_t peer_mtu
Maximum SDU size.
Definition: in_ble_l2cc_evt.h:62
uint16_t credit
Number of credit used.
Definition: in_ble_l2cc_evt.h:95
Inform that a data packet has been received from a LE Credit Based connection.
Definition: in_ble_l2cc_evt.h:103
sdu_t sdu
SDU information.
Definition: in_ble_l2cc_evt.h:110