ble_l2cap.h File Reference

BLE L2CAP API. More...

#include "ble_error.h"
#include "gr55xx_sys_cfg.h"
#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  lecb_conn_req_t
 The parameter of LE credit based connection request packet sending. More...
 
struct  lecb_cfm_conn_t
 LE credit based connection confirm parameter. More...
 
struct  lecb_add_credits_t
 LE flow control credit packet parameter.
More...
 
struct  lecb_sdu_t
 SDU packet parameter. More...
 
struct  lecb_conn_req_ind_t
 Receive LE credit based connection request packet indication. More...
 
struct  lecb_conn_ind_t
 LE credit based connection created indication. More...
 
struct  lecb_disconn_ind_t
 LE credit based disconnect indication. More...
 
struct  lecb_add_credits_ind_t
 LE credit based connection addition indication. More...
 
struct  lecb_sdu_send_evt_t
 LE credit based SDU sending complete event. More...
 
struct  l2cap_lecb_cb_fun_t
 Callback registered by APP. More...
 

Enumerations

enum  lecb_disconnect_reason_t { REMOTE_USER_TERM_CON = 0x00, LOCAL_USER_TERM_CON = 0x01 }
 LE credit based disconnection reasons. More...
 

Functions

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. More...
 
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 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 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 lecb_sdu_t *p_sdu)
 Send an SDU packet to the peer device. More...
 
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. 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.