Classes | Macros | Enumerations | Functions
ble_gapm.h File Reference

BLE GAPM API. More...

`#include "ble_error.h"`
`#include "ble_gapc.h"`
`#include <stdint.h>`
`#include <stddef.h>`

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_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_report_t
| Resolvable address report event for BLE_GAPM_EVT_RSLV_ADDR_REPORT. More...
struct | ble_gap_evt_iden_addr_report_t
| Identity address report event for BLE_GAPM_EVT_IDEN_ADDR_REPORT. More...
struct | ble_gap_evt_dtm_test_end_report_t
struct | ble_gapm_evt_t
| BLE GAPM event structure. More...

## Macros
#define | CO_BIT(pos) (1UL<<(pos))
#define | BLE_GAP_MAX_ADV_NUM 5
#define | BLE_GAP_MAX_PER_SYNC_NUM 5
#define | BLE_GAP_MAX_WL_NUM 10
#define | BLE_GAP_MAX_PRD_ADV_NUM 4
#define | BLE_GAP_MAX_KEY_LEN 16
#define | BLE_GAP_INVALID_ADV_IDX 0xFF
#define | BLE_GAP_DEVNAME_DEFAULT "GOODIX_BLE"
#define | BLE_GAP_DEVNAME_MAX_LEN 248
#define | BLE_GAP_MAX_ANTENNA_ID_NUM 0x4B
#define | BLE_APPEARANCE_UNKNOWN 0
#define | BLE_APPEARANCE_GENERIC_PHONE 64
#define | BLE_APPEARANCE_GENERIC_COMPUTER 128
#define | BLE_APPEARANCE_GENERIC_WATCH 192
#define | BLE_APPEARANCE_WATCH_SPORTS_WATCH 193
#define | BLE_APPEARANCE_GENERIC_CLOCK 256
#define | BLE_APPEARANCE_GENERIC_DISPLAY 320
#define | BLE_APPEARANCE_GENERIC_REMOTE_CONTROL 384
#define | BLE_APPEARANCE_GENERIC_EYE_GLASSES 448
#define | BLE_APPEARANCE_GENERIC_TAG 512
#define | BLE_APPEARANCE_GENERIC_KEYRING 576
#define | BLE_APPEARANCE_GENERIC_MEDIA_PLAYER 640
#define | BLE_APPEARANCE_GENERIC_BARCODE_SCANNER 704
#define | BLE_APPEARANCE_GENERIC_THERMOMETER 768
#define | BLE_APPEARANCE_THERMOMETER_EAR 769
#define | BLE_APPEARANCE_GENERIC_HEART_RATE_SENSOR 832
#define | BLE_APPEARANCE_HEART_RATE_SENSOR_HEART_RATE_BELT 833
#define | BLE_APPEARANCE_GENERIC_BLOOD_PRESSURE 896
#define | BLE_APPEARANCE_BLOOD_PRESSURE_ARM 897
#define | BLE_APPEARANCE_BLOOD_PRESSURE_WRIST 898
#define | BLE_APPEARANCE_GENERIC_HID 960
#define | BLE_APPEARANCE_HID_KEYBOARD 961
#define | BLE_APPEARANCE_HID_MOUSE 962
#define | BLE_APPEARANCE_HID_JOYSTICK 963
#define | BLE_APPEARANCE_HID_GAMEPAD 964
#define | BLE_APPEARANCE_HID_DIGITIZERSUBTYPE 965
#define | BLE_APPEARANCE_HID_CARD_READER 966
#define | BLE_APPEARANCE_HID_DIGITAL_PEN 967
#define | BLE_APPEARANCE_HID_BARCODE 968
#define | BLE_APPEARANCE_GENERIC_GLUCOSE_METER 1024
#define | BLE_APPEARANCE_GENERIC_RUNNING_WALKING_SENSOR 1088
#define | BLE_APPEARANCE_RUNNING_WALKING_SENSOR_IN_SHOE 1089
#define | BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_SHOE 1090
#define | BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_HIP 1091
#define | BLE_APPEARANCE_GENERIC_CYCLING 1152
#define | BLE_APPEARANCE_CYCLING_CYCLING_COMPUTER 1153
#define | BLE_APPEARANCE_CYCLING_SPEED_SENSOR 1154
#define | BLE_APPEARANCE_CYCLING_CADENCE_SENSOR 1155
#define | BLE_APPEARANCE_CYCLING_POWER_SENSOR 1156
#define | BLE_APPEARANCE_CYCLING_SPEED_CADENCE_SENSOR 1157
#define | BLE_APPEARANCE_GENERIC_PULSE_OXIMETER 3136
#define | BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP 3137
#define | BLE_APPEARANCE_PULSE_OXIMETER_WRIST_WORN 3138
#define | BLE_APPEARANCE_GENERIC_WEIGHT_SCALE 3200
#define | BLE_APPEARANCE_GENERIC_OUTDOOR_SPORTS_ACT 5184
#define | BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_DISP 5185
#define | BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_DISP 5186
#define | BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_POD 5187
#define | BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_POD 5188
#define | BLE_GAP_ADV_CHANNEL_37 0x01
#define | BLE_GAP_ADV_CHANNEL_38 0x02
#define | BLE_GAP_ADV_CHANNEL_39 0x04
#define | BLE_GAP_ADV_CHANNEL_37_38_39 0x07

## Enumerations
enum | ble_gap_role_t { BLE_GAP_ROLE_NONE = 0x00, BLE_GAP_ROLE_OBSERVER = 0x01, BLE_GAP_ROLE_BROADCASTER = 0x02, BLE_GAP_ROLE_CENTRAL = (0x04 | BLE_GAP_ROLE_OBSERVER), BLE_GAP_ROLE_PERIPHERAL = (0x08 | BLE_GAP_ROLE_BROADCASTER), BLE_GAP_ROLE_ALL = (BLE_GAP_ROLE_CENTRAL | BLE_GAP_ROLE_PERIPHERAL) }
| GAP role options. More...
enum | ble_gap_own_addr_t { BLE_GAP_OWN_ADDR_STATIC = 0, BLE_GAP_OWN_ADDR_GEN_RSLV, BLE_GAP_OWN_ADDR_GEN_NON_RSLV }
| Own BD address source of the device. More...
enum | ble_gap_dev_name_write_perm_t { BLE_GAP_WRITE_PERM_DISABLE = 0, BLE_GAP_WRITE_PERM_NOAUTH, BLE_GAP_WRITE_PERM_UNAUTH, BLE_GAP_WRITE_PERM_AUTH, BLE_GAP_WRITE_PERM_SEC_CON }
| Write permissions of the device name characteristic. More...
enum | ble_gap_adv_data_type_t { BLE_GAP_ADV_DATA_TYPE_DATA = 0, BLE_GAP_ADV_DATA_TYPE_SCAN_RSP, BLE_GAP_ADV_DATA_TYPE_PER_DATA }
| Advertising data type. More...
enum | ble_gap_dev_info_get_type_t { BLE_GAP_GET_DEV_VERSION = 0, BLE_GAP_GET_DEV_BDADDR, BLE_GAP_GET_SUGGESTED_DFLT_LE_DATA_LEN, BLE_GAP_GET_MAX_LE_DATA_LEN, BLE_GAP_GET_NB_ADV_SETS, BLE_GAP_GET_MAX_LE_ADV_DATA_LEN, BLE_GAP_GET_DEV_TX_POWER, BLE_GAP_GET_DEV_RF_RF_PATH_COMP, BLE_GAP_GET_ANTENNA_INFO }
| Get device parameters operation code. More...
enum | ble_gap_adv_mode_t { BLE_GAP_ADV_TYPE_ADV_IND = 0, BLE_GAP_ADV_TYPE_ADV_NONCONN_IND, BLE_GAP_ADV_TYPE_ADV_SCAN_IND, BLE_GAP_ADV_TYPE_ADV_HIGH_DIRECT_IND, BLE_GAP_ADV_TYPE_ADV_LOW_DIRECT_IND }
| GAP advertising modes. More...
enum | ble_gap_disc_mode_t { BLE_GAP_DISC_MODE_NON_DISCOVERABLE = 0, BLE_GAP_DISC_MODE_GEN_DISCOVERABLE, BLE_GAP_DISC_MODE_LIM_DISCOVERABLE, BLE_GAP_DISC_MODE_BROADCASTER }
| GAP discoverability modes. More...
enum | ble_gap_adv_filter_policy_t { BLE_GAP_ADV_ALLOW_SCAN_ANY_CON_ANY = 0, BLE_GAP_ADV_ALLOW_SCAN_WLST_CON_ANY, BLE_GAP_ADV_ALLOW_SCAN_ANY_CON_WLST, BLE_GAP_ADV_ALLOW_SCAN_WLST_CON_WLST }
| Advertising filter policy. More...
enum | ble_gap_adv_report_type_t { BLE_GAP_REPORT_TYPE_ADV_EXT = 0, BLE_GAP_REPORT_TYPE_ADV_LEG, BLE_GAP_REPORT_TYPE_SCAN_RSP_EXT, BLE_GAP_REPORT_TYPE_SCAN_RSP_LEG, BLE_GAP_REPORT_TYPE_PER_ADV }
| Advertising report type. More...
enum | ble_gap_adv_report_info_t { BLE_GAP_REPORT_INFO_COMPLETE_BIT = (1 << 0), BLE_GAP_REPORT_INFO_CONN_ADV_BIT = (1 << 1), BLE_GAP_REPORT_INFO_SCAN_ADV_BIT = (1 << 2), BLE_GAP_REPORT_INFO_DIR_ADV_BIT = (1 << 3) }
| Advertising report information. More...
enum | ble_gap_stopped_reason_t { BLE_GAP_STOPPED_REASON_TIMEOUT = 0, BLE_GAP_STOPPED_REASON_ON_USER, BLE_GAP_STOPPED_REASON_CONN_EST }
| Stop reason code. More...
enum | ble_gap_le_phy_value_t { BLE_GAP_PHY_UNDEF_VALUE = 0, BLE_GAP_PHY_1MBPS_VALUE = 1, BLE_GAP_PHY_2MBPS_VALUE = 2, BLE_GAP_PHY_CODED_VALUE = 3 }
| Specify what PHY the Controller has changed for TX/RX. HCI:7.7.65.12. More...
enum | ble_gap_adv_type_t { BLE_GAP_ADV_TYPE_LEGACY = 0, BLE_GAP_ADV_TYPE_EXTENDED, BLE_GAP_ADV_TYPE_PERIODIC }
| Advertising type. More...
enum | ble_gap_adv_prop_pos_t { BLE_GAP_ADV_PROP_CONNECTABLE_POS = 0, BLE_GAP_ADV_PROP_SCANNABLE_POS, BLE_GAP_ADV_PROP_DIRECTED_POS, BLE_GAP_ADV_PROP_HDC_POS, BLE_GAP_ADV_PROP_USE_LEGACY_PDUS_POS, BLE_GAP_ADV_PROP_ANONYMOUS_POS, BLE_GAP_ADV_PROP_TX_PWR_POS, BLE_GAP_ADV_PROP_PER_TX_PWR_POS, BLE_GAP_ADV_PROP_SCAN_REQ_NTF_EN_POS }
| Advertising properties bit field and bit positions. More...
enum | ble_gap_adv_prop_t { BLE_GAP_ADV_PROP_CONNECTABLE_BIT = CO_BIT(BLE_GAP_ADV_PROP_CONNECTABLE_POS), BLE_GAP_ADV_PROP_SCANNABLE_BIT = CO_BIT(BLE_GAP_ADV_PROP_SCANNABLE_POS), BLE_GAP_ADV_PROP_DIRECTED_BIT = CO_BIT(BLE_GAP_ADV_PROP_DIRECTED_POS), BLE_GAP_ADV_PROP_HDC_BIT = CO_BIT(BLE_GAP_ADV_PROP_HDC_POS), BLE_GAP_ADV_PROP_USE_LEGACY_PDUS_BIT = CO_BIT(BLE_GAP_ADV_PROP_USE_LEGACY_PDUS_POS), BLE_GAP_ADV_PROP_ANONYMOUS_BIT = CO_BIT(BLE_GAP_ADV_PROP_ANONYMOUS_POS), BLE_GAP_ADV_PROP_TX_PWR_BIT = CO_BIT(BLE_GAP_ADV_PROP_TX_PWR_POS), BLE_GAP_ADV_PROP_PER_TX_PWR_BIT = CO_BIT(BLE_GAP_ADV_PROP_PER_TX_PWR_POS), BLE_GAP_ADV_PROP_SCAN_REQ_NTF_EN_BIT = CO_BIT(BLE_GAP_ADV_PROP_SCAN_REQ_NTF_EN_POS) }
| Advertising properties bit field bit value. More...
enum | ble_gap_scan_type_t { BLE_GAP_SCAN_ACTIVE = 0, BLE_GAP_SCAN_PASSIVE }
| Scanning types. More...
enum | ble_gap_scan_mode_t { BLE_GAP_SCAN_GEN_DISC_MODE = 0, BLE_GAP_SCAN_LIM_DISC_MODE, BLE_GAP_SCAN_OBSERVER_MODE }
| Scanning modes. More...
enum | ble_gap_scan_dup_filt_policy_t { BLE_GAP_SCAN_FILT_DUPLIC_DIS = 0, BLE_GAP_SCAN_FILT_DUPLIC_EN }
| Duplicate filter policy. More...
enum | ble_gap_ext_scan_type_t { BLE_GAP_EXT_SCAN_TYPE_GEN_DISC = 0, BLE_GAP_EXT_SCAN_TYPE_LIM_DISC, BLE_GAP_EXT_SCAN_TYPE_OBSERVER, BLE_GAP_EXT_SCAN_TYPE_SEL_OBSERVER, BLE_GAP_EXT_SCAN_TYPE_CONN_DISC, BLE_GAP_EXT_SCAN_TYPE_SEL_CONN_DISC }
| Extended scanning types. More...
enum | ble_gap_scan_prop_t { BLE_GAP_EXT_SCAN_PROP_PHY_1M_BIT = (1 << 0), BLE_GAP_EXT_SCAN_PROP_PHY_CODED_BIT = (1 << 1), BLE_GAP_EXT_SCAN_PROP_ACTIVE_1M_BIT = (1 << 2), BLE_GAP_EXT_SCAN_PROP_ACTIVE_CODED_BIT = (1 << 3), BLE_GAP_EXT_SCAN_PROP_ACCEPT_RPA_BIT = (1 << 4), BLE_GAP_EXT_SCAN_PROP_FILT_TRUNC_BIT = (1 << 5) }
| Scanning properties bit field bit value. More...
enum | ble_gap_ext_scan_dup_filt_policy_t { BLE_GAP_EXT_DUP_FILT_DIS = 0, BLE_GAP_EXT_DUP_FILT_EN, BLE_GAP_EXT_DUP_FILT_EN_PERIOD }
| Filtering policy for duplicated packets. More...
enum | ble_gap_init_type_t { BLE_GAP_INIT_TYPE_DIRECT_CONN_EST = 0, BLE_GAP_INIT_TYPE_AUTO_CONN_EST, BLE_GAP_INIT_TYPE_NAME_DISC }
| Initiating types. More...
enum | ble_gap_init_prop_t { BLE_GAP_INIT_PROP_1M_BIT = (1 << 0), BLE_GAP_INIT_PROP_2M_BIT = (1 << 1), BLE_GAP_INIT_PROP_CODED_BIT = (1 << 2) }
| Initiating properties. More...
enum | ble_gap_per_sync_type_t { BLE_GAP_PER_SYNC_TYPE_GENERAL = 0, BLE_GAP_PER_SYNC_TYPE_SELECTIVE, BLE_GAP_PER_SYNC_TYPE_PAST }
| Periodic synchronization types. More...
enum | ble_gap_auto_add_white_list_policy_type_t { BLE_GAP_AUTO_ADD_WHITE_LIST_ALL_ROLE = 0, BLE_GAP_AUTO_ADD_WHITE_LIST_WITH_MASTER, BLE_GAP_AUTO_ADD_WHITE_LIST_WITH_SLAVE, BLE_GAP_AUTO_ADD_WHITE_LIST_NONE }
| Auto add white list policy types. More...
enum | gap_sync_cte_type { BLE_GAP_NO_SYNC_IGNORE = 0, BLE_GAP_NO_SYNC_WITH_AOA = (1 << 0), BLE_GAP_NO_SYNC_WITH_AOD_1US_SLOT = (1 << 1), BLE_GAP_NO_SYNC_WITH_AOD_2US_SLOT = (1 << 2), BLE_GAP_NO_SYNC_WITHOUT_CTE = (1 << 4) }
| Constant Tone Extension sync filtering type. More...
enum | gap_per_adv_sync_info_rec_mode { BLE_GAP_SYNC_REP_DIS = 0x01, BLE_GAP_SYNC_REP_EN = 0x02, BLE_GAP_SYNC_REP_EN_DUP = 0x03 }
| Periodic advertising sync information reception mode. More...
enum | gap_switch_sampling_rate { BLE_GAP_AOD_TX_1_US = (1 << 0), BLE_GAP_AOD_RX_1_US = (1 << 1), BLE_GAP_AOA_RX_1_US = (1 << 2) }
| Supported AoA AoD switching sampling rate. More...
enum | gap_slot_dur_type { BLE_GAP_SLOT_DURA_1US = 0x01, BLE_GAP_SLOT_DURA_2US = 0x02 }
| Slot duration type for IQ sampling. More...
enum | gap_sec_lvl_type { BLE_GAP_SEC_LVL_NO_SECURITY = 0, BLE_GAP_SEC_LVL_ENC_NO_AUTH, BLE_GAP_SEC_LVL_LE_ENC_AUTH, BLE_GAP_SEC_LVL_SC_ENC_AUTH }
| Security level types. More...
enum | ble_gap_ad_type_t { BLE_GAP_AD_TYPE_FLAGS = 0x01, BLE_GAP_AD_TYPE_MORE_16_BIT_UUID = 0x02, BLE_GAP_AD_TYPE_COMPLETE_LIST_16_BIT_UUID = 0x03, BLE_GAP_AD_TYPE_MORE_32_BIT_UUID = 0x04, BLE_GAP_AD_TYPE_COMPLETE_LIST_32_BIT_UUID = 0x05, BLE_GAP_AD_TYPE_MORE_128_BIT_UUID = 0x06, BLE_GAP_AD_TYPE_COMPLETE_LIST_128_BIT_UUID = 0x07, BLE_GAP_AD_TYPE_SHORTENED_NAME = 0x08, BLE_GAP_AD_TYPE_COMPLETE_NAME = 0x09, BLE_GAP_AD_TYPE_TRANSMIT_POWER = 0x0A, BLE_GAP_AD_TYPE_CLASS_OF_DEVICE = 0x0D, BLE_GAP_AD_TYPE_SP_HASH_C = 0x0E, BLE_GAP_AD_TYPE_SP_RANDOMIZER_R = 0x0F, BLE_GAP_AD_TYPE_TK_VALUE = 0x10, BLE_GAP_AD_TYPE_OOB_FLAGS = 0x11, BLE_GAP_AD_TYPE_SLAVE_CONN_INT_RANGE = 0x12, BLE_GAP_AD_TYPE_RQRD_16_BIT_SVC_UUID = 0x14, BLE_GAP_AD_TYPE_RQRD_32_BIT_SVC_UUID = 0x1F, BLE_GAP_AD_TYPE_RQRD_128_BIT_SVC_UUID = 0x15, BLE_GAP_AD_TYPE_SERVICE_16_BIT_DATA = 0x16, BLE_GAP_AD_TYPE_SERVICE_32_BIT_DATA = 0x20, BLE_GAP_AD_TYPE_SERVICE_128_BIT_DATA = 0x21, BLE_GAP_AD_TYPE_PUB_TGT_ADDR = 0x17, BLE_GAP_AD_TYPE_RAND_TGT_ADDR = 0x18, BLE_GAP_AD_TYPE_APPEARANCE = 0x19, BLE_GAP_AD_TYPE_ADV_INTV = 0x1A, BLE_GAP_AD_TYPE_LE_BT_ADDR = 0x1B, BLE_GAP_AD_TYPE_LE_ROLE = 0x1C, BLE_GAP_AD_TYPE_SPAIR_HASH = 0x1D, BLE_GAP_AD_TYPE_SPAIR_RAND = 0x1E, BLE_GAP_AD_TYPE_3D_INFO = 0x3D, BLE_GAP_AD_TYPE_MANU_SPECIFIC_DATA = 0xFF }
| GAP advertising types. More...
enum | ble_gap_adv_flags_t { BLE_GAP_ADV_FLAG_LE_LIMITED_DISC_MODE = 0x01, BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE = 0x02, BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED = 0x04, BLE_GAP_ADV_FLAG_SIMUL_BR_EDR_LE_CONTROLLER = 0x08, BLE_GAP_ADV_FLAG_SIMUL_BR_EDR_LE_HOST = 0x10 }
| AD Type Flag - Bit mask. More...
enum | ble_gap_privacy_mode_t { BLE_GAP_PRIVACY_MODE_NETWORK = 0x00, BLE_GAP_PRIVACY_MODE_DEVICE = 0x01 }
| Privacy mode. More...
enum | ble_gap_actv_role_t { BLE_GAP_ACTIVITY_ROLE_ADV = 0, BLE_GAP_ACTIVITY_ROLE_CON = 1, BLE_GAP_ACTIVITY_ROLE_SCAN_INIT = 2, BLE_GAP_ACTIVITY_ROLE_UNKNOWN = 0xf }
| Possible roles of the activity. More...
enum | ble_gap_actv_type_t { BLE_GAP_ACTV_TYPE_ADV = 0, BLE_GAP_ACTV_TYPE_SCAN, BLE_GAP_ACTV_TYPE_INIT, BLE_GAP_ACTV_TYPE_PER_SYNC }
| Activity type. 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...
void | ble_gap_default_conn_tx_power_set (int8_t txpwr_dbm)
| Set the default tx power for connection. More...
void | ble_gap_default_conn_tx_power_get (int8_t *txpwr_dbm)
| Get the default tx power for connection. 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 channel map. 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...
bool | ble_gap_check_whitelist_full (void)
| Check white list is full. 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_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_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...
void | ble_gap_get_local_irk (uint8_t *p_local_irk)
| Get the local irk. More...
void | ble_gap_adv_scan_evt_report_enable_set (bool enable_flag)
| Set whether to report adv/scan event. More...
uint16_t | ble_gap_reslv_rpa_addr (uint8_t *p_rpa)
| Resolve the rpa address. More...
uint16_t | ble_gap_reslv_rpa_addr_by_irk (uint8_t *p_rpa, uint8_t *p_irk)
| Resolve the rpa address with irk indicated by app layer. More...
uint16_t | ble_gap_rpa_list_add (ble_gap_bdaddr_t *p_peer_iden_addr, uint8_t *p_peer_irk)
| Add rpa list. More...
uint16_t | ble_gap_hw_adv_data_get (uint8_t adv_idx, uint8_t *p_adv_data, uint16_t *p_adv_data_len, uint8_t *p_scan_rsp_data, uint16_t *p_scan_rsp_data_len)
| Get adv data and scan rsp data from hardware buffer. More...
void | ble_gap_white_list_auto_add_policy_set (ble_gap_auto_add_white_list_policy_type_t policy_type)
| Set auto add white list policy after bonding. More...

## Detailed Description

BLE GAPM 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_gapm.h.