Go to the documentation of this file.
49 #ifndef __BLE_L2CAP_H__
50 #define __BLE_L2CAP_H__
179 void (*app_l2cap_lecb_conn_cb)(uint8_t conn_idx, uint8_t status,
lecb_conn_ind_t *p_conn_ind);
181 void (*app_l2cap_lecb_disconn_cb)(uint8_t conn_idx, uint8_t status,
lecb_disconn_ind_t *p_disconn_ind);
182 void (*app_l2cap_lecb_sdu_recv_cb)(uint8_t conn_idx,
lecb_sdu_t *p_sdu);
183 void (*app_l2cap_lecb_sdu_send_cb)(uint8_t conn_idx, uint8_t status,
lecb_sdu_send_evt_t *p_sdu_send_evt);
184 void (*app_l2cap_lecb_credit_add_cmp_cb)(uint8_t conn_idx, uint8_t status, uint16_t local_cid);
@ LOCAL_USER_TERM_CON
Local user terminates the connection.
uint16_t peer_cid
It represents the channel endpoint on the device sending the request and receiving the response.
uint16_t local_cid
The local source channel ID.
#define __ARRAY_EMPTY
Empty Array.
uint16_t local_credits
It indicates the number of LE-frames that the peer device can send to the L2CAP layer entity sending ...
uint16_t peer_cid
It represents the channel endpoint on the device sending the request and receiving the response.
uint16_t mps
The MPS field specifies the maximum payload size (in octets) that the L2CAP layer entity sending the ...
LE credit based connection addition indication.
uint16_t mtu
The MTU field specifies the maximum SDU size (in octets) that the L2CAP layer entity sending the LE C...
LE credit based connection confirm parameter.
uint16_t credits
Number of credits that the receiving device can increment.
uint16_t mtu
The MTU field specifies the maximum SDU size (in octets) that the L2CAP layer entity sending the LE C...
uint16_t ble_l2cap_lecb_disconnect(uint8_t conn_idx, uint16_t local_cid)
Disconnect the LE credit based connection.
uint16_t cid
The local source channel.
bool accept
Whether to accept the connection request.
uint16_t peer_mtu
It indicates the maximum SDU size (in octets) that the L2CAP layer entity sending the LE Credit Based...
Define the chip configuration.
uint16_t peer_credits
It indicates the number of LE-frames that the peer device can receive.
uint16_t peer_mps
It indicates the maximum payload size (in octets) that the L2CAP layer entity sending the LE Credit B...
uint16_t credits
The credits is 0 if this packet is being sent, otherwise it represents the number of credits consumed...
@ REMOTE_USER_TERM_CON
Remote user terminates the connection.
uint16_t le_psm
Le_psm number that should be registered by local device.
uint16_t local_cid
The local source channel ID.
File that contains error codes.
uint16_t ble_l2cap_lecb_sdu_send(uint8_t conn_idx, const lecb_sdu_t *p_sdu)
Send an SDU packet to the peer device.
uint16_t local_credits
The local credits indicate the number of LE-frames that the peer device can send to the L2CAP layer e...
uint8_t reason
The reason for disconnection, see lecb_disconnect_reason_t .
LE credit based disconnect indication.
uint16_t ble_l2cap_lecb_credits_add(uint8_t conn_idx, const lecb_add_credits_t *p_add_credits)
Send a LE Flow Control Credit packet when the device is capable of receiving additional LE-frames (fo...
uint16_t local_cid
The local source channel ID.
uint16_t length
The lenght of data.
LE credit based connection created indication.
uint16_t peer_added_credits
Represent number of credits the receiving device can increment.
uint16_t peer_mps
It indicates the maximum payload size (in octets) that the L2CAP layer entity sending the LE Credit B...
uint16_t le_psm
Le_psm number.
uint16_t cid
Channel ID that is the local CID.
Receive LE credit based connection request packet indication.
uint16_t ble_l2cap_lecb_conn_cfm(uint8_t conn_idx, const lecb_cfm_conn_t *p_cfm_conn)
Confirm the LE credit based connection after receiving the connection request packet from the peer de...
uint16_t ble_l2cap_lecb_conn_create(uint8_t conn_idx, const lecb_conn_req_t *p_conn_req)
Create the LE credit based connection.
uint16_t local_cid
The local source channel ID.
LE flow control credit packet parameter.
uint16_t ble_l2cap_lecb_cb_register(uint16_t le_psm, const l2cap_lecb_cb_fun_t *p_cb)
Register the callback for the PSM.
uint16_t le_psm
The le_psm number.
uint16_t mps
The MPS field specifies the maximum payload size (in octets) that the L2CAP layer entity sending the ...
uint16_t local_credits
It indicates the number of LE-frames that the local device can receive.
Callback registered by APP.
uint16_t local_cid
Local CID.
LE credit based SDU sending complete event.
lecb_disconnect_reason_t
LE credit based disconnection reasons.
uint16_t credits
Number of peer credit used.
The parameter of LE credit based connection request packet sending.
uint16_t peer_mtu
It indicates the maximum SDU size (in octets) that the L2CAP layer entity sending the LE Credit Based...
uint16_t local_cid
The local CID.