InPlay API
in_ble_l2cc.h
1 
13 #ifndef IN_BLE_L2CC_H
14 #define IN_BLE_L2CC_H
15 
25 #include <stdint.h>
26 
27 /*
28  * DEFINES
29  ****************************************************************************************
30  */
31 
32 /*
33  * Macros
34  ****************************************************************************************
35  */
36 
37 
38 /*
39  * Enumerations
40  ****************************************************************************************
41  */
42 
43 /*
44  * Structures
45  ****************************************************************************************
46  */
47 
49 typedef struct
50 {
52  uint8_t pkt_id;
54  uint16_t le_psm;
56  uint16_t local_cid;
60  uint16_t local_credit;
62  uint16_t local_mtu;
64  uint16_t local_mps;
66 
68 typedef struct
69 {
71  uint8_t status;
73  uint16_t le_psm;
75  uint16_t local_cid;
77  uint16_t peer_credit;
79  uint16_t peer_mtu;
81  uint16_t peer_mps;
83 
85 typedef struct
86 {
88  uint16_t peer_cid;
90  bool accept;
92  uint16_t local_cid;
96  uint16_t local_credit;
98  uint16_t local_mtu;
100  uint16_t local_mps;
102 
103 
104 /*
105  * APIs
106  ****************************************************************************************
107  */
108 
120 int in_ble_lecb_connect(void *hdl, int conidx, ble_lecb_connect_t *p_conx, ble_lecb_connect_ind_t *p_ind, comp_cb callback);
121 
132 int in_ble_lecb_connect_req_cfm(void *hdl, uint8_t conidx, ble_lecb_connect_cfm_t *p_cfm);
133 
144 int in_ble_lecb_disconnect(void *hdl, int conidx, int local_cid, comp_cb callback);
145 
157 int in_ble_lecb_add_credit(void *hdl, int conidx, int local_cid, int credit, comp_cb callback);
158 
171 int in_ble_lecb_sdu_send(void *hdl, int conidx, int local_cid, uint8_t *data, int data_length, comp_cb callback);
172 
173 
175 
176 #endif /* IN_BLE_GAP_H */
177 
uint16_t local_cid
Local Channel identifier.
Definition: in_ble_l2cc.h:75
uint16_t peer_cid
Peer Channel identifier.
Definition: in_ble_l2cc.h:88
int in_ble_lecb_connect(void *hdl, int conidx, ble_lecb_connect_t *p_conx, ble_lecb_connect_ind_t *p_ind, comp_cb callback)
LE credit based connection request.
int in_ble_lecb_add_credit(void *hdl, int conidx, int local_cid, int credit, comp_cb callback)
LE credit based credit addition.
bool accept
True to accept the incoming connection, False else.
Definition: in_ble_l2cc.h:90
uint16_t le_psm
LE Protocol/Service Multiplexer.
Definition: in_ble_l2cc.h:73
uint8_t status
Status.
Definition: in_ble_l2cc.h:71
LE credit based connection indication.
Definition: in_ble_l2cc.h:68
LE credit based connection request confirmation.
Definition: in_ble_l2cc.h:85
uint16_t peer_mtu
Maximum SDU size.
Definition: in_ble_l2cc.h:79
uint16_t local_mps
Maximum Packet size - Shall not exceed device MPS.
Definition: in_ble_l2cc.h:64
uint16_t le_psm
LE Protocol/Service Multiplexer.
Definition: in_ble_l2cc.h:54
int in_ble_lecb_connect_req_cfm(void *hdl, uint8_t conidx, ble_lecb_connect_cfm_t *p_cfm)
LE credit based connection request confirmation.
int in_ble_lecb_sdu_send(void *hdl, int conidx, int local_cid, uint8_t *data, int data_length, comp_cb callback)
LE Send data over an LE Credit Based Connection.
uint16_t peer_credit
Destination Credit for the LE Credit Based Connection.
Definition: in_ble_l2cc.h:77
int in_ble_lecb_disconnect(void *hdl, int conidx, int local_cid, comp_cb callback)
LE credit based disconnect request.
uint16_t local_mps
Maximum Packet size - Shall not exceed device MPS.
Definition: in_ble_l2cc.h:100
uint16_t local_cid
Local Channel identifier (0: automatically allocate a free channel)
Definition: in_ble_l2cc.h:92
uint16_t local_credit
Definition: in_ble_l2cc.h:60
uint16_t peer_mps
Maximum Packet size.
Definition: in_ble_l2cc.h:81
uint16_t local_credit
Definition: in_ble_l2cc.h:96
uint16_t local_mtu
Maximum SDU size - Shall not exceed device MTU.
Definition: in_ble_l2cc.h:62
uint16_t local_cid
Local Channel identifier (0: automatically allocate a free channel)
Definition: in_ble_l2cc.h:56
uint16_t local_mtu
Maximum SDU size - Shall not exceed device MTU.
Definition: in_ble_l2cc.h:98
uint8_t pkt_id
parameter used for internal usage
Definition: in_ble_l2cc.h:52
LE credit based connection request.
Definition: in_ble_l2cc.h:49