BLE GAPC API. More...
#include "ble_error.h"
#include "gr55xx_sys_cfg.h"
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
Go to the source code of this file.
Classes | |
struct | ble_gap_dev_version_ind_t |
The struct of device version. More... | |
struct | ble_gap_addr_t |
The struct of address. More... | |
struct | ble_gap_bdaddr_t |
The struct of broadcast address with broadcast type. More... | |
struct | ble_gap_get_bd_addr_t |
Get broadcast address struct. More... | |
struct | ble_gap_dev_adv_tx_power_t |
TX power info struct. More... | |
struct | ble_gap_dev_tx_power_t |
TX power info struct. More... | |
struct | ble_gap_max_data_len_t |
Max data length info struct. More... | |
struct | ble_gap_sugg_dflt_data_len_t |
Suggested default data length info. More... | |
struct | ble_gap_nb_adv_sets_t |
Number of available advertising sets info. More... | |
struct | ble_gap_max_adv_data_len_ind_t |
Maximum advertising data length info. More... | |
struct | ble_gap_dev_rf_path_comp_ind_t |
RF path compensation values info. More... | |
struct | ble_gap_antenna_inf_t |
antenna information. More... | |
union | ble_gap_dev_info_t |
Device info. More... | |
struct | ble_gap_dev_info_get_t |
Get device info operation struct. More... | |
struct | ble_gap_rslv_addr_read_t |
Read resolvable address info struct. More... | |
struct | ble_gap_sync_established_ind_t |
Sync established indication. More... | |
struct | ble_gap_ext_adv_report_ind_t |
APP receives the extended advertising report indication info struct. More... | |
struct | ble_gap_peer_name_ind_t |
Name of peer device indication. More... | |
struct | ble_gap_conn_update_cmp_t |
Connection parameter used to update connection parameters. More... | |
struct | ble_gap_conn_param_t |
The parameter of connection. More... | |
struct | ble_gap_conn_update_param_t |
The parameter of update connection. More... | |
struct | gap_conn_cmp_t |
Connection complete info. More... | |
struct | ble_gap_chnl_map_t |
Channel map structure. More... | |
struct | ble_gap_le_phy_ind_t |
PHY info. More... | |
union | ble_gap_conn_info_t |
Connection info. More... | |
struct | ble_gap_conn_info_param_t |
The info of connecting operation. More... | |
struct | ble_gap_peer_version_ind_t |
Peer version info. More... | |
struct | ble_gap_peer_features_ind_t |
LE features info. More... | |
union | ble_gap_peer_info_t |
LE peer info. More... | |
struct | ble_gap_peer_info_param_t |
Get peer info operation struct. More... | |
struct | ble_gap_le_pkt_size_ind_t |
Supported data length size Indication. More... | |
struct | ble_gap_con_plan_tag_t |
The Structure for BLE Connection Arrangement. More... | |
struct | ble_gap_set_pref_slave_evt_dur_param_t |
Set preference slave event duration. More... | |
struct | ble_gap_dev_name_ind_t |
GAP Device name struct. More... | |
union | ble_gapc_set_dev_info_t |
Device information data struct. More... | |
struct | gapc_set_dev_info_ind_t |
GAP Device inforamtion write indication. More... | |
struct | ble_gap_per_sync_trans_param_t |
Default periodic advertising synchronization transfer parameters. More... | |
struct | ble_gap_connless_iq_report_t |
Connectionless IQ Report info. More... | |
struct | ble_gap_set_conn_cte_trans_param_t |
Set connection CTE transmit parameters info. More... | |
struct | ble_gap_set_conn_cte_rcv_param_t |
Set connection CTE receive parameters info. More... | |
struct | ble_gap_set_conn_cte_req_enable_t |
Set connection CTE Request enable info. More... | |
struct | ble_gap_conn_iq_report_t |
Connection IQ Report info. More... | |
struct | ble_gap_set_path_loss_report_param_t |
Set path loss reporting parameter info. More... | |
struct | ble_gap_tx_pwr_change_report_t |
Transmit power change reporting info. More... | |
struct | ble_gap_path_loss_threshold_report_t |
Path loss threshold reporting info. More... | |
struct | ble_gap_local_tx_pwr_read_ind_t |
Local transmit power read indication info. More... | |
struct | ble_gap_remote_tx_pwr_read_ind_t |
Remote transmit power read indication info. More... | |
struct | ble_gap_ranging_param_t |
ranging parameter. More... | |
struct | ble_gap_ranging_ind_t |
ranging indication info. More... | |
struct | ble_gap_ranging_sample_report_ind_t |
ranging sample report info. More... | |
struct | ble_gap_ranging_cmp_ind_t |
ranging complete info. More... | |
struct | ble_gap_dft_subrate_param_t |
Default Subrate command param. More... | |
struct | ble_gap_subrate_req_t |
Subrate Request command param. More... | |
struct | ble_gap_subrate_chg_ind_t |
Subrate change indication. More... | |
struct | ble_gap_evt_phy_update_t |
PHY update event for BLE_GAPC_EVT_PHY_UPDATED. More... | |
struct | ble_gap_evt_connected_t |
Connection complete event for BLE_GAPC_EVT_CONNECTED. More... | |
struct | ble_gap_evt_disconnected_t |
Disconnection event for BLE_GAPC_EVT_DISCONNECTED. More... | |
struct | ble_gap_evt_peer_name_get_t |
Name of peer device indication event for BLE_GAPC_EVT_PEER_NAME_GOT. More... | |
struct | ble_gap_evt_peer_info_t |
Get peer info event for BLE_GAPC_EVT_PEER_INFO_GOT. More... | |
struct | ble_gap_evt_conn_param_updated_t |
Connection parameter updated event for BLE_GAPC_EVT_CONN_PARAM_UPDATED. More... | |
struct | ble_gap_evt_conn_param_update_req_t |
Connection parameter update request event for BLE_GAPC_EVT_CONN_PARAM_UPDATE_REQ. More... | |
struct | ble_gap_evt_conn_info_t |
Get Connection info event for BLE_GAPC_EVT_CONN_INFO_GOT. More... | |
struct | ble_gap_evt_data_length_t |
Data Length Updated event for BLE_GAPC_EVT_DATA_LENGTH_UPDATED. More... | |
struct | ble_gap_evt_dev_info_set_t |
Device Information set event for BLE_GAPC_EVT_DEV_INFO_SET. More... | |
struct | ble_gap_evt_conn_iq_report_t |
Connection IQ Report info event for BLE_GAPC_EVT_CONNECT_IQ_REPORT. More... | |
struct | ble_gap_evt_connless_iq_report_t |
Connectionless IQ Report info event for BLE_GAPC_EVT_CONNECTLESS_IQ_REPORT. More... | |
struct | ble_gap_evt_local_tx_pwr_read_ind_t |
Local transmit power read indication info event for BLE_GAPC_EVT_LOCAL_TX_POWER_READ. More... | |
struct | ble_gap_evt_remote_tx_pwr_read_ind_t |
Remote transmit power read indication info event for BLE_GAPC_EVT_REMOTE_TX_POWER_READ. More... | |
struct | ble_gap_evt_tx_pwr_change_report_t |
Transmit power change reporting info event for BLE_GAPC_EVT_TX_POWER_CHANGE_REPORT. More... | |
struct | ble_gap_evt_path_loss_threshold_report_t |
Path loss threshold reporting info event for BLE_GAPC_EVT_PATH_LOSS_THRESHOLD_REPORT. More... | |
struct | ble_gap_evt_ranging_ind_t |
Ranging indication event for BLE_GAPC_EVT_RANGING_IND. More... | |
struct | ble_gap_evt_ranging_sample_report_ind_t |
Ranging sample report event for BLE_GAPC_EVT_RANGING_SAMPLE_REPORT. More... | |
struct | ble_gap_evt_ranging_cmp_ind_t |
Ranging complete indication event for BLE_GAPC_EVT_RANGING_CMP_IND. More... | |
struct | ble_gap_evt_subrate_chg_ind_t |
Subrate change indication event for BLE_GAPC_EVT_SUBRATE_CHANGE_IND. More... | |
struct | ble_gapc_evt_t |
BLE GAPC event structure. More... | |
Macros | |
#define | BLE_GAP_CHNL_MAP_LEN 0x05 |
#define | BLE_GAP_FEATS_LEN 0x08 |
#define | BLE_GAP_ADDR_LEN 0x06 |
#define | BLE_GAP_INVALID_CONN_INDEX 0xFF |
#define | BLE_GAP_MIN_CTE_LEN 0x02 |
CTE length (in number of 8us periods) More... | |
#define | BLE_GAP_MAX_CTE_LEN 0x14 |
#define | BLE_GAP_MIN_CTE_CNT 0x01 |
CTE count. More... | |
#define | BLE_GAP_MAX_CTE_CNT 0x10 |
#define | BLE_GAP_MIN_IQ_SAMPLE_NUM 0x09 |
#define | BLE_GAP_MAX_IQ_SAMPLE_NUM 0x52 |
#define | BLE_GAP_MAX_GDX_RANGING_CH 20 |
Functions | |
uint16_t | ble_gap_disconnect (uint8_t conn_idx) |
Terminate an existing connection. More... | |
uint16_t | ble_gap_disconnect_with_reason (uint8_t conn_idx, ble_gap_disconn_reason_t reason) |
Terminate an existing connection with a specified reason. More... | |
uint16_t | ble_gap_conn_param_update (uint8_t conn_idx, const ble_gap_conn_update_param_t *p_conn_param) |
Change the Link Layer connection parameters of a connection. More... | |
uint16_t | ble_gap_update_conn_param_method_set (uint8_t conn_idx, bool use_l2cap_flag) |
Set the method for updating connection parameter. More... | |
uint16_t | ble_gap_latency_set (uint8_t conn_idx, uint16_t latency) |
Set connection's Latency. More... | |
uint16_t | ble_gap_latency_get (uint8_t conn_idx, uint16_t *latency) |
Get connection's Latency. More... | |
uint16_t | ble_gap_con_plan_consult (uint8_t *p_act_num, ble_gap_con_plan_tag_t **p_conn_plan_arr) |
Consult BLE connection activity plan situation function. More... | |
uint16_t | ble_gap_conn_param_update_reply (uint8_t conn_idx, bool accept) |
Connection param update reply to peer device. More... | |
uint16_t | ble_gap_data_length_update (uint8_t conn_idx, uint16_t tx_octects, uint16_t tx_time) |
The suggested maximum transmission packet size and maximum packet transmission time to be used for a given connection. More... | |
uint16_t | ble_gap_phy_update (uint8_t conn_idx, uint8_t tx_phys, uint8_t rx_phys, uint8_t phy_opt) |
Set the PHY preferences for the connection identified by the connection index. More... | |
uint16_t | ble_gap_conn_info_get (uint8_t conn_idx, ble_gap_get_conn_info_op_t opcode) |
Get the information of the connection. More... | |
uint16_t | ble_gap_peer_info_get (uint8_t conn_idx, ble_gap_get_peer_info_op_t opcode) |
Get the information of the peer device. More... | |
uint16_t | ble_gap_bond_dev_addr_get (uint8_t conn_idx, ble_gap_bdaddr_t *p_peer_addr) |
Get BD address of the bonded device. More... | |
uint16_t | ble_gap_per_sync_trans_param_set (uint8_t conn_idx, uint8_t per_sync_idx, ble_gap_per_sync_trans_param_t *p_per_sync_trans_param) |
Set the parameters used for periodic sync transfer. More... | |
uint16_t | ble_gap_per_adv_set_info_trans (uint8_t conn_idx, uint8_t per_adv_idx, uint16_t service_data) |
Send synchronization information about the periodic advertising in an advertising set to a connected device. More... | |
uint16_t | ble_gap_per_adv_sync_trans (uint8_t conn_idx, uint8_t per_sync_idx, uint16_t service_data) |
Send synchronization information about the periodic advertising identified by the sync_hdl parameter to a connected device. More... | |
uint16_t | ble_gap_conn_cte_trans_param_set (uint8_t conn_idx, ble_gap_set_conn_cte_trans_param_t *param) |
Set connection CTE transmit parameters. More... | |
uint16_t | ble_gap_conn_cte_recv_param_set (uint8_t conn_idx, ble_gap_set_conn_cte_rcv_param_t *param) |
Set connection CTE receive parameters. More... | |
uint16_t | ble_gap_conn_cte_req_enable_set (uint8_t conn_idx, bool enable_flag, ble_gap_set_conn_cte_req_enable_t *param) |
Set connection CTE request enable. More... | |
uint16_t | ble_gap_conn_cte_rsp_enable_set (uint8_t conn_idx, bool enable_flag) |
Set connection CTE response enable. More... | |
uint16_t | ble_gap_local_tx_pwr_level_read (uint8_t conn_idx, ble_gap_phy_type_t phy) |
Read the local current and maximum transmit power levels for the connection identified by the conn_idx. More... | |
uint16_t | ble_gap_remote_tx_pwr_level_read (uint8_t conn_idx, ble_gap_phy_type_t phy) |
Read the remote transmit power levels for the connection identified by the conn_idx. More... | |
uint16_t | ble_gap_path_loss_report_parameter_set (uint8_t conn_idx, ble_gap_set_path_loss_report_param_t *param) |
Set the path loss threshold reporting parameters for the connection identified by the conn_idx. More... | |
uint16_t | ble_gap_path_loss_report_enable_set (uint8_t conn_idx, bool enable_flag) |
Enable or disable path loss reporting for the connection identified by the conn_idx. More... | |
uint16_t | ble_gap_tx_pwr_change_report_enable_set (uint8_t conn_idx, bool local_enable_flag, bool remote_enable_flag) |
Enable or disable the reporting of transmit power level changes in the local and remote for the connection identified by the conn_idx. More... | |
int | ble_gap_ranging_start (uint8_t con_idx, ble_gap_ranging_param_t *param) |
start ranging procedure. More... | |
void | ble_gap_register_ranging_ind_cb (void(*cb)(uint8_t con_idx, const ble_gap_ranging_ind_t *ind)) |
Register ranging indication event callback. More... | |
void | ble_gap_register_ranging_sample_report_cb (void(*cb)(uint8_t con_idx, const ble_gap_ranging_sample_report_ind_t *ind)) |
Register ranging sample report event callback. More... | |
void | ble_gap_register_ranging_cmp_ind_cb (void(*cb)(uint8_t con_idx, const ble_gap_ranging_cmp_ind_t *ind)) |
Register ranging complete event callback. More... | |
uint16_t | ble_subrate_set_host_feature (bool supp_flag) |
Set Subrate feature. More... | |
uint16_t | ble_gap_default_subrate_param_set (const ble_gap_dft_subrate_param_t *p_subrate_param) |
Set Default Subrate command. More... | |
uint16_t | ble_gap_subrate_request (uint8_t conn_idx, const ble_gap_subrate_req_t *p_subrate_req) |
Subrate Request command. More... | |
void | ble_gap_get_local_addr_by_conidx (uint8_t conidx, uint8_t *p_addr) |
Get BD address of the local device by the conidx. More... | |
BLE GAPC API.
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_gapc.h.