ble_l2cap.h File Reference

BLE L2CAP API. More...

#include "ble_error.h"
#include "gr55xx_sys_cfg.h"
#include <stdint.h>
#include <stdbool.h>
+ Include dependency graph for ble_l2cap.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ble_l2cap_lecb_conn_req_t
 The parameter of LE credit based connection request packet sending. More...
 
struct  ble_l2cap_lecb_cfm_conn_t
 LE credit based connection confirm parameter. More...
 
struct  ble_l2cap_lecb_add_credits_t
 LE flow control credit packet parameter. More...
 
struct  ble_l2cap_lecb_sdu_t
 SDU packet parameter. More...
 
struct  ble_l2cap_evt_conn_req_t
 L2cap Connect Request event for BLE_L2CAP_EVT_CONN_REQ. More...
 
struct  ble_l2cap_evt_conn_ind_t
 L2cap Connected Indicate event for BLE_L2CAP_EVT_CONN_IND. More...
 
struct  ble_l2cap_evt_add_credits_ind_t
 L2cap Credits Add Indicate event for BLE_L2CAP_EVT_ADD_CREDITS_IND. More...
 
struct  ble_l2cap_evt_disconnect_t
 L2cap disconnect event for BLE_L2CAP_EVT_DISCONNECTED. More...
 
struct  ble_l2cap_evt_sdu_recv_t
 L2cap SDU Receive event for BLE_L2CAP_EVT_SDU_RECV. More...
 
struct  ble_l2cap_evt_sdu_send_t
 L2cap SDU Send event for BLE_L2CAP_EVT_SDU_SEND. More...
 
struct  ble_l2cap_evt_add_credits_cplt_t
 L2cap Credits Add Completed event for BLE_GATTC_EVT_NTF_IND. More...
 
struct  ble_l2cap_evt_t
 BLE L2cap event structure. More...
 

Enumerations

enum  ble_l2cap_lecb_disconn_reason_t { BLE_L2CAP_REMOTE_USER_TERM_CON = 0x00, BLE_L2CAP_LOCAL_USER_TERM_CON = 0x01 }
 LE credit based disconnection reasons. More...
 

Functions

uint16_t ble_l2cap_lecb_conn_create (uint8_t conn_idx, const ble_l2cap_lecb_conn_req_t *p_conn_req)
 Create the LE credit based connection. More...
 
uint16_t ble_l2cap_lecb_conn_cfm (uint8_t conn_idx, const ble_l2cap_lecb_cfm_conn_t *p_cfm_conn)
 Confirm the LE credit based connection after receiving the connection request packet from the peer device. More...
 
uint16_t ble_l2cap_lecb_disconnect (uint8_t conn_idx, uint16_t local_cid)
 Disconnect the LE credit based connection. More...
 
uint16_t ble_l2cap_lecb_credits_add (uint8_t conn_idx, const ble_l2cap_lecb_add_credits_t *p_add_credits)
 Send a LE Flow Control Credit packet when the device is capable of receiving additional LE-frames (for example after the device has processed the sdu). More...
 
uint16_t ble_l2cap_lecb_sdu_send (uint8_t conn_idx, const ble_l2cap_lecb_sdu_t *p_sdu)
 Send an SDU packet to the peer device. More...
 
uint16_t ble_l2cap_lecb_psm_register (uint16_t le_psm)
 Register PSM. More...
 

Detailed Description

BLE L2CAP API.

Attention
Copyright (c) 2019 GOODIX

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file ble_l2cap.h.