|
SmartSnippets DA1459x SDK
|
BLE GAP API. More...
#include <stddef.h>#include <stdint.h>#include "co_version.h"#include "co_bt.h"#include "ble_att.h"#include "ble_common.h"#include "ble_config.h"Go to the source code of this file.
Macros | |
| #define | BLE_ADV_DATA_LEN_MAX (ADV_DATA_LEN - 3) |
| #define | BLE_NON_CONN_ADV_DATA_LEN_MAX (ADV_DATA_LEN) |
| #define | BLE_SCAN_RSP_LEN_MAX (SCAN_RSP_DATA_LEN) |
| #define | BLE_GAP_CHANNEL_MAP_LEN (LE_CHNL_MAP_LEN) |
| #define | BLE_GAP_MAX_CONNECTED (dg_configBLE_CONNECTIONS_MAX) |
| #define | BLE_GAP_MAX_BONDED (defaultBLE_MAX_BONDED) |
| #define | BLE_ADV_INTERVAL_FROM_MS(MS) ((MS) * 1000 / 625) |
| #define | BLE_ADV_INTERVAL_TO_MS(VAL) ((VAL) * 625 / 1000) |
| #define | BLE_SCAN_INTERVAL_FROM_MS(MS) ((MS) * 1000 / 625) |
| #define | BLE_SCAN_INTERVAL_TO_MS(VAL) ((VAL) * 625 / 1000) |
| #define | BLE_SCAN_WINDOW_FROM_MS(MS) ((MS) * 1000 / 625) |
| #define | BLE_SCAN_WINDOW_TO_MS(VAL) ((VAL) * 625 / 1000) |
| #define | BLE_CONN_EVENT_LENGTH_FROM_MS(MS) ((MS) * 1000 / 625) |
| #define | BLE_CONN_EVENT_LENGTH_TO_MS(VAL) ((VAL) * 625 / 1000) |
| #define | BLE_CONN_INTERVAL_FROM_MS(MS) ((MS) * 100 / 125) |
| #define | BLE_CONN_INTERVAL_TO_MS(VAL) ((VAL) * 125 / 100) |
| #define | BLE_SUPERVISION_TMO_FROM_MS(MS) ((MS) / 10) |
| #define | BLE_SUPERVISION_TMO_TO_MS(VAL) ((VAL) * 10) |
| #define | BLE_CONN_IDX_INVALID (0xFFFF) |
| #define | BLE_RSSI_NOT_AVAILABLE (127) |
| #define | BLE_ENC_KEY_SIZE_MAX (16) |
| #define | GAP_ADV_AD_STRUCT(_ad_data_type, _ad_data_len, _ad_data) |
| #define | GAP_ADV_AD_STRUCT_BYTES(_ad_data_type, _ad_data_bytes...) |
| #define | GAP_ADV_AD_STRUCT_DECLARE(_ad_data_type, _ad_data_len, _ad_data) |
Typedefs | |
| typedef struct gap_chnl_map | gap_chnl_map_t |
Functions | |
| ble_error_t | ble_gap_address_get (own_address_t *address) |
| Retrieve the currently set BD address. More... | |
| ble_error_t | ble_gap_address_set (const own_address_t *address, uint16_t renew_dur) |
| Set the address of the device. More... | |
| ble_error_t | ble_gap_device_name_set (const char *name, att_perm_t perm) |
| Set the device name used for GAP service. More... | |
| ble_error_t | ble_gap_device_name_get (char *name, uint8_t *length) |
| Get the device name used for GAP service. More... | |
| ble_error_t | ble_gap_appearance_set (gap_appearance_t appearance, att_perm_t perm) |
| Set the appearance used for GAP service. More... | |
| ble_error_t | ble_gap_appearance_get (gap_appearance_t *appearance) |
| Get the appearance used for GAP service. More... | |
| ble_error_t | ble_gap_per_pref_conn_params_set (const gap_conn_params_t *conn_params) |
| Set the peripheral preferred connection parameters used for GAP service. More... | |
| ble_error_t | ble_gap_per_pref_conn_params_get (gap_conn_params_t *conn_params) |
| Get the peripheral preferred connection parameters currently set for GAP service. More... | |
| ble_error_t | ble_gap_adv_start (gap_conn_mode_t adv_type) |
| Start advertising. More... | |
| ble_error_t | ble_gap_adv_stop (void) |
| Stop advertising. More... | |
| ble_error_t | ble_gap_adv_data_set (uint8_t adv_data_len, const uint8_t *adv_data, uint8_t scan_rsp_data_len, const uint8_t *scan_rsp_data) |
| Set advertising Data and scan response data. More... | |
| ble_error_t | ble_gap_adv_ad_struct_set (size_t ad_len, const gap_adv_ad_struct_t *ad, size_t sd_len, const gap_adv_ad_struct_t *sd) |
| Set Advertising Data and Scan Response Data using gap_adv_ad_struct_t type. More... | |
| ble_error_t | ble_gap_adv_data_get (uint8_t *adv_data_len, uint8_t *adv_data, uint8_t *scan_rsp_data_len, uint8_t *scan_rsp_data) |
| Get currently used Advertising Data and Scan Response Data. More... | |
| ble_error_t | ble_gap_adv_intv_get (uint16_t *adv_intv_min, uint16_t *adv_intv_max) |
| Get the currently set advertising interval. More... | |
| ble_error_t | ble_gap_adv_intv_set (uint16_t adv_intv_min, uint16_t adv_intv_max) |
| Set the advertising interval. More... | |
| ble_error_t | ble_gap_adv_chnl_map_get (uint8_t *chnl_map) |
| Get the advertising channel map currently set. More... | |
| ble_error_t | ble_gap_adv_chnl_map_set (uint8_t chnl_map) |
| Set the advertising channel map. More... | |
| ble_error_t | ble_gap_adv_mode_get (gap_disc_mode_t *adv_mode) |
| Get the discoverability mode used for advertising. More... | |
| ble_error_t | ble_gap_adv_mode_set (gap_disc_mode_t adv_mode) |
| Set the discoverability mode used for advertising. More... | |
| ble_error_t | ble_gap_adv_filt_policy_get (adv_filt_pol_t *filt_policy) |
| Get the filtering policy used for advertising. More... | |
| ble_error_t | ble_gap_adv_filt_policy_set (adv_filt_pol_t filt_policy) |
| Set the filtering policy used for advertising. More... | |
| ble_error_t | ble_gap_adv_direct_address_get (bd_address_t *address) |
| Get the peer address used for directed advertising. More... | |
| ble_error_t | ble_gap_adv_direct_address_set (const bd_address_t *address) |
| Set peer address used for directed advertising. More... | |
| ble_error_t | ble_gap_adv_set_permutation (uint8_t permutation_index) |
| Set the permutation order of the primary advertising channels. More... | |
| ble_error_t | ble_gap_scan_start (gap_scan_type_t type, gap_scan_mode_t mode, uint16_t interval, uint16_t window, bool filt_wlist, bool filt_dupl) |
| Start scanning for devices. More... | |
| ble_error_t | ble_gap_scan_stop (void) |
| Stop scanning for devices. More... | |
| ble_error_t | ble_gap_scan_params_get (gap_scan_params_t *scan_params) |
| Get the scan parameters used for connections. More... | |
| ble_error_t | ble_gap_scan_params_set (const gap_scan_params_t *scan_params) |
| Set the scan parameters used for connections. More... | |
| ble_error_t | ble_gap_connect (const bd_address_t *peer_addr, const gap_conn_params_t *conn_params) |
| Connect to a device. More... | |
| ble_error_t | ble_gap_connect_ce (const bd_address_t *peer_addr, const gap_conn_params_t *conn_params, uint16_t ce_len_min, uint16_t ce_len_max) |
| Connect to a device with a defined connection event length. More... | |
| ble_error_t | ble_gap_connect_cancel (void) |
| Cancel an initiated connection. More... | |
| ble_error_t | ble_gap_disconnect (uint16_t conn_idx, ble_hci_error_t reason) |
| Terminate a connection. More... | |
| ble_error_t | ble_gap_peer_version_get (uint16_t conn_idx) |
| Get peer's version. More... | |
| ble_error_t | ble_gap_peer_features_get (uint16_t conn_idx) |
| Get peer's features. More... | |
| ble_error_t | ble_gap_conn_rssi_get (uint16_t conn_idx, int8_t *conn_rssi) |
| Retrieve the RSSI of a connection. More... | |
| ble_error_t | ble_gap_role_get (gap_role_t *role) |
| Get the GAP role currently set. More... | |
| ble_error_t | ble_gap_role_set (const gap_role_t role) |
| Set GAP role. More... | |
| ble_error_t | ble_gap_mtu_size_get (uint16_t *mtu_size) |
| Get MTU size. More... | |
| ble_error_t | ble_gap_mtu_size_set (uint16_t mtu_size) |
| Set MTU size. More... | |
| ble_error_t | ble_gap_channel_map_get (uint64_t *chnl_map) |
| Get the currently set channel map of the device (device has to be configured as central) More... | |
| ble_error_t | ble_gap_channel_map_set (const uint64_t chnl_map) |
| Set the channel map of the device (device has to be configured as central) More... | |
| ble_error_t | ble_gap_conn_param_update (uint16_t conn_idx, const gap_conn_params_t *conn_params) |
| Initiate a connection parameter update. More... | |
| ble_error_t | ble_gap_conn_param_update_reply (uint16_t conn_idx, bool accept) |
| Reply to a connection parameter update request. More... | |
| ble_error_t | ble_gap_pair (uint16_t conn_idx, bool bond) |
| Start pairing. More... | |
| ble_error_t | ble_gap_pair_reply (uint16_t conn_idx, bool accept, bool bond) |
| Respond to a pairing request. More... | |
| ble_error_t | ble_gap_get_connected (uint8_t *length, uint16_t **conn_idx) |
| Get connected devices list. More... | |
| ble_error_t | ble_gap_get_bonded (uint8_t *length, bd_address_t **addr) |
| Get bonded devices list. More... | |
| ble_error_t | ble_gap_get_io_cap (gap_io_cap_t *io_cap) |
| Get the I/O capabilities of the device. More... | |
| ble_error_t | ble_gap_set_io_cap (gap_io_cap_t io_cap) |
| Set the I/O capabilities of the device. More... | |
| ble_error_t | ble_gap_passkey_reply (uint16_t conn_idx, bool accept, uint32_t passkey) |
| Respond to a passkey request. More... | |
| ble_error_t | ble_gap_get_sec_level (uint16_t conn_idx, gap_sec_level_t *level) |
| Get connection security level. More... | |
| ble_error_t | ble_gap_unpair (const bd_address_t *addr) |
| Unpair command. More... | |
| ble_error_t | ble_gap_set_sec_level (uint16_t conn_idx, gap_sec_level_t level) |
| Set connection security level. More... | |
| ble_error_t | ble_gap_get_devices (gap_device_filter_t filter, gap_device_filter_data_t *filter_data, size_t *length, gap_device_t *gap_devices) |
| Return list of known devices. More... | |
| ble_error_t | ble_gap_get_device_by_addr (const bd_address_t *addr, gap_device_t *gap_device) |
| Get device object by device address. More... | |
| ble_error_t | ble_gap_get_device_by_conn_idx (uint16_t conn_idx, gap_device_t *gap_device) |
| Get device object by connection index. More... | |
| ble_error_t | ble_gap_is_bonded (uint16_t conn_idx, bool *bonded) |
| Get bond state of device (by connection index) More... | |
| ble_error_t | ble_gap_is_addr_bonded (const bd_address_t *addr, bool *bonded) |
| Get bond state of device (by address) More... | |
| ble_error_t | ble_gap_data_length_set (uint16_t conn_idx, uint16_t tx_length, uint16_t tx_time) |
| Set the data length used for TX. More... | |
| ble_error_t | ble_gap_address_resolve (bd_address_t address) |
| Resolve a BD address. More... | |
| ble_error_t | ble_gap_tx_power_set (uint8_t air_operation, gap_tx_power_t tx_power) |
| Set TX power for air operations. More... | |
| ble_error_t | ble_gap_conn_tx_power_set (uint16_t conn_idx, gap_tx_power_t tx_power) |
| Set TX power for given connection. More... | |
BLE GAP API.
Copyright (C) 2015-2023 Renesas Electronics Corporation and/or its affiliates. All rights reserved. Confidential Information.
This software ("Software") is supplied by Renesas Electronics Corporation and/or its affiliates ("Renesas"). Renesas grants you a personal, non-exclusive, non-transferable, revocable, non-sub-licensable right and license to use the Software, solely if used in or together with Renesas products. You may make copies of this Software, provided this copyright notice and disclaimer ("Notice") is included in all such copies. Renesas reserves the right to change or discontinue the Software at any time without notice.
THE SOFTWARE IS PROVIDED "AS IS". RENESAS DISCLAIMS ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. TO THE MAXIMUM EXTENT PERMITTED UNDER LAW, IN NO EVENT SHALL RENESAS BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE, EVEN IF RENESAS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. USE OF THIS SOFTWARE MAY BE SUBJECT TO TERMS AND CONDITIONS CONTAINED IN AN ADDITIONAL AGREEMENT BETWEEN YOU AND RENESAS. IN CASE OF CONFLICT BETWEEN THE TERMS OF THIS NOTICE AND ANY SUCH ADDITIONAL LICENSE AGREEMENT, THE TERMS OF THE AGREEMENT SHALL TAKE PRECEDENCE. BY CONTINUING TO USE THIS SOFTWARE, YOU AGREE TO THE TERMS OF THIS NOTICE.IF YOU DO NOT AGREE TO THESE TERMS, YOU ARE NOT PERMITTED TO USE THIS SOFTWARE.
1.8.16