BLE GAPM API. More...
Go to the source code of this file.
Classes | |
struct | ble_gap_adv_param_t |
Advertising parameters for legacy advertising. More... | |
struct | ble_gap_adv_prim_cfg_t |
Configuration for advertising on primary channel. More... | |
struct | ble_gap_adv_second_cfg_t |
Configuration for advertising on secondary channel. More... | |
struct | ble_gap_adv_period_cfg_t |
Configuration for periodic advertising. More... | |
struct | ble_gap_ext_adv_param_t |
Advertising parameters for extended advertising and periodic advertising. More... | |
struct | ble_gap_adv_time_param_t |
Advertising timing parameter. More... | |
struct | ble_gap_sec_key_t |
Security key. More... | |
struct | ble_gap_scan_param_t |
Parameters for legacy scanning. More... | |
struct | ble_gap_scan_wd_op_param_t |
Scan Window operation parameters. More... | |
struct | ble_gap_ext_scan_param_t |
Parameters for extended scanning. More... | |
struct | ble_gap_period_adv_addr_cfg_t |
Periodic advertising information. More... | |
struct | ble_gap_per_sync_param_t |
Periodic advertising synchronization parameters. More... | |
struct | gap_connless_cte_trans_param_t |
Set connectionless CTE transmit parameters. More... | |
struct | ble_gap_connless_iq_sample_param_t |
Set connectionless IQ sampling enable parameter. More... | |
struct | ble_gap_init_param_t |
Legacy initiating parameters. More... | |
struct | ble_gap_ext_conn_param_t |
Connection parameters. More... | |
struct | ble_gap_ext_init_param_t |
Extended initiating parameters. More... | |
struct | ble_gap_lepsm_register_t |
LE Protocol/Service Multiplexer information. More... | |
struct | ble_gap_bond_dev_list_t |
Bonded device list. More... | |
struct | ble_gap_white_list_t |
White list. More... | |
struct | ble_gap_period_adv_list_t |
Periodic advertising list. More... | |
struct | ble_gap_ral_dev_info_t |
RPA list item info. More... | |
struct | ble_gap_ral_dev_list_t |
RPA list info. More... | |
struct | ble_gap_evt_dev_info_get_t |
Get device info event for BLE_GAPM_EVT_DEV_INFO_GOT. More... | |
struct | ble_gap_evt_adv_stop_t |
Advertising Stop info. More... | |
struct | ble_gap_evt_scan_req_t |
Scan request info. More... | |
struct | ble_gap_evt_scan_stop_t |
Scan Stop info struct. More... | |
struct | ble_gap_evt_adv_report_t |
Advertising report event for BLE_GAPM_EVT_ADV_REPORT. More... | |
struct | ble_gap_evt_sync_established_t |
Sync established event for BLE_GAPM_EVT_SYNC_ESTABLISH. More... | |
struct | ble_gap_evt_rslv_addr_read_t |
Read resolvable address event for BLE_GAPM_EVT_READ_RSLV_ADDR. More... | |
struct | ble_gap_evt_rslv_addr_report_t |
Resolvable address report event for BLE_GAPM_EVT_RSLV_ADDR_REPORT. More... | |
struct | ble_gapm_evt_t |
BLE GAPM event structure. More... | |
Functions | |
void | ble_gap_pair_enable (bool enable) |
Decide whether to support the pair feature. More... | |
uint16_t | ble_gap_addr_set (ble_gap_bdaddr_t const *p_addr) |
Set the device identity address (public or random static). More... | |
uint16_t | ble_gap_addr_get (ble_gap_bdaddr_t *p_addr) |
Get the device identity address (public or random static). More... | |
uint16_t | ble_gap_tx_power_set (ble_gap_actv_role_t role, uint8_t index, int8_t txpwr_dbm) |
Set the tx power. More... | |
uint16_t | ble_gap_tx_power_get (ble_gap_actv_role_t role, uint8_t index, int8_t *txpwr_dbm) |
Get the tx power. More... | |
uint16_t | ble_gap_irk_set (ble_gap_sec_key_t *p_irk) |
Set IRK used for resolvable random BD address generation (LSB first). More... | |
uint16_t | ble_gap_privacy_params_set (uint16_t renew_dur, bool enable_flag) |
Set privacy related parameters. More... | |
uint16_t | ble_gap_data_length_set (uint16_t sugg_max_tx_octet, uint16_t sugg_max_tx_time) |
Set suggested default LE data length. More... | |
uint16_t | ble_gap_l2cap_params_set (uint16_t max_mtu, uint16_t max_mps, uint8_t max_nb_lecb) |
Set L2CAP related parameters. More... | |
void | ble_gap_pref_phy_set (uint8_t tx_pref_phy, uint8_t rx_pref_phy) |
Set the preferred values for the transmitter PHY and receiver PHY. More... | |
uint16_t | ble_gap_path_compensation_set (int16_t tx_path_comp, int16_t rx_path_comp) |
Set the RF path gain or loss between the RF transceiver and the antenna contributed by intermediate components. More... | |
void | ble_gap_ppcp_present_set (bool present_flag) |
Set GAP Peripheral Preferred Connection Parameters present flag. More... | |
uint16_t | ble_gap_chnl_map_set (ble_gap_chnl_map_t *p_chnl_map) |
Set advertising channel map before advertising starting. More... | |
uint16_t | ble_gap_bond_devs_get (ble_gap_bond_dev_list_t *p_bond_list, uint8_t max_num) |
Get all bonded devices. More... | |
uint16_t | ble_gap_bond_devs_clear (void) |
Clear all bonded devices. More... | |
uint16_t | ble_gap_bond_dev_del (const ble_gap_bdaddr_t *p_peer_addr) |
Delete a bond device with the specified BD address. More... | |
uint16_t | ble_gap_whitelist_get (ble_gap_white_list_t *p_whitelist) |
Get the content of the whole white list. More... | |
uint16_t | ble_gap_whitelist_add (const ble_gap_white_list_t *p_whitelist) |
Add the devices into current white list. If white list is full or there are duplicated entries, it will return error. More... | |
uint16_t | ble_gap_whitelist_del (const ble_gap_white_list_t *p_whitelist) |
Delete the devices out of current white list. If the entries do not exist in the current white list, it will return error. More... | |
uint16_t | ble_gap_whitelist_clear (void) |
Clear all the entries in the current white list. More... | |
uint16_t | ble_gap_per_adv_list_get (ble_gap_period_adv_list_t *p_pal_list) |
Get the content of the whole periodic advertising list. More... | |
uint16_t | ble_gap_per_adv_list_add (const ble_gap_period_adv_list_t *p_pal_list) |
Add the devices into current periodic advertising list. If periodic advertising list is full or there are duplicated entries, it will return error. More... | |
uint16_t | ble_gap_per_adv_list_del (const ble_gap_period_adv_list_t *p_pal_list) |
Delete the devices out of periodic advertising list. If the entries do not exist in the current list, an error will be returned. More... | |
uint16_t | ble_gap_per_adv_list_clear (void) |
Clear all the entries in the current periodic advertising list. More... | |
uint16_t | ble_gap_rpa_list_get (ble_gap_ral_dev_list_t *p_rpa_list, uint8_t max_num) |
Get the RPA list info. More... | |
uint16_t | ble_gap_dev_info_get (ble_gap_dev_info_get_type_t type) |
Get the device information according to param type. More... | |
uint16_t | ble_gap_adv_param_set (uint8_t adv_idx, ble_gap_own_addr_t own_addr_type, ble_gap_adv_param_t *p_adv_param) |
Set parameters for advertising. Note that this function must be called prior to advertising started. More... | |
uint16_t | ble_gap_ext_adv_param_set (uint8_t adv_idx, ble_gap_own_addr_t own_addr_type, ble_gap_ext_adv_param_t *p_adv_param) |
Set extended parameters for advertising. Note that this function must be called prior to advertising. More... | |
uint16_t | ble_gap_adv_data_set (uint8_t adv_idx, ble_gap_adv_data_type_t type, const uint8_t *p_data, uint16_t length) |
Set Advertising Data, Scan Response Data and Periodic Advertising Data. See ENUM ble_gap_ad_type_t for ADV Type definitions. See ENUM ble_gap_adv_flags_t for ADV flag definitions. More... | |
uint16_t | ble_gap_update_adv_data (uint8_t adv_idx, ble_gap_adv_data_type_t type, const uint8_t *p_data, uint16_t length) |
Update Advertising Data, Scan Response Data and Periodic Advertising Data. See ENUM ble_gap_ad_type_t for ADV Type definitions. See ENUM ble_gap_adv_flags_t for ADV flag definitions. More... | |
uint16_t | ble_gap_adv_start (uint8_t adv_idx, ble_gap_adv_time_param_t *p_timeout) |
Start advertising. More... | |
uint16_t | ble_gap_adv_stop (uint8_t adv_idx) |
Stop advertising. More... | |
uint16_t | ble_gap_scan_param_set (ble_gap_own_addr_t own_addr_type, ble_gap_scan_param_t *p_scan_param) |
Set parameters for scanning. Note that this function must be called prior to scanning started. More... | |
uint16_t | ble_gap_ext_scan_param_set (ble_gap_own_addr_t own_addr_type, ble_gap_ext_scan_param_t *p_scan_param) |
Set extended parameters for scanning. Note that this function must be called prior to scanning started. More... | |
uint16_t | ble_gap_scan_start (void) |
Start scanning. More... | |
uint16_t | ble_gap_scan_stop (void) |
Stop scanning. More... | |
uint16_t | ble_gap_per_sync_param_set (uint8_t per_sync_idx, ble_gap_per_sync_param_t *p_per_sync_param) |
Set the parameters used for periodic sync. More... | |
uint16_t | ble_gap_per_sync_start (uint8_t per_sync_idx) |
Start to synchronize with periodic advertising from an advertiser and begin receiving periodic advertising packets. More... | |
uint16_t | ble_gap_per_sync_stop (uint8_t per_sync_idx) |
Stop periodic synchronization. More... | |
uint16_t | ble_gap_connect (ble_gap_own_addr_t own_addr_type, ble_gap_init_param_t *p_init_param) |
Start a legacy connection to a device. More... | |
uint16_t | ble_gap_ext_connect (ble_gap_own_addr_t own_addr_type, ble_gap_ext_init_param_t *p_init_param) |
Start an extended connection to a device. More... | |
uint16_t | ble_gap_connect_cancel (void) |
Cancel an initiated connection. More... | |
void | ble_gap_appearance_set (uint16_t appearance) |
Set GAP appearance value. More... | |
uint16_t | ble_gap_appearance_get (uint16_t *p_appearance) |
Get GAP appearance value. More... | |
uint16_t | ble_gap_ppcp_set (ble_gap_conn_param_t const *p_conn_params) |
Set GAP Peripheral Preferred Connection Parameters. More... | |
uint16_t | ble_gap_ppcp_get (ble_gap_conn_param_t *p_conn_params) |
Get GAP Peripheral Preferred Connection Parameters. More... | |
uint16_t | ble_gap_device_name_set (ble_gap_dev_name_write_perm_t write_perm, uint8_t const *p_dev_name, uint16_t length) |
Set GAP device name. More... | |
uint16_t | ble_gap_device_name_get (uint8_t *p_dev_name, uint16_t *p_length) |
Get GAP device name. More... | |
uint16_t | ble_gap_lepsm_register (ble_gap_lepsm_register_t *p_lepsm) |
Register a LE Protocol/Service Multiplexer. More... | |
uint16_t | ble_gap_lepsm_unregister (uint16_t le_psm) |
Unregister a LE Protocol/Service Multiplexer. More... | |
uint16_t | ble_gap_privacy_mode_set (ble_gap_bdaddr_t peer_addr, ble_gap_privacy_mode_t mode) |
Set privacy mode for peer device. More... | |
uint16_t | ble_gap_rslv_addr_read (ble_gap_rslv_addr_read_op_id_t op_code, ble_gap_bdaddr_t peer_iden_addr) |
Read peer or local resolvable address, this address generated by controller. More... | |
uint16_t | ble_gap_per_adv_report_ctrl (uint8_t per_sync_index, bool enable_flag) |
Control periodic advertising report. More... | |
uint16_t | ble_gap_connless_cte_trans_param_set (uint8_t per_adv_index, gap_connless_cte_trans_param_t *param) |
Set connectionless CTE transmit parameters. More... | |
uint16_t | ble_gap_connless_cte_trans_enable_set (uint8_t per_adv_index, bool enable_flag) |
Set connectionless CTE transmit enable. More... | |
uint16_t | ble_gap_connless_iq_sample_enable_set (uint8_t per_sync_index, bool enable_flag, ble_gap_connless_iq_sample_param_t *param) |
Set connectionless IQ sampling enable. More... | |
uint16_t | ble_gap_set_gdx_ranging_param (uint32_t base_addr, uint8_t cte_len) |
Set ranging parameter. More... | |
BLE GAPM 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_gapm.h.