ble_gapm.h
Go to the documentation of this file.
1 /**
2 ****************************************************************************************
3 *
4 * @file ble_gapm.h
5 *
6 * @brief BLE GAPM API
7 *
8 ****************************************************************************************
9 * @attention
10 #####Copyright (c) 2019 GOODIX
11 All rights reserved.
12
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions are met:
15 * Redistributions of source code must retain the above copyright
16 notice, this list of conditions and the following disclaimer.
17 * Redistributions in binary form must reproduce the above copyright
18 notice, this list of conditions and the following disclaimer in the
19 documentation and/or other materials provided with the distribution.
20 * Neither the name of GOODIX nor the names of its contributors may be used
21 to endorse or promote products derived from this software without
22 specific prior written permission.
23
24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 POSSIBILITY OF SUCH DAMAGE.
35 *****************************************************************************************
36 */
37
38 /**
39 * @addtogroup BLE
40 * @{
41 * @brief Definitions and prototypes for the BLE SDK interface.
42 */
43
44 /**
45 * @addtogroup BLE_GAP Generic Access Profile (GAP)
46 * @{
47 * @brief Definitions and prototypes for the GAP interface.
48 */
49
50 #ifndef __BLE_GAPM_H__
51 #define __BLE_GAPM_H__
52
53 /*
54 * INCLUDE FILES
55 ****************************************************************************************
56 */
57 #include "ble_error.h"
58 #include "ble_gapc.h"
59 #include <stdint.h> // standard definitions
60 #include <stddef.h> // standard definitions
61
62
63 /**
64 @addtogroup BLE_GAPM Generic Access Profile (GAP) Management
65 @{
66 @brief Definitions and prototypes for the GAP Management interface.
67 */
68
69 /** @addtogroup BLE_GAPM_DEFINES Defines
70 * @{ */
71
72 #define CO_BIT(pos)(1UL<<(pos)) /**< Bit operation helper. */
73 #define BLE_GAP_MAX_ADV_NUM 5 /**< Maximal advertising instance number. */
74 #define BLE_GAP_MAX_PER_SYNC_NUM 5 /**< Maximal periodic syncronization instance number. */
75 #define BLE_GAP_MAX_WL_NUM 10 /**< Maximal white list number. */
76 #define BLE_GAP_MAX_PRD_ADV_NUM 4 /**< Maximal periodic advertising list number. */
77 #define BLE_GAP_MAX_KEY_LEN 16 /**< The key length. */
78 #define BLE_GAP_INVALID_ADV_IDX 0xFF /**< Invalid adv index. */
79 #define BLE_GAP_DEVNAME_DEFAULT "GOODIX_BLE" /**< Default device name value. */
80 #define BLE_GAP_DEVNAME_MAX_LEN 248 /**< Maximal length of device name. */
81
82 #define BLE_GAP_MAX_ANTENNA_ID_NUM 0x4B /**< Maximal number of Antenna IDs. */
83
84 #define BLE_APPEARANCE_UNKNOWN 0 /**< Unknown. */
85 #define BLE_APPEARANCE_GENERIC_PHONE 64 /**< Generic Phone. */
86 #define BLE_APPEARANCE_GENERIC_COMPUTER 128 /**< Generic Computer. */
87 #define BLE_APPEARANCE_GENERIC_WATCH 192 /**< Generic Watch. */
88 #define BLE_APPEARANCE_WATCH_SPORTS_WATCH 193 /**< Watch: Sports Watch. */
89 #define BLE_APPEARANCE_GENERIC_CLOCK 256 /**< Generic Clock. */
90 #define BLE_APPEARANCE_GENERIC_DISPLAY 320 /**< Generic Display. */
91 #define BLE_APPEARANCE_GENERIC_REMOTE_CONTROL 384 /**< Generic Remote Control. */
92 #define BLE_APPEARANCE_GENERIC_EYE_GLASSES 448 /**< Generic Eye-glasses. */
93 #define BLE_APPEARANCE_GENERIC_TAG 512 /**< Generic Tag. */
94 #define BLE_APPEARANCE_GENERIC_KEYRING 576 /**< Generic Keyring. */
95 #define BLE_APPEARANCE_GENERIC_MEDIA_PLAYER 640 /**< Generic Media Player. */
96 #define BLE_APPEARANCE_GENERIC_BARCODE_SCANNER 704 /**< Generic Barcode Scanner. */
97 #define BLE_APPEARANCE_GENERIC_THERMOMETER 768 /**< Generic Thermometer. */
98 #define BLE_APPEARANCE_THERMOMETER_EAR 769 /**< Thermometer: Ear. */
99 #define BLE_APPEARANCE_GENERIC_HEART_RATE_SENSOR 832 /**< Generic Heart Rate Sensor. */
100 #define BLE_APPEARANCE_HEART_RATE_SENSOR_HEART_RATE_BELT 833 /**< Heart Rate Sensor: Heart Rate Belt. */
101 #define BLE_APPEARANCE_GENERIC_BLOOD_PRESSURE 896 /**< Generic Blood Pressure. */
102 #define BLE_APPEARANCE_BLOOD_PRESSURE_ARM 897 /**< Blood Pressure: Arm. */
103 #define BLE_APPEARANCE_BLOOD_PRESSURE_WRIST 898 /**< Blood Pressure: Wrist. */
104 #define BLE_APPEARANCE_GENERIC_HID 960 /**< Human Interface Device (HID). */
105 #define BLE_APPEARANCE_HID_KEYBOARD 961 /**< Keyboard (HID Subtype). */
106 #define BLE_APPEARANCE_HID_MOUSE 962 /**< Mouse (HID Subtype). */
107 #define BLE_APPEARANCE_HID_JOYSTICK 963 /**< Joystick (HID Subtype). */
108 #define BLE_APPEARANCE_HID_GAMEPAD 964 /**< Gamepad (HID Subtype). */
109 #define BLE_APPEARANCE_HID_DIGITIZERSUBTYPE 965 /**< Digitizer Tablet (HID Subtype). */
110 #define BLE_APPEARANCE_HID_CARD_READER 966 /**< Card Reader (HID Subtype). */
111 #define BLE_APPEARANCE_HID_DIGITAL_PEN 967 /**< Digital Pen (HID Subtype). */
112 #define BLE_APPEARANCE_HID_BARCODE 968 /**< Barcode Scanner (HID Subtype). */
113 #define BLE_APPEARANCE_GENERIC_GLUCOSE_METER 1024 /**< Generic Glucose Meter. */
114 #define BLE_APPEARANCE_GENERIC_RUNNING_WALKING_SENSOR 1088 /**< Generic Running Walking Sensor. */
115 #define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_IN_SHOE 1089 /**< Running Walking Sensor: In-Shoe. */
116 #define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_SHOE 1090 /**< Running Walking Sensor: On-Shoe. */
117 #define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_HIP 1091 /**< Running Walking Sensor: On-Hip. */
118 #define BLE_APPEARANCE_GENERIC_CYCLING 1152 /**< Generic Cycling. */
119 #define BLE_APPEARANCE_CYCLING_CYCLING_COMPUTER 1153 /**< Cycling: Cycling Computer. */
120 #define BLE_APPEARANCE_CYCLING_SPEED_SENSOR 1154 /**< Cycling: Speed Sensor. */
121 #define BLE_APPEARANCE_CYCLING_CADENCE_SENSOR 1155 /**< Cycling: Cadence Sensor. */
122 #define BLE_APPEARANCE_CYCLING_POWER_SENSOR 1156 /**< Cycling: Power Sensor. */
123 #define BLE_APPEARANCE_CYCLING_SPEED_CADENCE_SENSOR 1157 /**< Cycling: Speed and Cadence Sensor. */
124 #define BLE_APPEARANCE_GENERIC_PULSE_OXIMETER 3136 /**< Generic Pulse Oximeter. */
125 #define BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP 3137 /**< Fingertip (Pulse Oximeter subtype). */
126 #define BLE_APPEARANCE_PULSE_OXIMETER_WRIST_WORN 3138 /**< Wrist Worn(Pulse Oximeter subtype). */
127 #define BLE_APPEARANCE_GENERIC_WEIGHT_SCALE 3200 /**< Generic Weight Scale. */
128 #define BLE_APPEARANCE_GENERIC_OUTDOOR_SPORTS_ACT 5184 /**< Generic Outdoor Sports Activity. */
129 #define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_DISP 5185 /**< Location Display Device (Outdoor Sports Activity subtype). */
130 #define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_DISP 5186 /**< Location and Navigation Display Device (Outdoor Sports Activity subtype). */
131 #define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_POD 5187 /**< Location Pod (Outdoor Sports Activity subtype). */
132 #define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_POD 5188 /**< Location and Navigation Pod (Outdoor Sports Activity subtype). */
133
134 /**@defgroup BLE_GAP_ADV_CHANNEL GAP ADV CHANNEL (bitmask)
135 * @{ */
136 #define BLE_GAP_ADV_CHANNEL_37 0x01 /**< Advertising Channel 37 (2402MHz). */
137 #define BLE_GAP_ADV_CHANNEL_38 0x02 /**< Advertising Channel 38 (2426MHz). */
138 #define BLE_GAP_ADV_CHANNEL_39 0x04 /**< Advertising Channel 39 (2480MHz). */
139 #define BLE_GAP_ADV_CHANNEL_37_38_39 0x07 /**< Advertising Channel 37, 38, 39. */
140 /**@} */
141 /**@} */
142
143 /** @addtogroup BLE_GAPM_ENUMERATIONS Enumerations
144 * @{ */
145 /**
146 * @brief GAP role options
147 */
148 typedef enum
149 {
150 BLE_GAP_ROLE_NONE = 0x00, /**< No role set yet. */
151 BLE_GAP_ROLE_OBSERVER = 0x01, /**< Observer role. */
152 BLE_GAP_ROLE_BROADCASTER = 0x02, /**< Broadcaster role. */
153 BLE_GAP_ROLE_CENTRAL = (0x04 | BLE_GAP_ROLE_OBSERVER), /**< Master/Central role. */
154 BLE_GAP_ROLE_PERIPHERAL = (0x08 | BLE_GAP_ROLE_BROADCASTER), /**< Peripheral/Slave role. */
155 BLE_GAP_ROLE_ALL = (BLE_GAP_ROLE_CENTRAL | BLE_GAP_ROLE_PERIPHERAL), /**< Device has all roles, both peripheral and central. */
156 } ble_gap_role_t;
157
158 /**
159 * @brief Own BD address source of the device
160 */
161 typedef enum
162 {
163 BLE_GAP_OWN_ADDR_STATIC = 0, /**< Public or Private Static Address according to device address configuration. */
164 BLE_GAP_OWN_ADDR_GEN_RSLV, /**< Generated resolvable private random address. */
165 BLE_GAP_OWN_ADDR_GEN_NON_RSLV, /**< Generated non-resolvable private random address. */
166 } ble_gap_own_addr_t;
167
168 /**
169 * @brief Write permissions of the device name characteristic
170 */
171 typedef enum
172 {
173 BLE_GAP_WRITE_PERM_DISABLE = 0, /**< Disable write access. */
174 BLE_GAP_WRITE_PERM_NOAUTH, /**< LE Security Mode 1, Level 1. Link does not need to be encrypted or authenticated. */
175 BLE_GAP_WRITE_PERM_UNAUTH, /**< LE Security Mode 1, Level 2. Link needs to be encrypted, but not to be authenticated. */
176 BLE_GAP_WRITE_PERM_AUTH, /**< LE Security Mode 1, Level 3. Link needs to be encrypted and authenticated (MITM). */
177 BLE_GAP_WRITE_PERM_SEC_CON, /**< LE Security Mode 1, Level 4. Link needs to be encrypted and authenticated (secure connections). */
178 } ble_gap_dev_name_write_perm_t;
179
180 /**
181 * @brief Advertising data type
182 */
183 typedef enum
184 {
185 BLE_GAP_ADV_DATA_TYPE_DATA = 0, /**< Advertising data. */
186 BLE_GAP_ADV_DATA_TYPE_SCAN_RSP, /**< Scan response data. */
187 BLE_GAP_ADV_DATA_TYPE_PER_DATA, /**< Periodic advertising data. */
188 } ble_gap_adv_data_type_t;
189
190
191 /**@brief Get device parameters operation code. */
192 typedef enum
193 {
194 BLE_GAP_GET_DEV_VERSION = 0, /**< Get version information for the local Controller. */
195 BLE_GAP_GET_DEV_BDADDR, /**< Get local device BD Address. */
196 //BLE_GAP_GET_DEV_ADV_TX_POWER, /**< Get the transmit power level used for LE advertising channel packets. */
197 BLE_GAP_GET_SUGGESTED_DFLT_LE_DATA_LEN, /**< Get suggested values (SuggestedMaxTxOctets and SuggestedMaxTxTime)
198 for the Controller's maximum transmitted number of payload octets
199 and maximum packet transmission time to be used for new connections. */
200 BLE_GAP_GET_MAX_LE_DATA_LEN, /**< Get the Controller' maximum supported payload octets and packet duration
201 times for transmission and reception (supportedMaxTxOctets and supportedMaxTxTime,
202 supportedMaxRxOctets, and supportedMaxRxTime). */
203 BLE_GAP_GET_NB_ADV_SETS, /**< Read the maximum number of advertising sets currently supported by the controller. */
204 BLE_GAP_GET_MAX_LE_ADV_DATA_LEN, /**< Get maximum data length for advertising data. */
205 BLE_GAP_GET_DEV_TX_POWER, /**< Read the minimum and maximum transmit powers supported by the Controller. */
206 BLE_GAP_GET_DEV_RF_RF_PATH_COMP, /**< Get RF path compensation values. */
207 BLE_GAP_GET_ANTENNA_INFO, /**< Get antenna information. */
208 } ble_gap_dev_info_get_type_t;
209
210 /**@brief GAP advertising modes. */
211 typedef enum
212 {
213 BLE_GAP_ADV_TYPE_ADV_IND = 0, /**< Undirected connectable and scannable mode. */
214 BLE_GAP_ADV_TYPE_ADV_NONCONN_IND, /**< Non-connectable and non-scanable mode. */
215 BLE_GAP_ADV_TYPE_ADV_SCAN_IND, /**< Undirected scannable mode. */
216 BLE_GAP_ADV_TYPE_ADV_HIGH_DIRECT_IND, /**< Directed high duty cycle mode. */
217 BLE_GAP_ADV_TYPE_ADV_LOW_DIRECT_IND, /**< Directed low duty cycle mode. */
218 } ble_gap_adv_mode_t;
219
220 /**@brief GAP discoverability modes. */
221 typedef enum
222 {
223 BLE_GAP_DISC_MODE_NON_DISCOVERABLE = 0, /**< Non-discoverable mode. */
224 BLE_GAP_DISC_MODE_GEN_DISCOVERABLE, /**< General-discoverable mode. */
225 BLE_GAP_DISC_MODE_LIM_DISCOVERABLE, /**< Limited-discoverable mode. */
226 BLE_GAP_DISC_MODE_BROADCASTER, /**< Broadcaster mode. */
227 } ble_gap_disc_mode_t;
228
229 /**
230 * @brief Advertising filter policy
231 */
232 typedef enum
233 {
234 BLE_GAP_ADV_ALLOW_SCAN_ANY_CON_ANY = 0, /**< Allow both scan and connection requests from anyone. */
235 BLE_GAP_ADV_ALLOW_SCAN_WLST_CON_ANY, /**< Allow scan req from white-list devices only and connection req from anyone. */
236 BLE_GAP_ADV_ALLOW_SCAN_ANY_CON_WLST, /**< Allow scan req from anyone and connection req from white-list devices only. */
237 BLE_GAP_ADV_ALLOW_SCAN_WLST_CON_WLST, /**< Allow scan and connection requests from white-list devices only. */
238 } ble_gap_adv_filter_policy_t;
239
240 /** @brief Advertising report type. */
241 typedef enum
242 {
243 BLE_GAP_REPORT_TYPE_ADV_EXT = 0, /**< Extended advertising report. */
244 BLE_GAP_REPORT_TYPE_ADV_LEG, /**< Legacy advertising report. */
245 BLE_GAP_REPORT_TYPE_SCAN_RSP_EXT, /**< Extended scan response report. */
246 BLE_GAP_REPORT_TYPE_SCAN_RSP_LEG, /**< Legacy scan response report. */
247 BLE_GAP_REPORT_TYPE_PER_ADV, /**< Periodic advertising report. */
248 } ble_gap_adv_report_type_t;
249
250 /** @brief Advertising report information. */
251 typedef enum
252 {
253 BLE_GAP_REPORT_INFO_COMPLETE_BIT = (1 << 0), /**< Report is complete. */
254 BLE_GAP_REPORT_INFO_CONN_ADV_BIT = (1 << 1), /**< Connectable advertising. */
255 BLE_GAP_REPORT_INFO_SCAN_ADV_BIT = (1 << 2), /**< Scannable advertising. */
256 BLE_GAP_REPORT_INFO_DIR_ADV_BIT = (1 << 3), /**< Directed advertising. */
257 } ble_gap_adv_report_info_t;
258
259 /** @brief Stop reason code. */
260 typedef enum
261 {
262 BLE_GAP_STOPPED_REASON_TIMEOUT = 0, /**< Stop with timeout. */
263 BLE_GAP_STOPPED_REASON_ON_USER, /**< Stop with user stopping it actively. */
264 BLE_GAP_STOPPED_REASON_CONN_EST /**< Stop with connection established. */
265 } ble_gap_stopped_reason_t;
266
267 /**
268 * @brief Specify what PHY the Controller has changed for TX/RX. HCI:7.7.65.12
269 */
270 typedef enum
271 {
272 BLE_GAP_PHY_UNDEF_VALUE = 0, /**< Undefined LE PHY. */
273 BLE_GAP_PHY_1MBPS_VALUE = 1, /**< LE 1M PHY. */
274 BLE_GAP_PHY_2MBPS_VALUE = 2, /**< LE 2M PHY. */
275 BLE_GAP_PHY_CODED_VALUE = 3, /**< LE Coded PHY. */
276 } ble_gap_le_phy_value_t;
277
278 /**
279 * @brief Advertising type
280 */
281 typedef enum
282 {
283 BLE_GAP_ADV_TYPE_LEGACY = 0, /**< Legacy advertising. */
284 BLE_GAP_ADV_TYPE_EXTENDED, /**< Extended advertising. */
285 BLE_GAP_ADV_TYPE_PERIODIC, /**< Periodic advertising. */
286 } ble_gap_adv_type_t;
287
288 /**
289 * @brief Advertising properties bit field and bit positions
290 */
291 typedef enum
292 {
293 BLE_GAP_ADV_PROP_CONNECTABLE_POS = 0, /**< Indicate that advertising is connectable, reception of CONNECT_REQ or
294 UX_CONNECT_REQ PDUs is accepted. Not applicable for periodic advertising. */
295 BLE_GAP_ADV_PROP_SCANNABLE_POS, /**< Indicate that advertising is scannable, reception of SCAN_REQ or AUX_SCAN_REQ PDUs is accepted. */
296 BLE_GAP_ADV_PROP_DIRECTED_POS, /**< Indicate that advertising targets at a specific device. Only applicable in following cases:
297 - Legacy advertising: if connectable
298 - Extended advertising: connectable or (non-connectable and non-discoverable). */
299 BLE_GAP_ADV_PROP_HDC_POS, /**< Indicate that High Duty Cycle has to be used for advertising on primary channel,
300 applicable only if created advertising is not an extended advertising. */
301 BLE_GAP_ADV_PROP_USE_LEGACY_PDUS_POS, /**< Use legacy advertising PDUs. */
302 BLE_GAP_ADV_PROP_ANONYMOUS_POS, /**< Enable anonymous mode. Device address will not appear in sending PDUs.
303 Valid only if the created advertising is an extended advertising. */
304 BLE_GAP_ADV_PROP_TX_PWR_POS, /**< Include TX power in the extended header of the advertising PDU.
305 Valid only if the created advertising is not a legacy advertising. */
306 BLE_GAP_ADV_PROP_PER_TX_PWR_POS, /**< Include TX power in the periodic advertising PDU.
307 Valid only if the created advertising is a periodic advertising. */
308 BLE_GAP_ADV_PROP_SCAN_REQ_NTF_EN_POS, /**< Indicate if application must be informed about receiving scan request PDUs. */
309 } ble_gap_adv_prop_pos_t;
310
311 /**
312 * @brief Advertising properties bit field bit value
313 */
314 typedef enum
315 {
316 BLE_GAP_ADV_PROP_CONNECTABLE_BIT = CO_BIT(BLE_GAP_ADV_PROP_CONNECTABLE_POS),
317 BLE_GAP_ADV_PROP_SCANNABLE_BIT = CO_BIT(BLE_GAP_ADV_PROP_SCANNABLE_POS),
318 BLE_GAP_ADV_PROP_DIRECTED_BIT = CO_BIT(BLE_GAP_ADV_PROP_DIRECTED_POS),
319 BLE_GAP_ADV_PROP_HDC_BIT = CO_BIT(BLE_GAP_ADV_PROP_HDC_POS),
320 BLE_GAP_ADV_PROP_USE_LEGACY_PDUS_BIT = CO_BIT(BLE_GAP_ADV_PROP_USE_LEGACY_PDUS_POS),
321 BLE_GAP_ADV_PROP_ANONYMOUS_BIT = CO_BIT(BLE_GAP_ADV_PROP_ANONYMOUS_POS),
322 BLE_GAP_ADV_PROP_TX_PWR_BIT = CO_BIT(BLE_GAP_ADV_PROP_TX_PWR_POS),
323 BLE_GAP_ADV_PROP_PER_TX_PWR_BIT = CO_BIT(BLE_GAP_ADV_PROP_PER_TX_PWR_POS),
324 BLE_GAP_ADV_PROP_SCAN_REQ_NTF_EN_BIT = CO_BIT(BLE_GAP_ADV_PROP_SCAN_REQ_NTF_EN_POS),
325 } ble_gap_adv_prop_t;
326
327 /**
328 * @brief Scanning types
329 */
330 typedef enum
331 {
332 BLE_GAP_SCAN_ACTIVE = 0, /**< Active scan type. */
333 BLE_GAP_SCAN_PASSIVE, /**< Passive scan type. */
334 } ble_gap_scan_type_t;
335
336 /**
337 * @brief Scanning modes
338 */
339 typedef enum
340 {
341 BLE_GAP_SCAN_GEN_DISC_MODE = 0, /**< General discoverable mode. */
342 BLE_GAP_SCAN_LIM_DISC_MODE, /**< Limited discoverable mode. */
343 BLE_GAP_SCAN_OBSERVER_MODE, /**< Observer mode. */
344 } ble_gap_scan_mode_t;
345
346 /**
347 * @brief Duplicate filter policy
348 */
349 typedef enum
350 {
351 BLE_GAP_SCAN_FILT_DUPLIC_DIS = 0, /**< Disable filtering of duplicate packets. */
352 BLE_GAP_SCAN_FILT_DUPLIC_EN, /**< Enable filtering of duplicate packets. */
353 } ble_gap_scan_dup_filt_policy_t;
354
355 /**
356 * @brief Extended scanning types
357 */
358 typedef enum
359 {
360 BLE_GAP_EXT_SCAN_TYPE_GEN_DISC = 0, /**< General discovery. */
361 BLE_GAP_EXT_SCAN_TYPE_LIM_DISC, /**< Limited discovery. */
362 BLE_GAP_EXT_SCAN_TYPE_OBSERVER, /**< Observer. */
363 BLE_GAP_EXT_SCAN_TYPE_SEL_OBSERVER, /**< Selective observer. */
364 BLE_GAP_EXT_SCAN_TYPE_CONN_DISC, /**< Connectable discovery. */
365 BLE_GAP_EXT_SCAN_TYPE_SEL_CONN_DISC, /**< Selective connectable discovery. */
366 } ble_gap_ext_scan_type_t;
367
368 /**
369 * @brief Scanning properties bit field bit value
370 */
371 typedef enum
372 {
373 BLE_GAP_EXT_SCAN_PROP_PHY_1M_BIT = (1 << 0), /**< Scan advertisement on the LE 1M PHY. */
374 BLE_GAP_EXT_SCAN_PROP_PHY_CODED_BIT = (1 << 1), /**< Scan advertisement on the LE Coded PHY. */
375 BLE_GAP_EXT_SCAN_PROP_ACTIVE_1M_BIT = (1 << 2), /**< Active scan on LE 1M PHY (scan request PDUs may be sent). */
376 BLE_GAP_EXT_SCAN_PROP_ACTIVE_CODED_BIT = (1 << 3), /**< Active scan on LE Coded PHY (scan request PDUs may be sent). */
377 BLE_GAP_EXT_SCAN_PROP_ACCEPT_RPA_BIT = (1 << 4), /**< Accept directed advertising packets if the uesd RPA and target address cannot be solved by the controller. */
378 BLE_GAP_EXT_SCAN_PROP_FILT_TRUNC_BIT = (1 << 5), /**< Filter truncated advertising or scan response reports. */
379 } ble_gap_scan_prop_t;
380
381 /**
382 * @brief Filtering policy for duplicated packets
383 */
384 typedef enum
385 {
386 BLE_GAP_EXT_DUP_FILT_DIS = 0, /**< Disable filtering of duplicated packets. */
387 BLE_GAP_EXT_DUP_FILT_EN, /**< Enable filtering of duplicated packets. */
388 BLE_GAP_EXT_DUP_FILT_EN_PERIOD, /**< Enable filtering of duplicated packets, reset for each scan period. */
389 } ble_gap_ext_scan_dup_filt_policy_t;
390
391 /**
392 * @brief Initiating types
393 */
394 typedef enum
395 {
396 BLE_GAP_INIT_TYPE_DIRECT_CONN_EST = 0, /**< Direct connection establishment: establish a connection with an indicated device. */
397 BLE_GAP_INIT_TYPE_AUTO_CONN_EST, /**< Automatic connection establishment: establish a connection with all devices whose address is present in the white list. */
398 BLE_GAP_INIT_TYPE_NAME_DISC, /**< Name discovery: establish a connection with an indicated device in order to read content of its device name characteristic. Connection is closed once this operation is stopped. */
399 } ble_gap_init_type_t;
400
401 /**
402 * @brief Initiating properties
403 */
404 typedef enum
405 {
406 BLE_GAP_INIT_PROP_1M_BIT = (1 << 0), /**< Scan connectable advertisements on the LE 1M PHY. Connection parameters for the LE 1M PHY are provided. */
407 BLE_GAP_INIT_PROP_2M_BIT = (1 << 1), /**< Connection parameters for the LE 2M PHY are provided. */
408 BLE_GAP_INIT_PROP_CODED_BIT = (1 << 2), /**< Scan connectable advertisements on the LE Coded PHY. Connection parameters for the LE Coded PHY are provided. */
409 } ble_gap_init_prop_t;
410
411 /**
412 * @brief Periodic synchronization types
413 */
414 typedef enum
415 {
416 BLE_GAP_PER_SYNC_TYPE_GENERAL = 0, /**< Do not use periodic advertiser list for synchronization. */
417 BLE_GAP_PER_SYNC_TYPE_SELECTIVE, /**< Use periodic advertiser list for synchronization. */
418 BLE_GAP_PER_SYNC_TYPE_PAST, /**< Use Periodic advertising sync transfer information send through connection for synchronization. */
419 } ble_gap_per_sync_type_t;
420
421 /**
422 * @brief Auto add white list policy types
423 */
424 typedef enum
425 {
426 BLE_GAP_AUTO_ADD_WHITE_LIST_ALL_ROLE = 0, /**< Auto add white list after bonding with master and slave role. */
427 BLE_GAP_AUTO_ADD_WHITE_LIST_WITH_MASTER, /**< Auto add white list after bonding with master role. */
428 BLE_GAP_AUTO_ADD_WHITE_LIST_WITH_SLAVE, /**< Auto add white list after bonding with slave role. */
429 BLE_GAP_AUTO_ADD_WHITE_LIST_NONE /**< Not auto add white list after bonding. */
430 } ble_gap_auto_add_white_list_policy_type_t;
431
432 /**
433 * @brief Constant Tone Extension sync filtering type
434 */
435 enum gap_sync_cte_type
436 {
437 BLE_GAP_NO_SYNC_IGNORE = 0, /**< The presence or absence of a Constant Tone Extension is irrelevant. */
438 BLE_GAP_NO_SYNC_WITH_AOA = (1 << 0), /**< Do not sync to packets with an AoA Constant Tone Extension. */
439 BLE_GAP_NO_SYNC_WITH_AOD_1US_SLOT = (1 << 1), /**< Do not sync to packets with an AoD Constant Tone Extension with 1us slots. */
440 BLE_GAP_NO_SYNC_WITH_AOD_2US_SLOT = (1 << 2), /**< Do not sync to packets with an AoD Constant Tone Extension with 2us slots. */
441 BLE_GAP_NO_SYNC_WITHOUT_CTE = (1 << 4), /**< Do not sync to packets without a Constant Tone Extension. */
442 };
443
444 /**
445 * @brief Periodic advertising sync information reception mode
446 */
447 enum gap_per_adv_sync_info_rec_mode
448 {
449 BLE_GAP_SYNC_REP_DIS = 0x01, /**< synchronize to the periodic advertising, per adv report events will be disabled. */
450 BLE_GAP_SYNC_REP_EN = 0x02, /**< synchronize to the periodic advertising, per adv report events will be enabled, duplicate filtering disabled. */
451 BLE_GAP_SYNC_REP_EN_DUP = 0x03, /**< synchronize to the periodic advertising, per adv report events will be enabled, duplicate filtering enabled. */
452 };
453
454 /**
455 * @brief Supported AoA AoD switching sampling rate
456 */
457 enum gap_switch_sampling_rate
458 {
459 BLE_GAP_AOD_TX_1_US = (1 << 0), /**< 1 us switching supported for AoD transmission. */
460 BLE_GAP_AOD_RX_1_US = (1 << 1), /**< 1 us switching supported for AoD reception. */
461 BLE_GAP_AOA_RX_1_US = (1 << 2), /**< 1 us switching and sampling supported for AoA reception. */
462 };
463
464 /**
465 * @brief Slot duration type for IQ sampling
466 */
467 enum gap_slot_dur_type
468 {
469 BLE_GAP_SLOT_DURA_1US = 0x01, /**< Switching and sampling slots are 1 us each. */
470 BLE_GAP_SLOT_DURA_2US = 0x02, /**< Switching and sampling slots are 2 us each. */
471 };
472
473 /**
474 * @brief Security level types
475 */
476 enum gap_sec_lvl_type
477 {
478 BLE_GAP_SEC_LVL_NO_SECURITY = 0, /**< No encryption or auth. */
479 BLE_GAP_SEC_LVL_ENC_NO_AUTH, /**< Encryption with no auth. */
480 BLE_GAP_SEC_LVL_LE_ENC_AUTH, /**< Legacy encryption with auth. */
481 BLE_GAP_SEC_LVL_SC_ENC_AUTH, /**< Security connection encryption with auth. */
482 };
483
484 /**
485 * @brief GAP advertising types
486 */
487 typedef enum
488 {
489 BLE_GAP_AD_TYPE_FLAGS = 0x01, /**< Flag. */
490 BLE_GAP_AD_TYPE_MORE_16_BIT_UUID = 0x02, /**< Use of more than 16-bit UUID. */
491 BLE_GAP_AD_TYPE_COMPLETE_LIST_16_BIT_UUID = 0x03, /**< Complete List of 16-bit UUID. */
492 BLE_GAP_AD_TYPE_MORE_32_BIT_UUID = 0x04, /**< Use of more than 32-bit UUD. */
493 BLE_GAP_AD_TYPE_COMPLETE_LIST_32_BIT_UUID = 0x05, /**< Complete List of 32-bit UUID. */
494 BLE_GAP_AD_TYPE_MORE_128_BIT_UUID = 0x06, /**< Use of more than 128-bit UUID. */
495 BLE_GAP_AD_TYPE_COMPLETE_LIST_128_BIT_UUID = 0x07, /**< Complete List of 128-bit UUID. */
496 BLE_GAP_AD_TYPE_SHORTENED_NAME = 0x08, /**< Shortened Device name. */
497 BLE_GAP_AD_TYPE_COMPLETE_NAME = 0x09, /**< Complete Device name. */
498 BLE_GAP_AD_TYPE_TRANSMIT_POWER = 0x0A, /**< Transmit power. */
499 BLE_GAP_AD_TYPE_CLASS_OF_DEVICE = 0x0D, /**< Class of device. */
500 BLE_GAP_AD_TYPE_SP_HASH_C = 0x0E, /**< Simple Pairing Hash C. */
501 BLE_GAP_AD_TYPE_SP_RANDOMIZER_R = 0x0F, /**< Simple Pairing Randomizer. */
502 BLE_GAP_AD_TYPE_TK_VALUE = 0x10, /**< Temporary key value. */
503 BLE_GAP_AD_TYPE_OOB_FLAGS = 0x11, /**< Out of Band Flag. */
504 BLE_GAP_AD_TYPE_SLAVE_CONN_INT_RANGE = 0x12, /**< Slave connection interval range. */
505 BLE_GAP_AD_TYPE_RQRD_16_BIT_SVC_UUID = 0x14, /**< Require 16-bit service UUID. */
506 BLE_GAP_AD_TYPE_RQRD_32_BIT_SVC_UUID = 0x1F, /**< Require 32-bit service UUID. */
507 BLE_GAP_AD_TYPE_RQRD_128_BIT_SVC_UUID = 0x15, /**< Require 128-bit service UUID. */
508 BLE_GAP_AD_TYPE_SERVICE_16_BIT_DATA = 0x16, /**< Service data 16-bit UUID. */
509 BLE_GAP_AD_TYPE_SERVICE_32_BIT_DATA = 0x20, /**< Service data 32-bit UUID. */
510 BLE_GAP_AD_TYPE_SERVICE_128_BIT_DATA = 0x21, /**< Service data 128-bit UUID. */
511 BLE_GAP_AD_TYPE_PUB_TGT_ADDR = 0x17, /**< Public Target Address. */
512 BLE_GAP_AD_TYPE_RAND_TGT_ADDR = 0x18, /**< Random Target Address. */
513 BLE_GAP_AD_TYPE_APPEARANCE = 0x19, /**< Appearance. */
514 BLE_GAP_AD_TYPE_ADV_INTV = 0x1A, /**< Advertising Interval. */
515 BLE_GAP_AD_TYPE_LE_BT_ADDR = 0x1B, /**< LE Bluetooth Device Address. */
516 BLE_GAP_AD_TYPE_LE_ROLE = 0x1C, /**< LE Role. */
517 BLE_GAP_AD_TYPE_SPAIR_HASH = 0x1D, /**< Simple Pairing Hash C-256. */
518 BLE_GAP_AD_TYPE_SPAIR_RAND = 0x1E, /**< Simple Pairing Randomizer R-256. */
519 BLE_GAP_AD_TYPE_3D_INFO = 0x3D, /**< 3D Information Data. */
520
521 BLE_GAP_AD_TYPE_MANU_SPECIFIC_DATA = 0xFF, /**< Manufacturer specific data. */
522 } ble_gap_ad_type_t;
523
524 /**
525 * @brief AD Type Flag - Bit mask.
526 */
527 typedef enum
528 {
529 BLE_GAP_ADV_FLAG_LE_LIMITED_DISC_MODE = 0x01, /**< Limited discovery flag: AD Flag. */
530 BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE = 0x02, /**< General discovery flag: AD Flag. */
531 BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED = 0x04, /**< Legacy BT not supported: AD Flag. */
532 BLE_GAP_ADV_FLAG_SIMUL_BR_EDR_LE_CONTROLLER = 0x08, /**< Dual mode for controller supported (BR/EDR/LE): AD Flag. */
533 BLE_GAP_ADV_FLAG_SIMUL_BR_EDR_LE_HOST = 0x10, /**< Dual mode for host supported (BR/EDR/LE): AD Flag. */
534 } ble_gap_adv_flags_t;
535
536 /**
537 * @brief Privacy mode.
538 */
539
540 typedef enum
541 {
542 BLE_GAP_PRIVACY_MODE_NETWORK= 0x00, /**< Set to the network privacy mode for the peer device. */
543 BLE_GAP_PRIVACY_MODE_DEVICE = 0x01, /**< Set to the device privacy mode for the peer device. */
544 } ble_gap_privacy_mode_t;
545
546 /**
547 * @brief Possible roles of the activity.
548 */
549 typedef enum
550 {
551 BLE_GAP_ACTIVITY_ROLE_ADV = 0, /**< Advertise role. */
552 BLE_GAP_ACTIVITY_ROLE_CON = 1, /**< Connect role. */
553 BLE_GAP_ACTIVITY_ROLE_SCAN_INIT = 2, /**< Scan/Init role. */
554 BLE_GAP_ACTIVITY_ROLE_UNKNOWN = 0xf, /**< Unknown role. */
555 } ble_gap_actv_role_t;
556
557 /**
558 * @brief Activity type.
559 */
560 typedef enum
561 {
562 BLE_GAP_ACTV_TYPE_ADV = 0,
563 BLE_GAP_ACTV_TYPE_SCAN,
564 BLE_GAP_ACTV_TYPE_INIT,
565 BLE_GAP_ACTV_TYPE_PER_SYNC,
566 } ble_gap_actv_type_t;
567 /** @} */
568
569 /**@addtogroup BLE_GAPM_STRUCTURES Structures
570 * @{ */
571
572 /**
573 * @brief Advertising parameters for legacy advertising
574 */
575 typedef struct
576 {
577 uint8_t adv_mode; /**< Advertising mode (see enum @ref ble_gap_adv_mode_t). */
578 uint8_t disc_mode; /**< Discovery mode (see enum @ref ble_gap_disc_mode_t). */
579 uint8_t filter_pol; /**< Advertising filtering policy (see enum @ref ble_gap_adv_filter_policy_t). */
580 ble_gap_bdaddr_t peer_addr; /**< Peer address configuration (only used in case of directed advertising, or used to locate the IRK list). */
581 uint16_t adv_intv_min; /**< Minimum advertising interval (in unit of 625 us). Must be greater than 20 ms. */
582 uint16_t adv_intv_max; /**< Maximum advertising interval (in unit of 625 us). Must be greater than 20 ms. */
583 uint8_t chnl_map; /**< Advertising channel map. See @ref BLE_GAP_ADV_CHANNEL. */
584 bool scan_req_ind_en; /**< Indicate if the application should be informed when receiving a scan request from the scanner. */
585 int8_t max_tx_pwr; /**< Tx power, unit(dBm).
586 BLE_RF_TX_MODE_SPA_MODE support value:[-20, -16, -10, -8, -5, 0, 1, 2, 3, 4, 5].
587 BLE_RF_TX_MODE_HPA_MODE support value:[-10, -5, 0, 1, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]. */
588 } ble_gap_adv_param_t;
589
590 /**
591 * @brief Configuration for advertising on primary channel
592 */
593 typedef struct
594 {
595 uint32_t adv_intv_min; /**< Minimum advertising interval (in unit of 625 us). Must be greater than 20 ms. */
596 uint32_t adv_intv_max; /**< Maximum advertising interval (in unit of 625 us). Must be greater than 20 ms. */
597 uint8_t chnl_map; /**< Bit field indicating the channel map. See @ref BLE_GAP_ADV_CHANNEL. */
598 ble_gap_le_phy_value_t phy; /**< Indicate on which PHY primary advertising has to be performed. See enum @ref ble_gap_le_phy_value_t.
599 Note that LE 2M PHY is not allowed and that legacy advertising only supports LE 1M PHY. */
600 } ble_gap_adv_prim_cfg_t;
601
602 /**
603 * @brief Configuration for advertising on secondary channel
604 */
605 typedef struct
606 {
607 uint8_t max_skip; /**< Maximum number of advertising events the controller can skip before sending the AUX_ADV_IND packets.
608 The range is 0x00 to 0xFF. 0x00 means that AUX_ADV_IND PDUs shall be sent prior to each advertising events. */
609 ble_gap_le_phy_value_t phy; /**< Indicate on which PHY secondary advertising has to be performed. See enum @ref ble_gap_le_phy_value_t. */
610 uint8_t adv_sid; /**< Advertising SID. Allowed range is 0x00 to 0x0F. */
611 } ble_gap_adv_second_cfg_t;
612
613 /**
614 * @brief Configuration for periodic advertising
615 */
616 typedef struct
617 {
618 uint16_t adv_intv_min; /**< Minimum advertising interval (in unit of 1.25 ms). Must be greater than 20 ms. */
619 uint16_t adv_intv_max; /**< Maximum advertising interval (in unit of 1.25 ms). Must be greater than 20 ms. */
620 bool inc_adi_flag; /**< Flag for include the ADI field in AUX_SYNC_IND PDUs. */
621 } ble_gap_adv_period_cfg_t;
622
623 /**
624 * @brief Advertising parameters for extended advertising and periodic advertising
625 */
626 typedef struct
627 {
628 uint8_t type; /**< Advertising type (see enum @ref ble_gap_adv_type_t). */
629 uint8_t disc_mode; /**< Discovery mode (see enum @ref ble_gap_disc_mode_t). */
630 uint16_t prop; /**< Bit field value provided by advertising properties. See enum @ref ble_gap_adv_prop_t for bit signification. */
631 int8_t max_tx_pwr; /**< Maximum power level at which the advertising packets have to be transmitted (between -127 and 20 dBm). */
632 uint8_t filter_pol; /**< Advertising filtering policy (see enum @ref ble_gap_adv_filter_policy_t). */
633 ble_gap_bdaddr_t peer_addr; /**< Peer address configuration (only used in case of directed advertising or used to locate the IRK list). */
634 ble_gap_adv_prim_cfg_t prim_cfg; /**< Configuration for primary advertising. */
635 ble_gap_adv_second_cfg_t second_cfg; /**< Configuration for secondary advertising (valid only if advertising type is GAP_ADV_TYPE_EXTENDED or GAP_ADV_TYPE_PERIODIC). */
636 ble_gap_adv_period_cfg_t period_cfg; /**< Configuration for periodic advertising (valid only if advertising type is GAP_ADV_TYPE_PERIODIC). */
637 } ble_gap_ext_adv_param_t;
638
639 /**
640 * @brief Advertising timing parameter
641 */
642 typedef struct
643 {
644 uint16_t duration; /**< Advertising duration (in unit of 10ms). 0 means that advertising continues until the host disables it.
645 If Advertising discovery mode is GAP_DISC_MODE_LIM_DISCOVERABLE (see enum @ref ble_gap_disc_mode_t),
646 the setting duration range is [1, 18000].
647 If adv mode is high duty, duration time range is [1, 128]. */
648 uint8_t max_adv_evt; /**< Maximum number of extended advertising events. The controller shall attempt to send prior to terminating the extending advertising.
649 The range is [0, 255]. 0 means no maximum number of advertising events. Valid only if the created advertising is an extended advertising. */
650 } ble_gap_adv_time_param_t;
651
652 /**
653 * @brief Security key
654 */
655 typedef struct
656 {
657 uint8_t key[BLE_GAP_MAX_KEY_LEN]; /**< Key value MSB -> LSB (MSB followed by LSB). */
658 } ble_gap_sec_key_t;
659
660 /**
661 * @brief Parameters for legacy scanning
662 */
663 typedef struct
664 {
665 ble_gap_scan_type_t scan_type; /**< Active scanning or passive scanning. */
666 ble_gap_scan_mode_t scan_mode; /**< Scan mode. */
667 ble_gap_scan_dup_filt_policy_t scan_dup_filt; /**< Duplicate filter policy. */
668 bool use_whitelist; /**< Filter policy. */
669 uint16_t interval; /**< Scan interval between 0x0004 and 0x4000 in 0.625 ms (range: 2.5 ms to 10.24s). */
670 uint16_t window; /**< Scan window between 0x0004 and 0x4000 in 0.625 ms (range: 2.5 ms to 10.24s). */
671 uint16_t timeout; /**< Scan timeout should be a value between 0x0001 and 0xFFFF(unit: 10 ms). 0x0000 indicates that the timeout has no effect. */
672 } ble_gap_scan_param_t;
673
674 /**
675 * @brief Scan Window operation parameters
676 */
677 typedef struct
678 {
679 uint16_t scan_intv; /**< Scan interval between 0x0004 and 0xFFFF in 0.625 ms (range: 2.5 ms to 40.959375s). */
680 uint16_t scan_wd; /**< Scan window between 0x0004 and 0xFFFF in 0.625 ms (range: 2.5 ms to 40.959375s). */
681 } ble_gap_scan_wd_op_param_t;
682
683 /**
684 * @brief Parameters for extended scanning
685 */
686 typedef struct
687 {
688 uint8_t type; /**< Type of scanning to be started (see enum @ref ble_gap_ext_scan_type_t). */
689 uint8_t prop; /**< Properties for the scan procedure (see enum @ref ble_gap_scan_prop_t for bit signification). */
690 uint8_t dup_filt_pol; /**< Duplicate packet filtering policy (see enum @ref ble_gap_ext_scan_dup_filt_policy_t). */
691 uint8_t rsvd; /**< Reserved for future use. */
692 ble_gap_scan_wd_op_param_t scan_param_1m; /**< Scan window opening parameters for LE 1M PHY. */
693 ble_gap_scan_wd_op_param_t scan_param_coded; /**< Scan window opening parameters for LE Coded PHY. */
694 uint16_t duration; /**< Scan duration (in unit of 10ms). 0 means that the controller will scan continuously
695 until receiving a stop command from the application (10 ms to 655.35s). */
696 uint16_t period; /**< Scan period, which is the time interval between two consequent starts of a scan duration by the controller.
697 0 means that the scan procedure is not periodic, in unit of 1.28s (1.28s to 83,884.8s). */
698 } ble_gap_ext_scan_param_t;
699
700 /**
701 * @brief Periodic advertising information
702 */
703 typedef struct
704 {
705 ble_gap_bdaddr_t bd_addr; /**< Advertiser address information. */
706 uint8_t adv_sid; /**< Advertising SID. */
707 } ble_gap_period_adv_addr_cfg_t;
708
709 /**
710 * @brief Periodic advertising synchronization parameters
711 */
712 typedef struct
713 {
714 uint16_t skip; /**< Number of periodic advertising that can be skipped after a successful reception.
715 Maximum authorized value is 499. */
716 uint16_t sync_to; /**< Synchronization timeout for the periodic advertising (in unit of 10ms between 100ms and 163.84s). */
717 uint8_t type; /**< Periodic synchronization type (see enum @ref ble_gap_per_sync_type_t). */
718 uint8_t rsvd; /**< Reserved for future use.*/
719 ble_gap_period_adv_addr_cfg_t adv_addr; /**< Address of advertiser with which synchronization has to be established(used only if use_pal is false). */
720 bool report_disable; /**< true to disable periodic advertising report, false to enable them by default.*/
721 uint8_t cte_type; /**< Type of Constant Tone Extension device should sync on (@see enum gap_sync_cte_type). */
722 } ble_gap_per_sync_param_t;
723
724 /**
725 * @brief Set connectionless CTE transmit parameters
726 */
727 typedef struct
728 {
729 uint8_t cte_len; /**< CTE length (8us unit, range 0x02 to 0x14). */
730 uint8_t cte_type; /**< CTE type (0: AOA | 1: AOD-1us | 2: AOD-2us) (@see enum gap_cte_type_t). */
731 uint8_t cte_count; /**< CTE count (number of CTEs to transmit in each periodic advertising interval, range 0x01 to 0x10). */
732 uint8_t num_antenna; /**< The number of Antenna IDs in the pattern (range 0x02 to 0x4B). */
733 uint8_t *antenna_id; /**< List of Antenna IDs in the pattern. */
734 } gap_connless_cte_trans_param_t;
735
736 /**
737 * @brief Set connectionless IQ sampling enable parameter
738 */
739 typedef struct
740 {
741 uint8_t slot_dur; /**< The slot duration for IQ sampling, see enum @ref gap_slot_dur_type. */
742 uint8_t max_smaple_cte; /**< The maximum number of CTE to sample and report in each periodic advertising interval (range 0x00 to 0x10).
743 0x00: Sample and report all available CTE. */
744 uint8_t antenna_num; /**< The number of antenna IDs in the pattern (range 0x02 to 0x4B). */
745 uint8_t *antenna_id; /**< List of Antenna IDs in the pattern. */
746 } ble_gap_connless_iq_sample_param_t;
747
748 /**
749 * @brief Legacy initiating parameters
750 */
751 typedef struct
752 {
753 uint8_t type; /**< Initiating type (see enum @ref ble_gap_init_type_t). */
754 ble_gap_bdaddr_t peer_addr; /**< Peer device address. */
755 uint16_t interval_min; /**< Minimum value for the connection interval (in unit of 1.25ms). Shall be less than or equal to interval_max value.
756 Allowed range is 7.5 ms to 4s. */
757 uint16_t interval_max; /**< Maximum value for the connection interval (in unit of 1.25ms). Shall be greater than or equal to interval_min value.
758 Allowed range is 7.5 ms to 4s. */
759 uint16_t slave_latency; /**< Slave latency. Number of events that can be missed by a connected slave device. */
760 uint16_t sup_timeout; /**< Link supervision timeout (in unit of 10ms). Allowed range is 100 ms to 32s. */
761 uint16_t conn_timeout; /**< Timeout for connection establishment (in unit of 10ms).
762 Cancel the procedure if connection has not been connected when the timeout occurs.
763 0 means there is no timeout. */
764 } ble_gap_init_param_t;
765
766
767 /**
768 * @brief Connection parameters
769 */
770 typedef struct
771 {
772 uint16_t conn_intv_min; /**< Minimum value for the connection interval (in unit of 1.25ms). Shall be less than or equal to conn_intv_max value.
773 Allowed range is 7.5 ms to 4s. */
774 uint16_t conn_intv_max; /**< Maximum value for the connection interval (in unit of 1.25ms). Shall be greater than or equal to conn_intv_min value.
775 Allowed range is 7.5 ms to 4s. */
776 uint16_t conn_latency; /**< Slave latency. Number of events that can be missed by a connected slave device. */
777 uint16_t supervision_to; /**< Link supervision timeout (in unit of 10ms). Allowed range is 100 ms to 32s. */
778 uint16_t ce_len_min; /**< The min length of connection event needed for this LE connection. Range: 0x0002 to 0xFFFF, Unit:0.625 ms, Time Range: 1.25 ms to 40.9 s. */
779 uint16_t ce_len_max; /**< The max length of connection event needed for this LE connection. Range: 0x0002 to 0xFFFF, Unit:0.625 ms, Time Range: 1.25 ms to 40.9 s. */
780 } ble_gap_ext_conn_param_t;
781
782 /**
783 * @brief Extended initiating parameters
784 */
785 typedef struct
786 {
787 uint8_t type; /**< Initiating type (see enum @ref ble_gap_init_type_t). */
788 uint8_t prop; /**< Properties for the initiating procedure (see enum @ref ble_gap_init_prop_t for bit signification). */
789 uint16_t conn_to; /**< Timeout for automatic connection establishment (in unit of 10ms).
790 Cancel the procedure if connection has not been connected when the timeout occurs.
791 0 means there is no timeout. */
792 ble_gap_scan_wd_op_param_t scan_param_1m; /**< Scan window opening parameters for LE 1M PHY. */
793 ble_gap_scan_wd_op_param_t scan_param_coded; /**< Scan window opening parameters for LE Coded PHY. */
794 ble_gap_ext_conn_param_t conn_param_1m; /**< Connection parameters for LE 1M PHY. */
795 ble_gap_ext_conn_param_t conn_param_2m; /**< Connection parameters for LE 2M PHY. */
796 ble_gap_ext_conn_param_t conn_param_coded; /**< Connection parameters for LE Coded PHY. */
797 ble_gap_bdaddr_t peer_addr; /**< Address of peer device in case white list is not used for connection. */
798 } ble_gap_ext_init_param_t;
799
800 /**
801 * @brief LE Protocol/Service Multiplexer information
802 */
803 typedef struct
804 {
805 uint16_t le_psm; /**< LE Protocol/Service Multiplexer (range: 1 to 255), PSMs should be odd. */
806 uint8_t sec_lvl; /**< Security level requirement, see @ref gap_sec_lvl_type. */
807 bool mks_flag; /**< Whether to use maximum-size key (16 bytes) or not. */
808 } ble_gap_lepsm_register_t;
809
810 /**
811 * @brief Bonded device list
812 */
813 typedef struct
814 {
815 uint8_t num; /**< Number of bonded device. */
816 ble_gap_bdaddr_t *items; /**< Bonded device addr info. */
817 } ble_gap_bond_dev_list_t;
818
819 /**
820 * @brief White list
821 */
822 typedef struct
823 {
824 uint8_t num; /**< Number of available items. */
825 ble_gap_bdaddr_t items[BLE_GAP_MAX_WL_NUM]; /**< Content of each item. */
826 } ble_gap_white_list_t;
827
828 /**
829 * @brief Periodic advertising list
830 */
831 typedef struct
832 {
833 uint8_t num; /**< Number of available items. */
834 ble_gap_period_adv_addr_cfg_t items[BLE_GAP_MAX_PRD_ADV_NUM]; /**< Content of each item. */
835 } ble_gap_period_adv_list_t;
836
837 /**
838 * @brief RPA list item info
839 */
840 typedef struct
841 {
842 ble_gap_bdaddr_t bd_addr; /**< Peer device identity. */
843 uint8_t priv_mode; /**< Privacy mode, see enum @ref ble_gap_privacy_mode_t. */
844 uint8_t peer_irk[BLE_GAP_MAX_KEY_LEN]; /**< Peer IRK. */
845 uint8_t local_irk[BLE_GAP_MAX_KEY_LEN]; /**< Local IRK. */
846 } ble_gap_ral_dev_info_t;
847
848 /**
849 * @brief RPA list info
850 */
851 typedef struct
852 {
853 uint8_t offset; /**< offset of RPA list. */
854 uint8_t num; /**< Number of RPA list. */
855 ble_gap_ral_dev_info_t *items; /**< RPA list item info. */
856 } ble_gap_ral_dev_list_t;
857
858 /** @brief Advertising Stop info. */
859 typedef struct
860 {
861 ble_gap_stopped_reason_t reason; /**< The reason for the advertising stop. */
862 } ble_gap_evt_adv_stop_t;
863
864 /** @brief Scan request info. */
865 typedef struct
866 {
867 ble_gap_bdaddr_t peer_addr; /**< Peer address. */
868 } ble_gap_evt_scan_req_t;
869
870 /** @brief Scan Stop info struct. */
871 typedef struct
872 {
873 ble_gap_stopped_reason_t reason; /**< The reason why the scan stopped. */
874 } ble_gap_evt_scan_stop_t;
875
876 /** @brief Advertising report event for @ref BLE_GAPM_EVT_ADV_REPORT. */
877 typedef struct
878 {
879 ble_gap_adv_report_type_t adv_type; /**< Advertising type. @ref ble_gap_adv_report_type_t. */
880 ble_gap_adv_report_info_t adv_info; /**< Bit field providing information about the received report. @ref ble_gap_adv_report_info_t. */
881 ble_gap_bdaddr_t broadcaster_addr; /**< Broadcaster device address. */
882 ble_gap_bdaddr_t direct_addr; /**< Target address (in case of a directed advertising report). */
883 int8_t tx_pwr; /**< TX power (in dBm). */
884 int8_t rssi; /**< RSSI (between -127 and +20 dBm). */
885 uint8_t phy_prim; /**< Primary PHY on which advertising report has been received. */
886 uint8_t phy_second; /**< Secondary PHY on which advertising report has been received. */
887 uint8_t adv_sid; /**< Advertising SID , valid only for periodic advertising report. */
888 uint16_t period_adv_intv; /**< Periodic advertising interval (in unit of 1.25ms, min is 7.5ms), valid only for periodic advertising report. */
889 uint8_t per_sync_idx; /**< Periodic syncronization index, valid only for periodic advertising report. */
890 uint16_t length; /**< Report length. */
891 uint8_t *data; /**< Report. */
892 } ble_gap_evt_adv_report_t;
893
894 /** @brief Sync established event for @ref BLE_GAPM_EVT_SYNC_ESTABLISH. */
895 typedef struct
896 {
897 uint8_t phy; /**< PHY on which synchronization has been established. */
898 uint16_t intv; /**< Periodic advertising interval (in unit of 1.25ms, min is 7.5ms). */
899 uint8_t adv_sid; /**< Advertising SID. */
900 uint8_t clk_acc; /**< Advertiser clock accuracy. */
901 ble_gap_bdaddr_t bd_addr; /**< Advertiser address. */
902 uint16_t sync_hdl; /**< Sync handle. */
903 } ble_gap_evt_sync_established_t;
904
905 /** @brief Resolvable address report event for @ref BLE_GAPM_EVT_RSLV_ADDR_REPORT. */
906 typedef struct
907 {
908 ble_gap_actv_type_t type; /**< Activity type. @ref ble_gap_actv_type_t. */
909 ble_gap_addr_t rpa_addr; /**< Rpa address info. */
910 } ble_gap_evt_rslv_addr_report_t;
911
912 /** @brief Identity address report event for @ref BLE_GAPM_EVT_IDEN_ADDR_REPORT. */
913 typedef struct
914 {
915 ble_gap_bdaddr_t iden_addr; /**< Identity address info. */
916 uint8_t irk[BLE_GAP_MAX_KEY_LEN]; /**< Irk info. */
917 } ble_gap_evt_iden_addr_report_t;
918
919 typedef struct
920 {
921 uint16_t rcv_packet_num; /**< Received packet number. */
922 } ble_gap_evt_dtm_test_end_report_t;
923
924 /**@brief BLE GAPM event structure. */
925 typedef struct
926 {
927 uint8_t index; /**< Index of connection or advertising. */
928 union
929 {
930 ble_gap_evt_adv_stop_t adv_stop; /**< Advertising stop parameter. */
931 ble_gap_evt_scan_req_t scan_req; /**< Scan Request parameter. */
932 ble_gap_evt_scan_stop_t scan_stop; /**< Scan Stop parameter. */
933 ble_gap_evt_adv_report_t adv_report; /**< Advertising Report parameter. */
934 ble_gap_evt_sync_established_t sync_established; /**< Periodic Advertising Synchronization Established parameter. */
935 ble_gap_evt_rslv_addr_report_t rslv_addr_report; /**< Resolvable Address report parameter, generated by host. */
936 ble_gap_evt_iden_addr_report_t iden_addr_report; /**< Report identity address. */
937 ble_gap_evt_dtm_test_end_report_t dtm_test_end_report; /**< Report dtm test end result. */
938 } params; /**< Event Parameters. */
939 } ble_gapm_evt_t;
940 /** @} */
941
942 /** @addtogroup BLE_GAPM_FUNCTION Functions
943 * @{ */
944
945 /**
946 ****************************************************************************************
947 * @brief Decide whether to support the pair feature.
948 *
949 * @param[in] enable: Support flag.
950 ****************************************************************************************
951 */
952 void ble_gap_pair_enable(bool enable);
953
954 /**
955 ****************************************************************************************
956 * @brief Set the device identity address (public or random static).
957 *
958 * @param[in] p_addr: Provided public or static random address. If addr_type = 0, it means public address,
959 * If addr_type = 1, it means static random address.
960 *
961 * @retval SDK_SUCCESS: Operation is successful.
962 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
963 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
964 ****************************************************************************************
965 */
966 uint16_t ble_gap_addr_set(ble_gap_bdaddr_t const *p_addr);
967
968 /**
969 ****************************************************************************************
970 * @brief Get the device identity address (public or random static).
971 *
972 * @param[in] p_addr: The pointer for the returned identity address.
973 *
974 * @retval SDK_SUCCESS: Operation is successful.
975 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
976 ****************************************************************************************
977 */
978 uint16_t ble_gap_addr_get(ble_gap_bdaddr_t *p_addr);
979
980 /**
981 ****************************************************************************************
982 * @brief Set the tx power.
983 *
984 * @param[in] role: Select the role to set tx power. @ref ble_gap_actv_role_t for possible roles.
985 * @param[in] index: The idx parameter is interpreted on role.
986 * -If role is @ref BLE_GAP_ACTIVITY_ROLE_ADV, it's the index of Advertising.
987 * -If role is @ref BLE_GAP_ACTIVITY_ROLE_CON, it's the index of connection.
988 * -For all other roles, it should be ignored.
989 * @param[in] txpwr_dbm: Tx power, unit(dBm).
990 * BLE_RF_TX_MODE_SPA_MODE support value:[-20, -16, -10, -8, -5, 0, 1, 2, 3, 4, 5]
991 * BLE_RF_TX_MODE_HPA_MODE support value:[-10, -5, 0, 1, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
992 *
993 * @retval SDK_SUCCESS: Operation is Success.
994 * @retval SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
995 * @retval SDK_ERR_INVALID_ADV_IDX: Invalid advertising index supplied.
996 * @retval SDK_ERR_INVALID_HANDLE: Invalid handle supplied.
997 ****************************************************************************************
998 */
999 uint16_t ble_gap_tx_power_set(ble_gap_actv_role_t role, uint8_t index, int8_t txpwr_dbm);
1000
1001 /**
1002 ****************************************************************************************
1003 * @brief Get the tx power.
1004 *
1005 * @param[in] role: Select the role to Get tx power. @ref ble_gap_actv_role_t for possible roles.
1006 * @param[in] index: The idx parameter is interpreted on role.
1007 * If role is @ref BLE_GAP_ACTIVITY_ROLE_ADV, it's the index of Advertising.
1008 * If role is @ref BLE_GAP_ACTIVITY_ROLE_CON, it's the index of connection.
1009 * For all other roles, it should be ignored.
1010 * @param[out] txpwr_dbm: Tx power, unit(dBm).
1011 * BLE_RF_TX_MODE_SPA_MODE support value:[-20, -16, -10, -8, -5, 0, 1, 2, 3, 4, 5]
1012 * BLE_RF_TX_MODE_HPA_MODE support value:[-10, -5, 0, 1, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
1013 *
1014 * @retval SDK_SUCCESS: Operation is Success.
1015 * @retval SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1016 * @retval SDK_ERR_INVALID_ADV_IDX: Invalid advertising index supplied.
1017 * @retval SDK_ERR_INVALID_HANDLE: Invalid handle supplied.
1018 ****************************************************************************************
1019 */
1020 uint16_t ble_gap_tx_power_get(ble_gap_actv_role_t role, uint8_t index, int8_t *txpwr_dbm);
1021
1022 /**
1023 ****************************************************************************************
1024 * @brief Set the default tx power for connection.
1025 *
1026 * @param[in] txpwr_dbm: Tx power, unit(dBm).
1027 * BLE_RF_TX_MODE_SPA_MODE support value:[-20, -16, -10, -8, -5, 0, 1, 2, 3, 4, 5]
1028 * BLE_RF_TX_MODE_HPA_MODE support value:[-10, -5, 0, 1, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
1029 *
1030 ****************************************************************************************
1031 */
1032 void ble_gap_default_conn_tx_power_set(int8_t txpwr_dbm);
1033
1034 /**
1035 ****************************************************************************************
1036 * @brief Get the default tx power for connection.
1037 *
1038 * @param[out] txpwr_dbm: Tx power, unit(dBm).
1039 * BLE_RF_TX_MODE_SPA_MODE support value:[-20, -16, -10, -8, -5, 0, 1, 2, 3, 4, 5]
1040 * BLE_RF_TX_MODE_HPA_MODE support value:[-10, -5, 0, 1, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
1041 *
1042 ****************************************************************************************
1043 */
1044 void ble_gap_default_conn_tx_power_get(int8_t *txpwr_dbm);
1045
1046 /**
1047 ****************************************************************************************
1048 * @brief Set IRK used for resolvable random BD address generation (LSB first).
1049 *
1050 * @param[in] p_irk: Device IRK (Identity Resolving Key).
1051 *
1052 * @retval SDK_SUCCESS: Operation is successful.
1053 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1054 ****************************************************************************************
1055 */
1056 uint16_t ble_gap_irk_set(ble_gap_sec_key_t* p_irk);
1057
1058 /**
1059 ****************************************************************************************
1060 * @brief Set privacy related parameters.
1061 * @param[in] renew_dur: Duration before regenerating a device address when privacy is enabled in seconds. Range: 0x0096 (150s) ~ 0xA1B8 (11.5 hr).
1062 * The suggested time is 900s(15 minutes).
1063 * @param[in] enable_flag: Indicate the controller privacy is enabled or disabled.
1064 *
1065 * @retval SDK_SUCCESS: Operation is successful.
1066 * @retval SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1067 ****************************************************************************************
1068 */
1069 uint16_t ble_gap_privacy_params_set(uint16_t renew_dur, bool enable_flag);
1070
1071 /**
1072 ****************************************************************************************
1073 * @brief Set suggested default LE data length.
1074 *
1075 * @param[in] sugg_max_tx_octet: Suggested value for the Controller's maximum transmitted number of payload octets to be used, the range is 27~251.
1076 * @param[in] sugg_max_tx_time: Suggested value for the Controller's maximum packet transmission time to be used, the range is 328~2120.
1077 *
1078 * @retval SDK_SUCCESS: Operation is successful.
1079 * @retval SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1080 ****************************************************************************************
1081 */
1082 uint16_t ble_gap_data_length_set(uint16_t sugg_max_tx_octet,uint16_t sugg_max_tx_time);
1083
1084 /**
1085 ****************************************************************************************
1086 * @brief Set L2CAP related parameters.
1087 *
1088 * @param[in] max_mtu: Maximal MTU acceptable for device, the range is 65~512.
1089 * @param[in] max_mps: Maximal MPS Packet size acceptable for device (for COC SDU), the range is 65~max_mtu.
1090 * @param[in] max_nb_lecb: Maximum number of LE Credit based connection that can be established, this range is 0x00~0x20.
1091 * The actual number is decided by resource available.
1092 *
1093 * @retval SDK_SUCCESS: Operation is successful.
1094 * @retval SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1095 *
1096 * @note If these parameters are not set, the stack will config the default value as (max_mtu = 512, max_mps = 512 and max_nb_lecb = 10).
1097 ****************************************************************************************
1098 */
1099 uint16_t ble_gap_l2cap_params_set(uint16_t max_mtu,uint16_t max_mps,uint8_t max_nb_lecb);
1100
1101 /**
1102 ****************************************************************************************
1103 * @brief Set the preferred values for the transmitter PHY and receiver PHY.
1104 *
1105 * @param[in] tx_pref_phy: A bit field that indicates the transmitter PHYs that the Host prefers the Controller to use(see @ref ble_gap_phy_bit_t).
1106 * @param[in] rx_pref_phy: A bit field that indicates the receiver PHYs that the Host prefers the Controller to use(see @ref ble_gap_phy_bit_t).
1107 ****************************************************************************************
1108 */
1109 void ble_gap_pref_phy_set(uint8_t tx_pref_phy, uint8_t rx_pref_phy);
1110
1111 /**
1112 ****************************************************************************************
1113 * @brief Set the RF path gain or loss between the RF transceiver and the antenna contributed by intermediate components.
1114 *
1115 * @param[in] tx_path_comp: RF TX Path Compensation value (from -128dB to 128dB, unit is 0.1dB).
1116 * @param[in] rx_path_comp: RF RX Path Compensation value (from -128dB to 128dB, unit is 0.1dB).
1117 *
1118 * @retval SDK_SUCCESS: Operation is successful.
1119 * @retval SDK_ERR_INVALID_PARAM: The parameter is invalid.
1120 ****************************************************************************************
1121 */
1122 uint16_t ble_gap_path_compensation_set(int16_t tx_path_comp, int16_t rx_path_comp);
1123
1124 /**
1125 ****************************************************************************************
1126 * @brief Set GAP Peripheral Preferred Connection Parameters present flag.
1127 *
1128 * @param[in] present_flag: Present or not.
1129 ****************************************************************************************
1130 */
1131 void ble_gap_ppcp_present_set(bool present_flag);
1132
1133 /**
1134 ****************************************************************************************
1135 * @brief Set channel map.
1136 *
1137 * @param[in] p_chnl_map: Bitmask of LE channel map, @ref ble_gap_chnl_map_t.
1138 *
1139 * @retval SDK_SUCCESS: Operation is successful.
1140 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1141 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1142 *
1143 ****************************************************************************************
1144 */
1145 uint16_t ble_gap_chnl_map_set(ble_gap_chnl_map_t* p_chnl_map);
1146
1147 /**
1148 ****************************************************************************************
1149 * @brief Get all bonded devices.
1150 *
1151 * @param[in] p_bond_list: Pointer to the bond list.
1152 * @param[in] max_num: max number of bond devices can be gotten.
1153 *
1154 * @retval SDK_SUCCESS: Operation is successful.
1155 * @retval SDK_ERR_SDK_INTERNAL: SDK internal error.
1156 * @retval SDK_ERR_NVDS_NOT_INIT: NVDS is not initiated.
1157 * @retval SDK_ERR_LIST_ITEM_NOT_FOUND: Item not found in list.
1158 * @retval SDK_ERR_LIST_FULL: List is full.
1159 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1160 ****************************************************************************************
1161 */
1162 uint16_t ble_gap_bond_devs_get(ble_gap_bond_dev_list_t *p_bond_list, uint8_t max_num);
1163
1164 /**
1165 ****************************************************************************************
1166 * @brief Clear all bonded devices.
1167 *
1168 * @retval SDK_SUCCESS: Operation is successful.
1169 * @retval SDK_ERR_SDK_INTERNAL: SDK internal error.
1170 * @retval SDK_ERR_NVDS_NOT_INIT: NVDS is not initiated.
1171 * @retval SDK_ERR_LIST_ITEM_NOT_FOUND: Item not found in list.
1172 * @retval SDK_ERR_LIST_FULL: List is full.
1173 ****************************************************************************************
1174 */
1175 uint16_t ble_gap_bond_devs_clear(void);
1176
1177 /**
1178 ****************************************************************************************
1179 * @brief Delete a bond device with the specified BD address.
1180 *
1181 * @param[in] p_peer_addr: Pointer to the BD addrss.
1182 *
1183 * @retval SDK_SUCCESS: Operation is successful.
1184 * @retval SDK_ERR_SDK_INTERNAL: SDK internal error.
1185 * @retval SDK_ERR_NVDS_NOT_INIT: NVDS is not initiated.
1186 * @retval SDK_ERR_LIST_ITEM_NOT_FOUND: Item not found in list.
1187 * @retval SDK_ERR_LIST_FULL: List is full.
1188 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1189 ****************************************************************************************
1190 */
1191 uint16_t ble_gap_bond_dev_del(const ble_gap_bdaddr_t *p_peer_addr);
1192
1193 /**
1194 ****************************************************************************************
1195 * @brief Check white list is full.
1196 *
1197 * @retval TRUE: white list is full.
1198 * @retval FALSE: white list is not full.
1199 ****************************************************************************************
1200 */
1201 bool ble_gap_check_whitelist_full(void);
1202
1203 /**
1204 ****************************************************************************************
1205 * @brief Get the content of the whole white list.
1206 *
1207 * @param[in] p_whitelist: Pointer to the output white list.
1208 *
1209 * @retval SDK_SUCCESS: Operation is successful.
1210 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1211 ****************************************************************************************
1212 */
1213 uint16_t ble_gap_whitelist_get(ble_gap_white_list_t *p_whitelist);
1214
1215 /**
1216 ****************************************************************************************
1217 * @brief Add the devices into current white list. If white list is full or there are duplicated entries, it will return error.
1218 * @note This API is asynchronous.
1219 * @note Once the operation has completed, the event @ref BLE_GAP_OPCODE_WHITELIST_SET will be called.
1220 *
1221 * @param[in] p_whitelist: Pointer to input white list.
1222 *
1223 * @retval SDK_SUCCESS: Operation is successful.
1224 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1225 * @retval SDK_ERR_LIST_ITEM_ALREADY_EXISTED: Item already existed in list.
1226 * @retval SDK_ERR_LIST_FULL: List is full.
1227 * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
1228 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1229 *
1230 ****************************************************************************************
1231 */
1232 uint16_t ble_gap_whitelist_add(const ble_gap_white_list_t *p_whitelist);
1233
1234 /**
1235 ****************************************************************************************
1236 * @brief Delete the devices out of current white list. If the entries do not exist in the current white list, it will return error.
1237 * @note This API is asynchronous.
1238 * @note Once the operation has completed, the event @ref BLE_GAP_OPCODE_WHITELIST_SET will be called.
1239 *
1240 * @param[in] p_whitelist: Pointer to input white list.
1241 *
1242 * @retval SDK_SUCCESS: Operation is successful.
1243 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1244 * @retval SDK_ERR_LIST_ITEM_NOT_FOUND: Item not found in list.
1245 * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
1246 * @retval SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1247 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1248 *
1249 ****************************************************************************************
1250 */
1251 uint16_t ble_gap_whitelist_del(const ble_gap_white_list_t *p_whitelist);
1252
1253 /**
1254 ****************************************************************************************
1255 * @brief Clear all the entries in the current white list.
1256 * @note This API is asynchronous.
1257 * @note once the operation has completed, the event @ref BLE_GAP_OPCODE_WHITELIST_SET will be called.
1258 *
1259 * @retval SDK_SUCCESS: Operation is successful.
1260 * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
1261 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1262 *
1263 ****************************************************************************************
1264 */
1265 uint16_t ble_gap_whitelist_clear(void);
1266
1267 /**
1268 ****************************************************************************************
1269 * @brief Get the content of the whole periodic advertising list.
1270 *
1271 * @param[in] p_pal_list: Pointer to the output periodic advertising list.
1272 *
1273 * @retval SDK_SUCCESS: Operation is successful.
1274 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1275 ****************************************************************************************
1276 */
1277 uint16_t ble_gap_per_adv_list_get(ble_gap_period_adv_list_t *p_pal_list);
1278
1279 /**
1280 ****************************************************************************************
1281 * @brief Add the devices into current periodic advertising list. If periodic advertising list is full or there are
1282 * duplicated entries, it will return error.
1283 * @note This API is asynchronous.
1284 * @note Once the operation has completed, the event @ref BLE_GAP_OPCODE_PER_ADV_LIST_SET will be called.
1285 *
1286 * @param[in] p_pal_list: Pointer to input periodic advertising list.
1287 *
1288 * @retval SDK_SUCCESS: Operation is successful.
1289 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1290 * @retval SDK_ERR_LIST_ITEM_ALREADY_EXISTED: Item already existed in list.
1291 * @retval SDK_ERR_LIST_FULL: List is full.
1292 * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
1293 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1294 *
1295 ****************************************************************************************
1296 */
1297 uint16_t ble_gap_per_adv_list_add(const ble_gap_period_adv_list_t *p_pal_list);
1298
1299 /**
1300 ****************************************************************************************
1301 * @brief Delete the devices out of periodic advertising list. If the entries do not exist in the current list, an error will be returned.
1302 * @note This API is asynchronous.
1303 * @note Once the operation has completed, the event @ref BLE_GAP_OPCODE_PER_ADV_LIST_SET will be called.
1304 *
1305 * @param[in] p_pal_list: Pointer to input periodic advertising list.
1306 *
1307 * @retval SDK_SUCCESS: Operation is successful.
1308 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1309 * @retval SDK_ERR_LIST_ITEM_NOT_FOUND: Item not found in list.
1310 * @retval SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1311 * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
1312 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1313 *
1314 ****************************************************************************************
1315 */
1316 uint16_t ble_gap_per_adv_list_del(const ble_gap_period_adv_list_t *p_pal_list);
1317
1318 /**
1319 ****************************************************************************************
1320 * @brief Clear all the entries in the current periodic advertising list.
1321 * @note This API is asynchronous.
1322 * @note Once the operation has completed, the event @ref BLE_GAP_OPCODE_PER_ADV_LIST_SET will be called.
1323 *
1324 * @retval SDK_SUCCESS: Operation is successful.
1325 * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
1326 ****************************************************************************************
1327 */
1328 uint16_t ble_gap_per_adv_list_clear(void);
1329
1330 /**
1331 ****************************************************************************************
1332 * @brief Get the RPA list info.
1333 * @param[in] p_rpa_list: Pointer to the output RPA list.
1334 * @param[in] max_num: Max number of rpa list can be gotten.
1335 *
1336 * @retval SDK_SUCCESS: Operation is successful.
1337 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1338 ****************************************************************************************
1339 */
1340 uint16_t ble_gap_rpa_list_get(ble_gap_ral_dev_list_t *p_rpa_list, uint8_t max_num);
1341
1342 /**
1343 ****************************************************************************************
1344 * @brief Set parameters for advertising. Note that this function must be called prior to advertising started.
1345 * @param[in] adv_idx: Advertising index, range is 0 to 4.
1346 * @param[in] own_addr_type: Own BD address source of the local device.
1347 * @param[in] p_adv_param: The advertising parameters.
1348 *
1349 * @retval SDK_SUCCESS: Operation is successful.
1350 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1351 * @retval SDK_ERR_INVALID_ADV_IDX: Invalid advertising index supplied.
1352 * @retval SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1353 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1354 *
1355
1356 * @note Discovery mode param contains Flags AD type, setting adv data should not set the Flags AD type.
1357 * @note This API is for legacy advertsing (BT Core Spec version <= 4.2).
1358 ****************************************************************************************
1359 */
1360 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);
1361
1362 /**
1363 ****************************************************************************************
1364 * @brief Set extended parameters for advertising. Note that this function must be called prior to advertising.
1365 * @param[in] adv_idx: Advertising index, range is 0 to 4.
1366 * @param[in] own_addr_type: Own BD address source of the local device.
1367 * @param[in] p_adv_param: The advertising parameters.
1368 *
1369 * @retval SDK_SUCCESS: Operation is successful.
1370 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1371 * @retval SDK_ERR_INVALID_ADV_IDX: Invalid advertising index supplied.
1372 * @retval SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1373 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1374 *
1375 * @note This API is for extended and periodic advertising (BT Core Spec version >= 5.0).
1376 ****************************************************************************************
1377 */
1378 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);
1379
1380 /**
1381 ****************************************************************************************
1382 * @brief Set Advertising Data, Scan Response Data and Periodic Advertising Data. See ENUM @ref ble_gap_ad_type_t
1383 for ADV Type definitions. See ENUM @ref ble_gap_adv_flags_t for ADV flag definitions.
1384 *
1385 * @param[in] adv_idx: Advertising index, range is 0 to 4.
1386 * @param[in] type: Data type.
1387 * @param[in] p_data: The data pointer.
1388 * @param[in] length: Data length.
1389 *
1390 * @retval SDK_SUCCESS: Operation is successful.
1391 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1392 * @retval SDK_ERR_INVALID_ADV_IDX: Invalid advertising index supplied.
1393 * @retval SDK_ERR_INVALID_ADV_DATA_TYPE: Invalid advertising data type supplied.
1394 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1395 *
1396 * @note User should not add extra Flags AD type as the BLE Stack has added the Flags AD type already.
1397 ****************************************************************************************
1398 */
1399 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);
1400
1401 /**
1402 ****************************************************************************************
1403 * @brief Update Advertising Data, Scan Response Data and Periodic Advertising Data. See ENUM @ref ble_gap_ad_type_t
1404 * for ADV Type definitions. See ENUM @ref ble_gap_adv_flags_t for ADV flag definitions.
1405 *
1406 * @param[in] adv_idx: Advertising index, range is 0 to 4.
1407 * @param[in] type: Data type.
1408 * @param[in] p_data: The data pointer.
1409 * @param[in] length: Data length.
1410 *
1411 * @retval SDK_SUCCESS: Operation is successful.
1412 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1413 * @retval SDK_ERR_INVALID_ADV_IDX: Invalid advertising index supplied.
1414 * @retval SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1415 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1416 *
1417 * @note User should not add extra Flags AD type as the BLE Stack has added the Flags AD type already.
1418 ****************************************************************************************
1419 */
1420 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);
1421
1422 /**
1423 ****************************************************************************************
1424 * @brief Start advertising.
1425 * @param[in] adv_idx: Advertising index, range is 0 to 4.
1426 * @param[in] p_timeout: Advertising timing parameter.
1427 *
1428 * @retval SDK_SUCCESS: Operation is successful.
1429 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1430 * @retval SDK_ERR_INVALID_ADV_IDX: Invalid advertising index supplied.
1431 * @retval SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1432 * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
1433 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1434 *
1435 * @note If advertising mode is directed high duty cycle mode, duration should be set nonzero and not be greater than 1.28s.
1436 * @note This API is asynchronous.
1437 * @note If the field scan_req_ind_en in @ref ble_gap_adv_param_t is TRUE passed in @ref ble_gap_adv_param_set function, or if the
1438 GAP_ADV_PROP_SCAN_REQ_NTF_EN_BIT is set in @ref ble_gap_adv_prop_t and passed in @ref ble_gap_ext_adv_param_set function,
1439 @ref BLE_GAPM_EVT_SCAN_REQUEST event will be triggered once a scan request has been received.
1440 * @note @ref BLE_GAPM_EVT_ADV_START event will be triggered once the operation has completed.
1441 ****************************************************************************************
1442 */
1443 uint16_t ble_gap_adv_start(uint8_t adv_idx, ble_gap_adv_time_param_t* p_timeout);
1444
1445 /**
1446 ****************************************************************************************
1447 * @brief Stop advertising.
1448 * @param[in] adv_idx: Advertising index, range is 0 to 4.
1449 *
1450 * @retval SDK_SUCCESS: Operation is successful.
1451 * @retval SDK_ERR_INVALID_ADV_IDX: Invalid advertising index supplied.
1452 * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
1453 *
1454 * @note This API is asynchronous.
1455 * @note event @ref BLE_GAPM_EVT_ADV_STOP will be triggered once the operation has completed or advertising has been stopped.
1456 ****************************************************************************************
1457 */
1458 uint16_t ble_gap_adv_stop(uint8_t adv_idx);
1459
1460 /**
1461 ****************************************************************************************
1462 * @brief Set parameters for scanning. Note that this function must be called prior to scanning started.
1463 * @param[in] own_addr_type: Own BD address source of the local device.
1464 * @param[in] p_scan_param: The scanning parameters.
1465 *
1466 * @retval SDK_SUCCESS: Operation is successful.
1467 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1468 * @retval SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1469 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1470 *
1471 * @note This API is for legacy scanning (BT Core Spec version <= 4.2).
1472 ****************************************************************************************
1473 */
1474 uint16_t ble_gap_scan_param_set(ble_gap_own_addr_t own_addr_type, ble_gap_scan_param_t* p_scan_param);
1475
1476 /**
1477 ****************************************************************************************
1478 * @brief Set extended parameters for scanning. Note that this function must be called prior to scanning started.
1479 * @param[in] own_addr_type: Own BD address source of the local device.
1480 * @param[in] p_scan_param: The scanning parameters.
1481 *
1482 * @retval SDK_SUCCESS: Operation is successful.
1483 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1484 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1485 *
1486 * @note This API is for extended scanning (BT Core Spec version >= 5.0).
1487 * The Scan window in p_scan_param should be enough to recieve one packet. For example.
1488 * If you want to recieve packects with 1270 bytes on coded phy(S8), the scan_wd should be greater than 82ms.
1489 * If you want to recieve packects with 1270 bytes on coded phy(S2), the scan_wd should be greater than 21ms.
1490 ****************************************************************************************
1491 */
1492 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);
1493
1494 /**
1495 ****************************************************************************************
1496 * @brief Start scanning
1497 * @note This API is asynchronous.
1498 * @note Once the advertising report has been received, the event @ref BLE_GAPM_EVT_ADV_REPORT will be called.
1499 * @note Once the scanning has been stopped, the event @ref BLE_GAPM_EVT_SCAN_STOP will be called.
1500 * @note Once the operation has completed, the event @ref BLE_GAPM_EVT_SCAN_START will be called.
1501 *
1502 * @retval SDK_SUCCESS: Operation is successful.
1503 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1504 * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
1505 *
1506 ****************************************************************************************
1507 */
1508 uint16_t ble_gap_scan_start(void);
1509
1510 /**
1511 ****************************************************************************************
1512 * @brief Stop scanning
1513 *
1514 * @retval SDK_SUCCESS: Operation is successful.
1515 * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
1516 *
1517 * @note This API is asynchronous.
1518 * @note event @ref BLE_GAPM_EVT_SCAN_STOP will be triggered once the operation has completed or the scanning has been stopped.
1519 ****************************************************************************************
1520 */
1521 uint16_t ble_gap_scan_stop(void);
1522
1523 /**
1524 ****************************************************************************************
1525 * @brief Set the parameters used for periodic sync.
1526 * @param[in] per_sync_idx: Periodic synchronization index (range is 0 to 4).
1527 * @param[in] p_per_sync_param: Periodic synchronization parameters.
1528 *
1529 * @retval SDK_SUCCESS: Operation is successful.
1530 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1531 * @retval SDK_ERR_INVALID_PER_SYNC_IDX: Invalid periodic syncronization index supplied.
1532 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1533 ****************************************************************************************
1534 */
1535 uint16_t ble_gap_per_sync_param_set(uint8_t per_sync_idx, ble_gap_per_sync_param_t* p_per_sync_param);
1536
1537 /**
1538 ****************************************************************************************
1539 * @brief Start to synchronize with periodic advertising from an advertiser and begin receiving periodic advertising packets.
1540 * @param[in] per_sync_idx: Periodic synchronization index (range is 0 to 4).
1541 *
1542 * @retval SDK_SUCCESS: Operation is successful.
1543 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1544 * @retval SDK_ERR_INVALID_PER_SYNC_IDX: Invalid periodic syncronization index supplied.
1545 * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
1546 *
1547 * @note This API is asynchronous.
1548 * @note event @ref BLE_GAPM_EVT_SYNC_ESTABLISH will be triggered once the periodic advertising synchronization has been established.
1549 ****************************************************************************************
1550 */
1551 uint16_t ble_gap_per_sync_start(uint8_t per_sync_idx);
1552
1553 /**
1554 ****************************************************************************************
1555 * @brief Stop periodic synchronization.
1556 * @param[in] per_sync_idx: Periodic synchronization index (range is 0 to 4).
1557 *
1558 * @retval SDK_SUCCESS: Operation is successful.
1559 * @retval SDK_ERR_INVALID_PER_SYNC_IDX: Invalid periodic syncronization index supplied.
1560 * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
1561 *
1562 * @note This API is asynchronous.
1563 * @note event @ref BLE_GAPM_EVT_SYNC_STOP will be triggered once the operation has completed.
1564 ****************************************************************************************
1565 */
1566 uint16_t ble_gap_per_sync_stop(uint8_t per_sync_idx);
1567
1568 /**
1569 ****************************************************************************************
1570 * @brief Start a legacy connection to a device.
1571 * @param[in] own_addr_type: Own BD address source of the local device.
1572 * @param[in] p_init_param: Initiate parameters.
1573 *
1574 * @retval SDK_SUCCESS: Operation is successful.
1575 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1576 * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
1577 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1578 *
1579 * @note This API is for legacy connection (BT Core Spec version <= 4.2).
1580 *
1581 * @note This API is asynchronous.
1582 * @note event @ref BLE_GAPC_EVT_CONNECTED will be triggered once the operation has completed or the connection has been completed.
1583 * @note event @ref BLE_GAPC_EVT_PEER_NAME_GOT will be triggered once the peer name has been got for the
1584 Name Discovery Procedure. See enum @ref BLE_GAP_INIT_TYPE_NAME_DISC of type @ref ble_gap_init_type_t.
1585 ****************************************************************************************
1586 */
1587 uint16_t ble_gap_connect(ble_gap_own_addr_t own_addr_type, ble_gap_init_param_t* p_init_param);
1588
1589 /**
1590 ****************************************************************************************
1591 * @brief Start an extended connection to a device.
1592 * @param[in] own_addr_type: Own BD address source of the local device.
1593 * @param[in] p_init_param: Initiate parameters.
1594 *
1595 * @retval SDK_SUCCESS: Operation is successful.
1596 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1597 * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
1598 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1599 *
1600 * @note This API is for extended connection (BT Core Spec version >= 5.0).
1601 *
1602 * @note This API is asynchronous.
1603 * @note event @ref BLE_GAPC_EVT_CONNECTED will be triggered once the operation has completed or the connection has been completed.
1604 ****************************************************************************************
1605 */
1606 uint16_t ble_gap_ext_connect(ble_gap_own_addr_t own_addr_type, ble_gap_ext_init_param_t* p_init_param);
1607
1608 /**
1609 ****************************************************************************************
1610 * @brief Cancel an initiated connection.
1611 *
1612 * @retval SDK_SUCCESS: Operation is successful.
1613 * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
1614 *
1615 * @note This API is asynchronous.
1616 * @note event @ref BLE_GAPC_EVT_CONNECT_CANCLE will be triggered once the operation has completed.
1617 ****************************************************************************************
1618 */
1619 uint16_t ble_gap_connect_cancel(void);
1620
1621 /**
1622 ****************************************************************************************
1623 * @brief Set GAP appearance value.
1624 * @param[in] appearance: Appearance value.
1625 ****************************************************************************************
1626 */
1627 void ble_gap_appearance_set(uint16_t appearance);
1628
1629 /**
1630 ****************************************************************************************
1631 * @brief Get GAP appearance value.
1632 * @param[out] p_appearance: The pointer to appearance value.
1633 *
1634 * @retval SDK_SUCCESS: Operation is successful.
1635 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1636 ****************************************************************************************
1637 */
1638 uint16_t ble_gap_appearance_get(uint16_t *p_appearance);
1639
1640 /**
1641 ****************************************************************************************
1642 * @brief Set GAP Peripheral Preferred Connection Parameters.
1643 * @param[in] p_conn_params: The pointer to PPCP values.
1644 *
1645 * @retval SDK_SUCCESS: Operation is successful.
1646 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1647 ****************************************************************************************
1648 */
1649 uint16_t ble_gap_ppcp_set(ble_gap_conn_param_t const *p_conn_params);
1650
1651 /**
1652 ****************************************************************************************
1653 * @brief Get GAP Peripheral Preferred Connection Parameters.
1654 * @param[out] p_conn_params: The pointer to PPCP values.
1655 *
1656 * @retval SDK_SUCCESS: Operation is successful.
1657 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1658 ****************************************************************************************
1659 */
1660 uint16_t ble_gap_ppcp_get(ble_gap_conn_param_t *p_conn_params);
1661
1662 /**
1663 ****************************************************************************************
1664 * @brief Set GAP device name.
1665 * @param[in] write_perm: Write permissions of the device name characteristic.
1666 * @param[in] p_dev_name: The pointer to device name value. If p_dev_name is NULL, this function will only set write permissions of the device name.
1667 * @param[in] length: Device name length.
1668 *
1669 * @retval SDK_SUCCESS: Operation is successful.
1670 * @retval SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1671 ****************************************************************************************
1672 */
1673 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);
1674
1675 /**
1676 ****************************************************************************************
1677 * @brief Get GAP device name.
1678 * @param[out] p_dev_name: The pointer to device name value, set to NULL to obtain the complete device name length.
1679 * @param[in, out] p_length: Length of the buffer pointed by p_dev_name, complete device name length on output.
1680 *
1681 * @retval SDK_SUCCESS: Operation is successful.
1682 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1683 * @retval SDK_ERR_INVALID_DATA_LENGTH: Invalid data size(s) supplied.
1684 *
1685 * @note If device name was not set, the default device name "GOODIX_BLE" will be available.
1686 * @note If the device name is longer than the size of the supplied buffer,p_len will return the complete device name length,
1687 * and not the number of bytes actually returned in p_dev_name.
1688 * The application may use this information to allocate a suitable buffer size.
1689 ****************************************************************************************
1690 */
1691 uint16_t ble_gap_device_name_get(uint8_t *p_dev_name, uint16_t *p_length);
1692
1693 /**
1694 ****************************************************************************************
1695 * @brief Register a LE Protocol/Service Multiplexer.
1696 * @param[in] p_lepsm: The lepsm information to be registerred.
1697 *
1698 * @retval SDK_SUCCESS: Operation is successful.
1699 * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1700 * @retval SDK_ERR_INVALID_PSM_NUM: Invalid psm number.
1701 * @retval SDK_ERR_INVALID_PSM_EXCEEDED_MAX_PSM_NUM: The maximum psm number limit is exceeded.
1702 * @retval SDK_ERR_INVALID_PSM_ALREADY_REGISTERED: The psm number has been registered.
1703 *
1704 * @note This API is asynchronous.
1705 * @ref BLE_GAPM_EVT_LEPSM_REGISTER event with op_id: @ref BLE_GAP_OPCODE_LEPSM_REGISTER will be triggered.
1706 ****************************************************************************************
1707 */
1708 uint16_t ble_gap_lepsm_register(ble_gap_lepsm_register_t* p_lepsm);
1709
1710 /**
1711 ****************************************************************************************
1712 * @brief Unregister a LE Protocol/Service Multiplexer.
1713 * @param[in] le_psm: LE Protocol/Service Multiplexer (1 to 255).
1714 *
1715 * @retval SDK_SUCCESS: Operation is successful.
1716 * @retval SDK_ERR_INVALID_PSM_NUM: Invalid psm number.
1717 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1718 *
1719 * @note This API is asynchronous.
1720 * @ref BLE_GAPM_EVT_LEPSM_UNREGISTER event with op_id: @ref BLE_GAP_OPCODE_LEPSM_UNREGISTER will be triggered.
1721 ****************************************************************************************
1722 */
1723 uint16_t ble_gap_lepsm_unregister(uint16_t le_psm);
1724
1725 /**
1726 ****************************************************************************************
1727 * @brief Control periodic advertising report.
1728 * @param[in] per_sync_index: The index of the periodic syncronization instance.
1729 * @param[in] enable_flag: Per adv report flag.
1730 * bit0: Reporting enabled(true report or false not report).
1731 * bit1: Duplicate filtering enabled.
1732 *
1733 * @retval SDK_SUCCESS: Operation is successful.
1734 * @retval SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1735 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1736 ****************************************************************************************
1737 */
1738 uint16_t ble_gap_per_adv_report_ctrl(uint8_t per_sync_index, bool enable_flag);
1739
1740 /**
1741 ****************************************************************************************
1742 * @brief Set connectionless CTE transmit parameters.
1743 * @param[in] per_adv_index: The index of the periodic advertising.
1744 * @param[in] param: Connectionless CTE transmit arameters.
1745 *
1746 * @retval SDK_SUCCESS: Operation is successful.
1747 * @retval SDK_ERR_INVALID_ADV_IDX: Invalid advertising index supplied.
1748 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1749 ****************************************************************************************
1750 */
1751 uint16_t ble_gap_connless_cte_trans_param_set(uint8_t per_adv_index, gap_connless_cte_trans_param_t *param);
1752
1753 /**
1754 ****************************************************************************************
1755 * @brief Set connectionless CTE transmit enable.
1756 * @param[in] per_adv_index: The index of the periodic advertising.
1757 * @param[in] enable_flag: Whether enable to transmit connectionless cte.
1758 *
1759 * @retval SDK_SUCCESS: Operation is successful.
1760 * @retval SDK_ERR_INVALID_ADV_IDX: Invalid advertising index supplied.
1761 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1762 ****************************************************************************************
1763 */
1764 uint16_t ble_gap_connless_cte_trans_enable_set(uint8_t per_adv_index, bool enable_flag);
1765
1766 /**
1767 ****************************************************************************************
1768 * @brief Set connectionless IQ sampling enable.
1769 * @param[in] per_sync_index: The index of the periodic syncronization instance.
1770 * @param[in] enable_flag: Whether enable connectionless iq sampling. if enable_flag is false, the param shall be NULL.
1771 * @param[in] param: Enable connectionless iq sampling parameters (see @ref ble_gap_connless_iq_sample_param_t).
1772 *
1773 * @retval SDK_SUCCESS: Operation is successful.
1774 * @retval SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1775 * @retval SDK_ERR_INVALID_PER_SYNC_IDX: Invalid periodic synchronization index supplied.
1776 * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
1777 ****************************************************************************************
1778 */
1779 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);
1780
1781 /**
1782 * @brief Get the local irk.
1783 * @param[in] p_local_irk: pointer to the local irk.
1784 */
1785 void ble_gap_get_local_irk(uint8_t *p_local_irk);
1786
1787 /**
1788 * @brief Set whether to report adv/scan event.
1789 * @param[in] enable_flag: enable flag (true: report, false: not report).
1790 */
1791 void ble_gap_adv_scan_evt_report_enable_set(bool enable_flag);
1792
1793 /**
1794 *****************************************************************************************
1795 * @brief Resolve the rpa address.
1796 *
1797 * @param[in] p_rpa: Pointer to the rpa address.
1798 *
1799 * @retval ::SDK_SUCCESS: Operation is Success.
1800 * @retval ::SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1801 * @retval ::SDK_ERR_DISALLOWED: Operation is disallowed.
1802 *****************************************************************************************
1803 */
1804 uint16_t ble_gap_reslv_rpa_addr(uint8_t *p_rpa);
1805
1806 /**
1807 *****************************************************************************************
1808 * @brief Resolve the rpa address with irk indicated by app layer.
1809 *
1810 * @param[in] p_rpa: Pointer to the rpa address.
1811 * @param[in] p_irk: Pointer to the irk.
1812 *
1813 * @retval ::SDK_SUCCESS: Operation is Success.
1814 * @retval ::SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1815 * @retval ::SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1816 * @retval ::SDK_ERR_DISALLOWED: Operation is disallowed.
1817 *****************************************************************************************
1818 */
1819 uint16_t ble_gap_reslv_rpa_addr_by_irk(uint8_t *p_rpa, uint8_t *p_irk);
1820
1821 /**
1822 *****************************************************************************************
1823 * @brief Add rpa list.
1824 *
1825 * @param[in] p_peer_iden_addr: Pointer to the peer identity address.
1826 * @param[in] p_peer_irk: Pointer to the peer irk.
1827 *
1828 * @retval ::SDK_SUCCESS: Operation is Success.
1829 * @retval ::SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1830 * @retval ::SDK_ERR_LIST_FULL: Rpa list is full.
1831 * @retval ::SDK_ERR_LIST_ITEM_ALREADY_EXISTED: Item already exists in list.
1832 * @retval ::SDK_ERR_DISALLOWED: Operation is disallowed.
1833 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources for operation.
1834 *****************************************************************************************
1835 */
1836 uint16_t ble_gap_rpa_list_add(ble_gap_bdaddr_t *p_peer_iden_addr, uint8_t *p_peer_irk);
1837
1838 /**
1839 *****************************************************************************************
1840 * @brief Get adv data and scan rsp data from hardware buffer.
1841 *
1842 * @param[in] adv_idx: Adv index.
1843 * @param[in] p_adv_data: Pointer to the adv data buffer.
1844 * @param[inout] p_adv_data_len: Pointer to the adv data length.
1845 * @param[in] p_scan_rsp_data: Pointer to the scan response data.
1846 * @param[inout] p_scan_rsp_data_len: Pointer to the scan response data length.
1847 *
1848 * @note p_adv_data_len and p_scan_rsp_data_len explanation as follows:
1849 * as input parameter: indicate the max length for data buffer, should not less than 31.
1850 * as output parameter: indicate the actual data length.
1851 *
1852 * @retval ::SDK_SUCCESS: Operation is Success.
1853 * @retval ::SDK_ERR_INVALID_ADV_IDX: Invalid advertising index supplied.
1854 * @retval ::SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1855 * @retval ::SDK_ERR_DISALLOWED: Operation is disallowed.
1856 *****************************************************************************************
1857 */
1858 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);
1859
1860 /**
1861 *****************************************************************************************
1862 * @brief Set auto add white list policy after bonding.
1863 *
1864 * @param[in] policy_type: Policy type @ref ble_gap_auto_add_white_list_policy_type_t.
1865 *
1866 *****************************************************************************************
1867 */
1868 void ble_gap_white_list_auto_add_policy_set(ble_gap_auto_add_white_list_policy_type_t policy_type);
1869 /** @} */
1870
1871 #endif
1872 /** @} */
1873
1874 /** @} */
1875 /** @} */
ble_gap_evt_sync_established_t::phy
uint8_t phy
Definition: ble_gapm.h:897
ble_gap_per_sync_type_t
ble_gap_per_sync_type_t
Periodic synchronization types.
Definition: ble_gapm.h:415
BLE_GAP_NO_SYNC_IGNORE
@ BLE_GAP_NO_SYNC_IGNORE
Definition: ble_gapm.h:437
BLE_GAP_AD_TYPE_RQRD_32_BIT_SVC_UUID
@ BLE_GAP_AD_TYPE_RQRD_32_BIT_SVC_UUID
Definition: ble_gapm.h:506
BLE_GAP_ROLE_PERIPHERAL
@ BLE_GAP_ROLE_PERIPHERAL
Definition: ble_gapm.h:154
BLE_GAP_ADV_PROP_SCANNABLE_POS
@ BLE_GAP_ADV_PROP_SCANNABLE_POS
Definition: ble_gapm.h:295
BLE_GAP_PRIVACY_MODE_NETWORK
@ BLE_GAP_PRIVACY_MODE_NETWORK
Definition: ble_gapm.h:542
ble_gap_adv_second_cfg_t::max_skip
uint8_t max_skip
Definition: ble_gapm.h:607
ble_gap_ext_init_param_t::conn_to
uint16_t conn_to
Definition: ble_gapm.h:789
ble_gap_default_conn_tx_power_get
void ble_gap_default_conn_tx_power_get(int8_t *txpwr_dbm)
Get the default tx power for connection.
ble_gap_ext_init_param_t::scan_param_1m
ble_gap_scan_wd_op_param_t scan_param_1m
Definition: ble_gapm.h:792
ble_gap_pref_phy_set
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.
ble_gap_bond_dev_list_t::items
ble_gap_bdaddr_t * items
Definition: ble_gapm.h:816
ble_gap_per_adv_list_del
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,...
BLE_GAP_PHY_CODED_VALUE
@ BLE_GAP_PHY_CODED_VALUE
Definition: ble_gapm.h:275
ble_gap_ext_scan_param_t::dup_filt_pol
uint8_t dup_filt_pol
Definition: ble_gapm.h:690
BLE_GAP_EXT_SCAN_PROP_FILT_TRUNC_BIT
@ BLE_GAP_EXT_SCAN_PROP_FILT_TRUNC_BIT
Definition: ble_gapm.h:378
gap_sync_cte_type
gap_sync_cte_type
Constant Tone Extension sync filtering type.
Definition: ble_gapm.h:436
ble_gap_init_param_t::sup_timeout
uint16_t sup_timeout
Definition: ble_gapm.h:760
BLE_GAP_AD_TYPE_TRANSMIT_POWER
@ BLE_GAP_AD_TYPE_TRANSMIT_POWER
Definition: ble_gapm.h:498
BLE_GAP_NO_SYNC_WITH_AOD_2US_SLOT
@ BLE_GAP_NO_SYNC_WITH_AOD_2US_SLOT
Definition: ble_gapm.h:440
BLE_GAP_ACTV_TYPE_INIT
@ BLE_GAP_ACTV_TYPE_INIT
Definition: ble_gapm.h:564
BLE_GAP_EXT_SCAN_PROP_PHY_CODED_BIT
@ BLE_GAP_EXT_SCAN_PROP_PHY_CODED_BIT
Definition: ble_gapm.h:374
BLE_GAP_SCAN_GEN_DISC_MODE
@ BLE_GAP_SCAN_GEN_DISC_MODE
Definition: ble_gapm.h:341
ble_gap_whitelist_add
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,...
ble_gap_adv_prim_cfg_t
Configuration for advertising on primary channel.
Definition: ble_gapm.h:594
ble_gap_irk_set
uint16_t ble_gap_irk_set(ble_gap_sec_key_t *p_irk)
Set IRK used for resolvable random BD address generation (LSB first).
ble_gap_ral_dev_list_t::offset
uint8_t offset
Definition: ble_gapm.h:853
ble_gap_ppcp_get
uint16_t ble_gap_ppcp_get(ble_gap_conn_param_t *p_conn_params)
Get GAP Peripheral Preferred Connection Parameters.
ble_gap_scan_wd_op_param_t
Scan Window operation parameters.
Definition: ble_gapm.h:678
ble_gap_adv_param_t::peer_addr
ble_gap_bdaddr_t peer_addr
Definition: ble_gapm.h:580
ble_gap_evt_scan_req_t::peer_addr
ble_gap_bdaddr_t peer_addr
Definition: ble_gapm.h:867
BLE_GAP_ACTIVITY_ROLE_ADV
@ BLE_GAP_ACTIVITY_ROLE_ADV
Definition: ble_gapm.h:551
BLE_GAP_REPORT_TYPE_PER_ADV
@ BLE_GAP_REPORT_TYPE_PER_ADV
Definition: ble_gapm.h:247
BLE_GAP_SEC_LVL_LE_ENC_AUTH
@ BLE_GAP_SEC_LVL_LE_ENC_AUTH
Definition: ble_gapm.h:480
ble_gap_ext_adv_param_t::max_tx_pwr
int8_t max_tx_pwr
Definition: ble_gapm.h:631
BLE_GAP_GET_MAX_LE_ADV_DATA_LEN
@ BLE_GAP_GET_MAX_LE_ADV_DATA_LEN
Definition: ble_gapm.h:204
BLE_GAP_ADV_ALLOW_SCAN_WLST_CON_ANY
@ BLE_GAP_ADV_ALLOW_SCAN_WLST_CON_ANY
Definition: ble_gapm.h:235
ble_gap_ext_adv_param_t::prim_cfg
ble_gap_adv_prim_cfg_t prim_cfg
Definition: ble_gapm.h:634
BLE_GAP_SEC_LVL_NO_SECURITY
@ BLE_GAP_SEC_LVL_NO_SECURITY
Definition: ble_gapm.h:478
BLE_GAP_ROLE_BROADCASTER
@ BLE_GAP_ROLE_BROADCASTER
Definition: ble_gapm.h:152
ble_gap_scan_start
uint16_t ble_gap_scan_start(void)
Start scanning.
ble_gap_scan_param_t
Parameters for legacy scanning.
Definition: ble_gapm.h:664
BLE_GAP_ADV_PROP_PER_TX_PWR_POS
@ BLE_GAP_ADV_PROP_PER_TX_PWR_POS
Definition: ble_gapm.h:306
BLE_GAP_SYNC_REP_EN_DUP
@ BLE_GAP_SYNC_REP_EN_DUP
Definition: ble_gapm.h:451
ble_gap_white_list_t
White list.
Definition: ble_gapm.h:823
BLE_GAP_AUTO_ADD_WHITE_LIST_WITH_SLAVE
@ BLE_GAP_AUTO_ADD_WHITE_LIST_WITH_SLAVE
Definition: ble_gapm.h:428
BLE_GAP_AD_TYPE_MORE_32_BIT_UUID
@ BLE_GAP_AD_TYPE_MORE_32_BIT_UUID
Definition: ble_gapm.h:492
BLE_GAP_REPORT_INFO_CONN_ADV_BIT
@ BLE_GAP_REPORT_INFO_CONN_ADV_BIT
Definition: ble_gapm.h:254
ble_gap_privacy_mode_t
ble_gap_privacy_mode_t
Privacy mode.
Definition: ble_gapm.h:541
ble_gapm_evt_t::rslv_addr_report
ble_gap_evt_rslv_addr_report_t rslv_addr_report
Definition: ble_gapm.h:935
BLE_GAP_EXT_SCAN_TYPE_LIM_DISC
@ BLE_GAP_EXT_SCAN_TYPE_LIM_DISC
Definition: ble_gapm.h:361
ble_gap_ext_scan_param_t::rsvd
uint8_t rsvd
Definition: ble_gapm.h:691
BLE_GAP_ADV_PROP_HDC_BIT
@ BLE_GAP_ADV_PROP_HDC_BIT
Definition: ble_gapm.h:319
BLE_GAP_WRITE_PERM_UNAUTH
@ BLE_GAP_WRITE_PERM_UNAUTH
Definition: ble_gapm.h:175
BLE_GAP_ROLE_CENTRAL
@ BLE_GAP_ROLE_CENTRAL
Definition: ble_gapm.h:153
BLE_GAP_ADV_PROP_TX_PWR_BIT
@ BLE_GAP_ADV_PROP_TX_PWR_BIT
Definition: ble_gapm.h:322
BLE_GAP_ADV_TYPE_LEGACY
@ BLE_GAP_ADV_TYPE_LEGACY
Definition: ble_gapm.h:283
BLE_GAP_ADV_PROP_SCAN_REQ_NTF_EN_POS
@ BLE_GAP_ADV_PROP_SCAN_REQ_NTF_EN_POS
Definition: ble_gapm.h:308
ble_gap_scan_dup_filt_policy_t
ble_gap_scan_dup_filt_policy_t
Duplicate filter policy.
Definition: ble_gapm.h:350
BLE_GAP_ROLE_ALL
@ BLE_GAP_ROLE_ALL
Definition: ble_gapm.h:155
ble_gap_addr_t
The struct of address.
Definition: ble_gapc.h:263
BLE_GAP_ACTV_TYPE_SCAN
@ BLE_GAP_ACTV_TYPE_SCAN
Definition: ble_gapm.h:563
gap_connless_cte_trans_param_t::num_antenna
uint8_t num_antenna
Definition: ble_gapm.h:732
BLE_GAP_GET_DEV_BDADDR
@ BLE_GAP_GET_DEV_BDADDR
Definition: ble_gapm.h:195
ble_gapm_evt_t::iden_addr_report
ble_gap_evt_iden_addr_report_t iden_addr_report
Definition: ble_gapm.h:936
ble_gap_adv_data_type_t
ble_gap_adv_data_type_t
Advertising data type.
Definition: ble_gapm.h:184
ble_gapm_evt_t::dtm_test_end_report
ble_gap_evt_dtm_test_end_report_t dtm_test_end_report
Definition: ble_gapm.h:937
ble_gap_ext_conn_param_t::conn_latency
uint16_t conn_latency
Definition: ble_gapm.h:776
BLE_GAP_GET_DEV_VERSION
@ BLE_GAP_GET_DEV_VERSION
Definition: ble_gapm.h:194
ble_gap_ext_adv_param_t::peer_addr
ble_gap_bdaddr_t peer_addr
Definition: ble_gapm.h:633
BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED
@ BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED
Definition: ble_gapm.h:531
ble_gap_connect_cancel
uint16_t ble_gap_connect_cancel(void)
Cancel an initiated connection.
BLE_GAP_AD_TYPE_COMPLETE_NAME
@ BLE_GAP_AD_TYPE_COMPLETE_NAME
Definition: ble_gapm.h:497
BLE_GAP_GET_ANTENNA_INFO
@ BLE_GAP_GET_ANTENNA_INFO
Definition: ble_gapm.h:207
BLE_GAP_ACTV_TYPE_ADV
@ BLE_GAP_ACTV_TYPE_ADV
Definition: ble_gapm.h:562
ble_gap_pair_enable
void ble_gap_pair_enable(bool enable)
Decide whether to support the pair feature.
ble_gap_evt_dtm_test_end_report_t::rcv_packet_num
uint16_t rcv_packet_num
Definition: ble_gapm.h:921
ble_gap_bdaddr_t
The struct of broadcast address with broadcast type.
Definition: ble_gapc.h:269
ble_gap_evt_adv_report_t::length
uint16_t length
Definition: ble_gapm.h:890
gap_connless_cte_trans_param_t
Set connectionless CTE transmit parameters.
Definition: ble_gapm.h:728
BLE_GAP_OWN_ADDR_STATIC
@ BLE_GAP_OWN_ADDR_STATIC
Definition: ble_gapm.h:163
BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE
@ BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE
Definition: ble_gapm.h:530
BLE_GAP_EXT_SCAN_PROP_ACCEPT_RPA_BIT
@ BLE_GAP_EXT_SCAN_PROP_ACCEPT_RPA_BIT
Definition: ble_gapm.h:377
ble_gap_auto_add_white_list_policy_type_t
ble_gap_auto_add_white_list_policy_type_t
Auto add white list policy types.
Definition: ble_gapm.h:425
ble_gap_lepsm_register_t::mks_flag
bool mks_flag
Definition: ble_gapm.h:807
ble_gap_ext_adv_param_t::disc_mode
uint8_t disc_mode
Definition: ble_gapm.h:629
BLE_GAP_SCAN_ACTIVE
@ BLE_GAP_SCAN_ACTIVE
Definition: ble_gapm.h:332
BLE_GAP_REPORT_INFO_DIR_ADV_BIT
@ BLE_GAP_REPORT_INFO_DIR_ADV_BIT
Definition: ble_gapm.h:256
BLE_GAP_ACTIVITY_ROLE_CON
@ BLE_GAP_ACTIVITY_ROLE_CON
Definition: ble_gapm.h:552
BLE_GAP_AD_TYPE_MORE_16_BIT_UUID
@ BLE_GAP_AD_TYPE_MORE_16_BIT_UUID
Definition: ble_gapm.h:490
BLE_GAP_ADV_ALLOW_SCAN_WLST_CON_WLST
@ BLE_GAP_ADV_ALLOW_SCAN_WLST_CON_WLST
Definition: ble_gapm.h:237
ble_gap_per_adv_report_ctrl
uint16_t ble_gap_per_adv_report_ctrl(uint8_t per_sync_index, bool enable_flag)
Control periodic advertising report.
ble_gap_ral_dev_list_t
RPA list info.
Definition: ble_gapm.h:852
BLE_GAP_SLOT_DURA_2US
@ BLE_GAP_SLOT_DURA_2US
Definition: ble_gapm.h:470
BLE_GAP_OWN_ADDR_GEN_RSLV
@ BLE_GAP_OWN_ADDR_GEN_RSLV
Definition: ble_gapm.h:164
ble_gap_evt_adv_report_t
Advertising report event for BLE_GAPM_EVT_ADV_REPORT.
Definition: ble_gapm.h:878
ble_gap_per_sync_param_t::sync_to
uint16_t sync_to
Definition: ble_gapm.h:716
BLE_GAP_SCAN_LIM_DISC_MODE
@ BLE_GAP_SCAN_LIM_DISC_MODE
Definition: ble_gapm.h:342
ble_gap_bond_devs_clear
uint16_t ble_gap_bond_devs_clear(void)
Clear all bonded devices.
BLE_GAP_ADV_PROP_TX_PWR_POS
@ BLE_GAP_ADV_PROP_TX_PWR_POS
Definition: ble_gapm.h:304
ble_gap_adv_prim_cfg_t::chnl_map
uint8_t chnl_map
Definition: ble_gapm.h:597
ble_gap_adv_param_t::max_tx_pwr
int8_t max_tx_pwr
Definition: ble_gapm.h:585
ble_gap_evt_iden_addr_report_t
Identity address report event for BLE_GAPM_EVT_IDEN_ADDR_REPORT.
Definition: ble_gapm.h:914
gap_switch_sampling_rate
gap_switch_sampling_rate
Supported AoA AoD switching sampling rate.
Definition: ble_gapm.h:458
ble_gap_adv_time_param_t
Advertising timing parameter.
Definition: ble_gapm.h:643
ble_gap_hw_adv_data_get
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.
BLE_GAP_AD_TYPE_SERVICE_16_BIT_DATA
@ BLE_GAP_AD_TYPE_SERVICE_16_BIT_DATA
Definition: ble_gapm.h:508
BLE_GAP_AD_TYPE_LE_BT_ADDR
@ BLE_GAP_AD_TYPE_LE_BT_ADDR
Definition: ble_gapm.h:515
ble_gap_tx_power_get
uint16_t ble_gap_tx_power_get(ble_gap_actv_role_t role, uint8_t index, int8_t *txpwr_dbm)
Get the tx power.
ble_gap_addr_set
uint16_t ble_gap_addr_set(ble_gap_bdaddr_t const *p_addr)
Set the device identity address (public or random static).
ble_gap_adv_prop_pos_t
ble_gap_adv_prop_pos_t
Advertising properties bit field and bit positions.
Definition: ble_gapm.h:292
BLE_GAP_STOPPED_REASON_CONN_EST
@ BLE_GAP_STOPPED_REASON_CONN_EST
Definition: ble_gapm.h:264
ble_gap_per_sync_param_t::adv_addr
ble_gap_period_adv_addr_cfg_t adv_addr
Definition: ble_gapm.h:719
ble_gap_period_adv_addr_cfg_t::bd_addr
ble_gap_bdaddr_t bd_addr
Definition: ble_gapm.h:705
ble_gap_data_length_set
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.
BLE_GAP_STOPPED_REASON_TIMEOUT
@ BLE_GAP_STOPPED_REASON_TIMEOUT
Definition: ble_gapm.h:262
ble_gap_role_t
ble_gap_role_t
GAP role options.
Definition: ble_gapm.h:149
ble_gap_period_adv_addr_cfg_t
Periodic advertising information.
Definition: ble_gapm.h:704
ble_gap_device_name_set
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.
ble_gap_ext_scan_type_t
ble_gap_ext_scan_type_t
Extended scanning types.
Definition: ble_gapm.h:359
ble_gap_ext_scan_param_t::scan_param_coded
ble_gap_scan_wd_op_param_t scan_param_coded
Definition: ble_gapm.h:693
gap_per_adv_sync_info_rec_mode
gap_per_adv_sync_info_rec_mode
Periodic advertising sync information reception mode.
Definition: ble_gapm.h:448
ble_gap_ext_scan_param_t::type
uint8_t type
Definition: ble_gapm.h:688
ble_gap_adv_mode_t
ble_gap_adv_mode_t
GAP advertising modes.
Definition: ble_gapm.h:212
BLE_GAP_NO_SYNC_WITH_AOD_1US_SLOT
@ BLE_GAP_NO_SYNC_WITH_AOD_1US_SLOT
Definition: ble_gapm.h:439
ble_gap_evt_adv_report_t::adv_info
ble_gap_adv_report_info_t adv_info
Definition: ble_gapm.h:880
BLE_GAP_ADV_PROP_ANONYMOUS_BIT
@ BLE_GAP_ADV_PROP_ANONYMOUS_BIT
Definition: ble_gapm.h:321
BLE_GAP_PHY_1MBPS_VALUE
@ BLE_GAP_PHY_1MBPS_VALUE
Definition: ble_gapm.h:273
ble_gap_actv_role_t
ble_gap_actv_role_t
Possible roles of the activity.
Definition: ble_gapm.h:550
ble_gap_ext_init_param_t
Extended initiating parameters.
Definition: ble_gapm.h:786
BLE_GAP_ADV_TYPE_ADV_LOW_DIRECT_IND
@ BLE_GAP_ADV_TYPE_ADV_LOW_DIRECT_IND
Definition: ble_gapm.h:217
ble_gap_connless_cte_trans_param_set
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.
ble_gap_le_phy_value_t
ble_gap_le_phy_value_t
Specify what PHY the Controller has changed for TX/RX. HCI:7.7.65.12.
Definition: ble_gapm.h:271
BLE_GAP_ADV_PROP_DIRECTED_BIT
@ BLE_GAP_ADV_PROP_DIRECTED_BIT
Definition: ble_gapm.h:318
ble_gap_evt_sync_established_t::clk_acc
uint8_t clk_acc
Definition: ble_gapm.h:900
ble_gap_lepsm_register_t::sec_lvl
uint8_t sec_lvl
Definition: ble_gapm.h:806
BLE_GAP_AD_TYPE_COMPLETE_LIST_128_BIT_UUID
@ BLE_GAP_AD_TYPE_COMPLETE_LIST_128_BIT_UUID
Definition: ble_gapm.h:495
ble_gap_adv_prim_cfg_t::adv_intv_max
uint32_t adv_intv_max
Definition: ble_gapm.h:596
ble_gap_white_list_auto_add_policy_set
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.
BLE_GAP_ADV_PROP_SCAN_REQ_NTF_EN_BIT
@ BLE_GAP_ADV_PROP_SCAN_REQ_NTF_EN_BIT
Definition: ble_gapm.h:324
BLE_GAP_WRITE_PERM_DISABLE
@ BLE_GAP_WRITE_PERM_DISABLE
Definition: ble_gapm.h:173
ble_gap_bond_dev_del
uint16_t ble_gap_bond_dev_del(const ble_gap_bdaddr_t *p_peer_addr)
Delete a bond device with the specified BD address.
ble_gap_whitelist_get
uint16_t ble_gap_whitelist_get(ble_gap_white_list_t *p_whitelist)
Get the content of the whole white list.
ble_gap_ext_conn_param_t::conn_intv_max
uint16_t conn_intv_max
Definition: ble_gapm.h:774
BLE_GAP_EXT_SCAN_TYPE_CONN_DISC
@ BLE_GAP_EXT_SCAN_TYPE_CONN_DISC
Definition: ble_gapm.h:364
BLE_GAP_AOA_RX_1_US
@ BLE_GAP_AOA_RX_1_US
Definition: ble_gapm.h:461
ble_gap_default_conn_tx_power_set
void ble_gap_default_conn_tx_power_set(int8_t txpwr_dbm)
Set the default tx power for connection.
ble_gap_per_sync_param_t
Periodic advertising synchronization parameters.
Definition: ble_gapm.h:713
BLE_GAP_AD_TYPE_PUB_TGT_ADDR
@ BLE_GAP_AD_TYPE_PUB_TGT_ADDR
Definition: ble_gapm.h:511
BLE_GAP_AUTO_ADD_WHITE_LIST_ALL_ROLE
@ BLE_GAP_AUTO_ADD_WHITE_LIST_ALL_ROLE
Definition: ble_gapm.h:426
BLE_GAP_GET_DEV_TX_POWER
@ BLE_GAP_GET_DEV_TX_POWER
Definition: ble_gapm.h:205
ble_gap_lepsm_register_t
LE Protocol/Service Multiplexer information.
Definition: ble_gapm.h:804
BLE_GAP_ADV_ALLOW_SCAN_ANY_CON_ANY
@ BLE_GAP_ADV_ALLOW_SCAN_ANY_CON_ANY
Definition: ble_gapm.h:234
gap_sec_lvl_type
gap_sec_lvl_type
Security level types.
Definition: ble_gapm.h:477
ble_gap_scan_param_t::scan_type
ble_gap_scan_type_t scan_type
Definition: ble_gapm.h:665
BLE_GAP_ADV_PROP_PER_TX_PWR_BIT
@ BLE_GAP_ADV_PROP_PER_TX_PWR_BIT
Definition: ble_gapm.h:323
ble_gap_ext_conn_param_t::conn_intv_min
uint16_t conn_intv_min
Definition: ble_gapm.h:772
BLE_GAP_ADV_DATA_TYPE_DATA
@ BLE_GAP_ADV_DATA_TYPE_DATA
Definition: ble_gapm.h:185
ble_gap_per_sync_param_set
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.
ble_gap_per_sync_start
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 advert...
ble_gap_evt_scan_req_t
Scan request info.
Definition: ble_gapm.h:866
ble_gap_adv_param_t::disc_mode
uint8_t disc_mode
Definition: ble_gapm.h:578
gap_connless_cte_trans_param_t::cte_type
uint8_t cte_type
Definition: ble_gapm.h:730
ble_gap_evt_adv_report_t::adv_sid
uint8_t adv_sid
Definition: ble_gapm.h:887
BLE_GAP_NO_SYNC_WITH_AOA
@ BLE_GAP_NO_SYNC_WITH_AOA
Definition: ble_gapm.h:438
BLE_GAP_SLOT_DURA_1US
@ BLE_GAP_SLOT_DURA_1US
Definition: ble_gapm.h:469
ble_gap_init_param_t
Legacy initiating parameters.
Definition: ble_gapm.h:752
BLE_GAP_AUTO_ADD_WHITE_LIST_WITH_MASTER
@ BLE_GAP_AUTO_ADD_WHITE_LIST_WITH_MASTER
Definition: ble_gapm.h:427
BLE_GAP_ADV_PROP_SCANNABLE_BIT
@ BLE_GAP_ADV_PROP_SCANNABLE_BIT
Definition: ble_gapm.h:317
BLE_GAP_AD_TYPE_RQRD_128_BIT_SVC_UUID
@ BLE_GAP_AD_TYPE_RQRD_128_BIT_SVC_UUID
Definition: ble_gapm.h:507
BLE_GAP_SCAN_FILT_DUPLIC_EN
@ BLE_GAP_SCAN_FILT_DUPLIC_EN
Definition: ble_gapm.h:352
BLE_GAP_ADV_PROP_USE_LEGACY_PDUS_BIT
@ BLE_GAP_ADV_PROP_USE_LEGACY_PDUS_BIT
Definition: ble_gapm.h:320
ble_gap_ext_conn_param_t::ce_len_min
uint16_t ce_len_min
Definition: ble_gapm.h:778
BLE_GAP_REPORT_TYPE_SCAN_RSP_LEG
@ BLE_GAP_REPORT_TYPE_SCAN_RSP_LEG
Definition: ble_gapm.h:246
ble_gap_connless_iq_sample_param_t
Set connectionless IQ sampling enable parameter.
Definition: ble_gapm.h:740
ble_gap_per_sync_param_t::type
uint8_t type
Definition: ble_gapm.h:717
BLE_GAP_SCAN_FILT_DUPLIC_DIS
@ BLE_GAP_SCAN_FILT_DUPLIC_DIS
Definition: ble_gapm.h:351
BLE_GAP_ADV_PROP_USE_LEGACY_PDUS_POS
@ BLE_GAP_ADV_PROP_USE_LEGACY_PDUS_POS
Definition: ble_gapm.h:301
ble_gap_get_local_irk
void ble_gap_get_local_irk(uint8_t *p_local_irk)
Get the local irk.
ble_gap_update_adv_data
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...
ble_gap_ext_scan_dup_filt_policy_t
ble_gap_ext_scan_dup_filt_policy_t
Filtering policy for duplicated packets.
Definition: ble_gapm.h:385
ble_gap_evt_adv_report_t::per_sync_idx
uint8_t per_sync_idx
Definition: ble_gapm.h:889
BLE_GAP_ADV_TYPE_ADV_IND
@ BLE_GAP_ADV_TYPE_ADV_IND
Definition: ble_gapm.h:213
ble_gap_evt_scan_stop_t
Scan Stop info struct.
Definition: ble_gapm.h:872
ble_gap_evt_scan_stop_t::reason
ble_gap_stopped_reason_t reason
Definition: ble_gapm.h:873
BLE_GAP_PHY_UNDEF_VALUE
@ BLE_GAP_PHY_UNDEF_VALUE
Definition: ble_gapm.h:272
BLE_GAP_AD_TYPE_COMPLETE_LIST_16_BIT_UUID
@ BLE_GAP_AD_TYPE_COMPLETE_LIST_16_BIT_UUID
Definition: ble_gapm.h:491
ble_gap_ext_adv_param_t::period_cfg
ble_gap_adv_period_cfg_t period_cfg
Definition: ble_gapm.h:636
ble_gap_evt_rslv_addr_report_t::rpa_addr
ble_gap_addr_t rpa_addr
Definition: ble_gapm.h:909
BLE_GAP_PRIVACY_MODE_DEVICE
@ BLE_GAP_PRIVACY_MODE_DEVICE
Definition: ble_gapm.h:543
CO_BIT
#define CO_BIT(pos)
Definition: ble_gapm.h:72
ble_gapm_evt_t
BLE GAPM event structure.
Definition: ble_gapm.h:926
ble_gap_per_sync_param_t::cte_type
uint8_t cte_type
Definition: ble_gapm.h:721
ble_gap_ext_scan_param_t::prop
uint8_t prop
Definition: ble_gapm.h:689
ble_gap_adv_period_cfg_t::adv_intv_max
uint16_t adv_intv_max
Definition: ble_gapm.h:619
BLE_GAP_ACTIVITY_ROLE_SCAN_INIT
@ BLE_GAP_ACTIVITY_ROLE_SCAN_INIT
Definition: ble_gapm.h:553
BLE_GAP_DISC_MODE_BROADCASTER
@ BLE_GAP_DISC_MODE_BROADCASTER
Definition: ble_gapm.h:226
ble_gap_actv_type_t
ble_gap_actv_type_t
Activity type.
Definition: ble_gapm.h:561
BLE_GAP_ADV_PROP_ANONYMOUS_POS
@ BLE_GAP_ADV_PROP_ANONYMOUS_POS
Definition: ble_gapm.h:302
BLE_GAP_ADV_FLAG_LE_LIMITED_DISC_MODE
@ BLE_GAP_ADV_FLAG_LE_LIMITED_DISC_MODE
Definition: ble_gapm.h:529
ble_gap_adv_param_t::adv_mode
uint8_t adv_mode
Definition: ble_gapm.h:577
ble_gapm_evt_t::scan_req
ble_gap_evt_scan_req_t scan_req
Definition: ble_gapm.h:931
ble_gap_period_adv_addr_cfg_t::adv_sid
uint8_t adv_sid
Definition: ble_gapm.h:706
ble_gap_ext_adv_param_t::prop
uint16_t prop
Definition: ble_gapm.h:630
BLE_GAP_ADV_ALLOW_SCAN_ANY_CON_WLST
@ BLE_GAP_ADV_ALLOW_SCAN_ANY_CON_WLST
Definition: ble_gapm.h:236
BLE_GAP_AD_TYPE_SPAIR_RAND
@ BLE_GAP_AD_TYPE_SPAIR_RAND
Definition: ble_gapm.h:518
BLE_GAP_GET_DEV_RF_RF_PATH_COMP
@ BLE_GAP_GET_DEV_RF_RF_PATH_COMP
Definition: ble_gapm.h:206
ble_gap_period_adv_list_t::num
uint8_t num
Definition: ble_gapm.h:833
BLE_GAP_GET_MAX_LE_DATA_LEN
@ BLE_GAP_GET_MAX_LE_DATA_LEN
Definition: ble_gapm.h:200
BLE_GAP_AUTO_ADD_WHITE_LIST_NONE
@ BLE_GAP_AUTO_ADD_WHITE_LIST_NONE
Definition: ble_gapm.h:429
ble_gap_ext_init_param_t::conn_param_2m
ble_gap_ext_conn_param_t conn_param_2m
Definition: ble_gapm.h:795
ble_gap_connless_iq_sample_param_t::slot_dur
uint8_t slot_dur
Definition: ble_gapm.h:741
ble_gap_per_sync_stop
uint16_t ble_gap_per_sync_stop(uint8_t per_sync_idx)
Stop periodic synchronization.
ble_gap_path_compensation_set
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 c...
ble_gap_evt_adv_report_t::tx_pwr
int8_t tx_pwr
Definition: ble_gapm.h:883
BLE_GAP_AD_TYPE_LE_ROLE
@ BLE_GAP_AD_TYPE_LE_ROLE
Definition: ble_gapm.h:516
BLE_GAP_ADV_TYPE_ADV_NONCONN_IND
@ BLE_GAP_ADV_TYPE_ADV_NONCONN_IND
Definition: ble_gapm.h:214
ble_gap_conn_param_t
The parameter of connection.
Definition: ble_gapc.h:316
BLE_GAP_AD_TYPE_SLAVE_CONN_INT_RANGE
@ BLE_GAP_AD_TYPE_SLAVE_CONN_INT_RANGE
Definition: ble_gapm.h:504
BLE_GAP_ROLE_NONE
@ BLE_GAP_ROLE_NONE
Definition: ble_gapm.h:150
ble_gap_evt_adv_stop_t::reason
ble_gap_stopped_reason_t reason
Definition: ble_gapm.h:861
BLE_GAP_SEC_LVL_SC_ENC_AUTH
@ BLE_GAP_SEC_LVL_SC_ENC_AUTH
Definition: ble_gapm.h:481
ble_error.h
File that contains error codes.
BLE_GAP_ADV_PROP_HDC_POS
@ BLE_GAP_ADV_PROP_HDC_POS
Definition: ble_gapm.h:299
ble_gapc.h
BLE GAPC API.
ble_gap_ral_dev_info_t
RPA list item info.
Definition: ble_gapm.h:841
ble_gap_connect
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.
ble_gap_ext_init_param_t::conn_param_coded
ble_gap_ext_conn_param_t conn_param_coded
Definition: ble_gapm.h:796
ble_gap_init_type_t
ble_gap_init_type_t
Initiating types.
Definition: ble_gapm.h:395
BLE_GAP_REPORT_INFO_SCAN_ADV_BIT
@ BLE_GAP_REPORT_INFO_SCAN_ADV_BIT
Definition: ble_gapm.h:255
BLE_GAP_ADV_PROP_CONNECTABLE_POS
@ BLE_GAP_ADV_PROP_CONNECTABLE_POS
Definition: ble_gapm.h:293
BLE_GAP_EXT_DUP_FILT_DIS
@ BLE_GAP_EXT_DUP_FILT_DIS
Definition: ble_gapm.h:386
ble_gapm_evt_t::adv_report
ble_gap_evt_adv_report_t adv_report
Definition: ble_gapm.h:933
BLE_GAP_EXT_SCAN_PROP_ACTIVE_CODED_BIT
@ BLE_GAP_EXT_SCAN_PROP_ACTIVE_CODED_BIT
Definition: ble_gapm.h:376
BLE_GAP_INIT_TYPE_AUTO_CONN_EST
@ BLE_GAP_INIT_TYPE_AUTO_CONN_EST
Definition: ble_gapm.h:397
ble_gap_scan_param_t::use_whitelist
bool use_whitelist
Definition: ble_gapm.h:668
BLE_GAP_REPORT_INFO_COMPLETE_BIT
@ BLE_GAP_REPORT_INFO_COMPLETE_BIT
Definition: ble_gapm.h:253
ble_gap_connless_iq_sample_param_t::max_smaple_cte
uint8_t max_smaple_cte
Definition: ble_gapm.h:742
BLE_GAP_REPORT_TYPE_ADV_LEG
@ BLE_GAP_REPORT_TYPE_ADV_LEG
Definition: ble_gapm.h:244
ble_gap_adv_type_t
ble_gap_adv_type_t
Advertising type.
Definition: ble_gapm.h:282
ble_gap_white_list_t::num
uint8_t num
Definition: ble_gapm.h:824
ble_gap_adv_scan_evt_report_enable_set
void ble_gap_adv_scan_evt_report_enable_set(bool enable_flag)
Set whether to report adv/scan event.
ble_gap_adv_second_cfg_t::adv_sid
uint8_t adv_sid
Definition: ble_gapm.h:610
ble_gap_scan_prop_t
ble_gap_scan_prop_t
Scanning properties bit field bit value.
Definition: ble_gapm.h:372
BLE_GAP_ADV_TYPE_ADV_SCAN_IND
@ BLE_GAP_ADV_TYPE_ADV_SCAN_IND
Definition: ble_gapm.h:215
ble_gap_evt_sync_established_t
Sync established event for BLE_GAPM_EVT_SYNC_ESTABLISH.
Definition: ble_gapm.h:896
ble_gap_sec_key_t
Security key.
Definition: ble_gapm.h:656
ble_gap_scan_type_t
ble_gap_scan_type_t
Scanning types.
Definition: ble_gapm.h:331
BLE_GAP_ADV_FLAG_SIMUL_BR_EDR_LE_HOST
@ BLE_GAP_ADV_FLAG_SIMUL_BR_EDR_LE_HOST
Definition: ble_gapm.h:533
ble_gap_evt_adv_report_t::data
uint8_t * data
Definition: ble_gapm.h:891
ble_gap_evt_adv_report_t::phy_second
uint8_t phy_second
Definition: ble_gapm.h:886
ble_gap_adv_start
uint16_t ble_gap_adv_start(uint8_t adv_idx, ble_gap_adv_time_param_t *p_timeout)
Start advertising.
BLE_GAP_EXT_DUP_FILT_EN_PERIOD
@ BLE_GAP_EXT_DUP_FILT_EN_PERIOD
Definition: ble_gapm.h:388
ble_gap_adv_time_param_t::duration
uint16_t duration
Definition: ble_gapm.h:644
ble_gap_bond_dev_list_t
Bonded device list.
Definition: ble_gapm.h:814
BLE_GAP_ADV_FLAG_SIMUL_BR_EDR_LE_CONTROLLER
@ BLE_GAP_ADV_FLAG_SIMUL_BR_EDR_LE_CONTROLLER
Definition: ble_gapm.h:532
BLE_GAP_INIT_TYPE_NAME_DISC
@ BLE_GAP_INIT_TYPE_NAME_DISC
Definition: ble_gapm.h:398
BLE_GAP_ADV_DATA_TYPE_PER_DATA
@ BLE_GAP_ADV_DATA_TYPE_PER_DATA
Definition: ble_gapm.h:187
ble_gap_disc_mode_t
ble_gap_disc_mode_t
GAP discoverability modes.
Definition: ble_gapm.h:222
ble_gap_dev_name_write_perm_t
ble_gap_dev_name_write_perm_t
Write permissions of the device name characteristic.
Definition: ble_gapm.h:172
ble_gap_scan_wd_op_param_t::scan_wd
uint16_t scan_wd
Definition: ble_gapm.h:680
BLE_GAP_ADV_TYPE_PERIODIC
@ BLE_GAP_ADV_TYPE_PERIODIC
Definition: ble_gapm.h:285
ble_gap_scan_stop
uint16_t ble_gap_scan_stop(void)
Stop scanning.
ble_gap_adv_prim_cfg_t::adv_intv_min
uint32_t adv_intv_min
Definition: ble_gapm.h:595
ble_gap_per_adv_list_get
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.
ble_gap_adv_param_t::scan_req_ind_en
bool scan_req_ind_en
Definition: ble_gapm.h:584
BLE_GAP_AOD_TX_1_US
@ BLE_GAP_AOD_TX_1_US
Definition: ble_gapm.h:459
BLE_GAP_AD_TYPE_APPEARANCE
@ BLE_GAP_AD_TYPE_APPEARANCE
Definition: ble_gapm.h:513
BLE_GAP_REPORT_TYPE_ADV_EXT
@ BLE_GAP_REPORT_TYPE_ADV_EXT
Definition: ble_gapm.h:243
ble_gap_per_sync_param_t::rsvd
uint8_t rsvd
Definition: ble_gapm.h:718
BLE_GAP_EXT_SCAN_PROP_PHY_1M_BIT
@ BLE_GAP_EXT_SCAN_PROP_PHY_1M_BIT
Definition: ble_gapm.h:373
BLE_GAP_EXT_SCAN_TYPE_SEL_OBSERVER
@ BLE_GAP_EXT_SCAN_TYPE_SEL_OBSERVER
Definition: ble_gapm.h:363
ble_gap_ppcp_present_set
void ble_gap_ppcp_present_set(bool present_flag)
Set GAP Peripheral Preferred Connection Parameters present flag.
ble_gap_init_param_t::interval_min
uint16_t interval_min
Definition: ble_gapm.h:755
BLE_GAP_DISC_MODE_LIM_DISCOVERABLE
@ BLE_GAP_DISC_MODE_LIM_DISCOVERABLE
Definition: ble_gapm.h:225
ble_gap_ext_connect
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.
ble_gap_init_param_t::interval_max
uint16_t interval_max
Definition: ble_gapm.h:757
BLE_GAP_SYNC_REP_DIS
@ BLE_GAP_SYNC_REP_DIS
Definition: ble_gapm.h:449
ble_gap_whitelist_del
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,...
BLE_GAP_MAX_KEY_LEN
#define BLE_GAP_MAX_KEY_LEN
Definition: ble_gapm.h:77
ble_gap_chnl_map_set
uint16_t ble_gap_chnl_map_set(ble_gap_chnl_map_t *p_chnl_map)
Set channel map.
ble_gap_evt_iden_addr_report_t::iden_addr
ble_gap_bdaddr_t iden_addr
Definition: ble_gapm.h:915
BLE_GAP_AD_TYPE_SERVICE_128_BIT_DATA
@ BLE_GAP_AD_TYPE_SERVICE_128_BIT_DATA
Definition: ble_gapm.h:510
ble_gap_adv_period_cfg_t::inc_adi_flag
bool inc_adi_flag
Definition: ble_gapm.h:620
ble_gap_adv_flags_t
ble_gap_adv_flags_t
AD Type Flag - Bit mask.
Definition: ble_gapm.h:528
BLE_GAP_AD_TYPE_3D_INFO
@ BLE_GAP_AD_TYPE_3D_INFO
Definition: ble_gapm.h:519
gap_slot_dur_type
gap_slot_dur_type
Slot duration type for IQ sampling.
Definition: ble_gapm.h:468
BLE_GAP_AD_TYPE_SHORTENED_NAME
@ BLE_GAP_AD_TYPE_SHORTENED_NAME
Definition: ble_gapm.h:496
BLE_GAP_PER_SYNC_TYPE_GENERAL
@ BLE_GAP_PER_SYNC_TYPE_GENERAL
Definition: ble_gapm.h:416
BLE_GAP_AD_TYPE_SERVICE_32_BIT_DATA
@ BLE_GAP_AD_TYPE_SERVICE_32_BIT_DATA
Definition: ble_gapm.h:509
BLE_GAP_INIT_PROP_CODED_BIT
@ BLE_GAP_INIT_PROP_CODED_BIT
Definition: ble_gapm.h:408
ble_gap_l2cap_params_set
uint16_t ble_gap_l2cap_params_set(uint16_t max_mtu, uint16_t max_mps, uint8_t max_nb_lecb)
Set L2CAP related parameters.
BLE_GAP_AD_TYPE_SP_HASH_C
@ BLE_GAP_AD_TYPE_SP_HASH_C
Definition: ble_gapm.h:500
BLE_GAP_EXT_SCAN_TYPE_SEL_CONN_DISC
@ BLE_GAP_EXT_SCAN_TYPE_SEL_CONN_DISC
Definition: ble_gapm.h:365
BLE_GAP_EXT_SCAN_PROP_ACTIVE_1M_BIT
@ BLE_GAP_EXT_SCAN_PROP_ACTIVE_1M_BIT
Definition: ble_gapm.h:375
ble_gap_adv_param_t
Advertising parameters for legacy advertising.
Definition: ble_gapm.h:576
BLE_GAP_EXT_SCAN_TYPE_OBSERVER
@ BLE_GAP_EXT_SCAN_TYPE_OBSERVER
Definition: ble_gapm.h:362
ble_gap_bond_devs_get
uint16_t ble_gap_bond_devs_get(ble_gap_bond_dev_list_t *p_bond_list, uint8_t max_num)
Get all bonded devices.
ble_gap_stopped_reason_t
ble_gap_stopped_reason_t
Stop reason code.
Definition: ble_gapm.h:261
ble_gapm_evt_t::index
uint8_t index
Definition: ble_gapm.h:927
ble_gap_ral_dev_info_t::bd_addr
ble_gap_bdaddr_t bd_addr
Definition: ble_gapm.h:842
BLE_GAP_STOPPED_REASON_ON_USER
@ BLE_GAP_STOPPED_REASON_ON_USER
Definition: ble_gapm.h:263
ble_gap_scan_param_t::scan_mode
ble_gap_scan_mode_t scan_mode
Definition: ble_gapm.h:666
BLE_GAP_NO_SYNC_WITHOUT_CTE
@ BLE_GAP_NO_SYNC_WITHOUT_CTE
Definition: ble_gapm.h:441
ble_gap_evt_adv_report_t::rssi
int8_t rssi
Definition: ble_gapm.h:884
ble_gap_ral_dev_list_t::num
uint8_t num
Definition: ble_gapm.h:854
ble_gap_ppcp_set
uint16_t ble_gap_ppcp_set(ble_gap_conn_param_t const *p_conn_params)
Set GAP Peripheral Preferred Connection Parameters.
ble_gap_ext_adv_param_t::type
uint8_t type
Definition: ble_gapm.h:628
ble_gap_ext_conn_param_t::ce_len_max
uint16_t ce_len_max
Definition: ble_gapm.h:779
ble_gap_reslv_rpa_addr_by_irk
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.
ble_gap_adv_second_cfg_t::phy
ble_gap_le_phy_value_t phy
Definition: ble_gapm.h:609
ble_gap_per_adv_list_clear
uint16_t ble_gap_per_adv_list_clear(void)
Clear all the entries in the current periodic advertising list.
ble_gap_ext_scan_param_t::period
uint16_t period
Definition: ble_gapm.h:696
ble_gap_evt_adv_report_t::phy_prim
uint8_t phy_prim
Definition: ble_gapm.h:885
ble_gap_lepsm_register
uint16_t ble_gap_lepsm_register(ble_gap_lepsm_register_t *p_lepsm)
Register a LE Protocol/Service Multiplexer.
ble_gap_evt_adv_report_t::broadcaster_addr
ble_gap_bdaddr_t broadcaster_addr
Definition: ble_gapm.h:881
ble_gap_connless_iq_sample_enable_set
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.
ble_gap_ext_adv_param_t::second_cfg
ble_gap_adv_second_cfg_t second_cfg
Definition: ble_gapm.h:635
ble_gapm_evt_t::sync_established
ble_gap_evt_sync_established_t sync_established
Definition: ble_gapm.h:934
ble_gapm_evt_t::scan_stop
ble_gap_evt_scan_stop_t scan_stop
Definition: ble_gapm.h:932
ble_gapm_evt_t::adv_stop
ble_gap_evt_adv_stop_t adv_stop
Definition: ble_gapm.h:930
ble_gap_ext_scan_param_t
Parameters for extended scanning.
Definition: ble_gapm.h:687
ble_gap_adv_stop
uint16_t ble_gap_adv_stop(uint8_t adv_idx)
Stop advertising.
ble_gap_ext_conn_param_t
Connection parameters.
Definition: ble_gapm.h:771
BLE_GAP_GET_NB_ADV_SETS
@ BLE_GAP_GET_NB_ADV_SETS
Definition: ble_gapm.h:203
ble_gap_lepsm_unregister
uint16_t ble_gap_lepsm_unregister(uint16_t le_psm)
Unregister a LE Protocol/Service Multiplexer.
BLE_GAP_ADV_TYPE_ADV_HIGH_DIRECT_IND
@ BLE_GAP_ADV_TYPE_ADV_HIGH_DIRECT_IND
Definition: ble_gapm.h:216
ble_gap_appearance_set
void ble_gap_appearance_set(uint16_t appearance)
Set GAP appearance value.
BLE_GAP_DISC_MODE_NON_DISCOVERABLE
@ BLE_GAP_DISC_MODE_NON_DISCOVERABLE
Definition: ble_gapm.h:223
BLE_GAP_AOD_RX_1_US
@ BLE_GAP_AOD_RX_1_US
Definition: ble_gapm.h:460
BLE_GAP_WRITE_PERM_NOAUTH
@ BLE_GAP_WRITE_PERM_NOAUTH
Definition: ble_gapm.h:174
BLE_GAP_DISC_MODE_GEN_DISCOVERABLE
@ BLE_GAP_DISC_MODE_GEN_DISCOVERABLE
Definition: ble_gapm.h:224
ble_gap_adv_period_cfg_t
Configuration for periodic advertising.
Definition: ble_gapm.h:617
BLE_GAP_MAX_WL_NUM
#define BLE_GAP_MAX_WL_NUM
Definition: ble_gapm.h:75
ble_gap_evt_adv_stop_t
Advertising Stop info.
Definition: ble_gapm.h:860
ble_gap_dev_info_get_type_t
ble_gap_dev_info_get_type_t
Get device parameters operation code.
Definition: ble_gapm.h:193
ble_gap_addr_get
uint16_t ble_gap_addr_get(ble_gap_bdaddr_t *p_addr)
Get the device identity address (public or random static).
ble_gap_evt_adv_report_t::period_adv_intv
uint16_t period_adv_intv
Definition: ble_gapm.h:888
ble_gap_ext_init_param_t::scan_param_coded
ble_gap_scan_wd_op_param_t scan_param_coded
Definition: ble_gapm.h:793
BLE_GAP_GET_SUGGESTED_DFLT_LE_DATA_LEN
@ BLE_GAP_GET_SUGGESTED_DFLT_LE_DATA_LEN
Definition: ble_gapm.h:197
ble_gap_scan_param_t::window
uint16_t window
Definition: ble_gapm.h:670
BLE_GAP_PER_SYNC_TYPE_SELECTIVE
@ BLE_GAP_PER_SYNC_TYPE_SELECTIVE
Definition: ble_gapm.h:417
BLE_GAP_AD_TYPE_FLAGS
@ BLE_GAP_AD_TYPE_FLAGS
Definition: ble_gapm.h:489
BLE_GAP_PER_SYNC_TYPE_PAST
@ BLE_GAP_PER_SYNC_TYPE_PAST
Definition: ble_gapm.h:418
BLE_GAP_INIT_PROP_1M_BIT
@ BLE_GAP_INIT_PROP_1M_BIT
Definition: ble_gapm.h:406
ble_gap_period_adv_list_t
Periodic advertising list.
Definition: ble_gapm.h:832
BLE_GAP_MAX_PRD_ADV_NUM
#define BLE_GAP_MAX_PRD_ADV_NUM
Definition: ble_gapm.h:76
ble_gap_ext_init_param_t::type
uint8_t type
Definition: ble_gapm.h:787
ble_gap_adv_param_t::chnl_map
uint8_t chnl_map
Definition: ble_gapm.h:583
BLE_GAP_ACTIVITY_ROLE_UNKNOWN
@ BLE_GAP_ACTIVITY_ROLE_UNKNOWN
Definition: ble_gapm.h:554
BLE_GAP_SCAN_PASSIVE
@ BLE_GAP_SCAN_PASSIVE
Definition: ble_gapm.h:333
ble_gap_evt_adv_report_t::adv_type
ble_gap_adv_report_type_t adv_type
Definition: ble_gapm.h:879
ble_gap_ext_scan_param_t::scan_param_1m
ble_gap_scan_wd_op_param_t scan_param_1m
Definition: ble_gapm.h:692
BLE_GAP_AD_TYPE_CLASS_OF_DEVICE
@ BLE_GAP_AD_TYPE_CLASS_OF_DEVICE
Definition: ble_gapm.h:499
ble_gap_adv_prim_cfg_t::phy
ble_gap_le_phy_value_t phy
Definition: ble_gapm.h:598
ble_gap_appearance_get
uint16_t ble_gap_appearance_get(uint16_t *p_appearance)
Get GAP appearance value.
BLE_GAP_AD_TYPE_OOB_FLAGS
@ BLE_GAP_AD_TYPE_OOB_FLAGS
Definition: ble_gapm.h:503
BLE_GAP_AD_TYPE_RAND_TGT_ADDR
@ BLE_GAP_AD_TYPE_RAND_TGT_ADDR
Definition: ble_gapm.h:512
ble_gap_ext_scan_param_t::duration
uint16_t duration
Definition: ble_gapm.h:694
ble_gap_ext_init_param_t::prop
uint8_t prop
Definition: ble_gapm.h:788
ble_gap_adv_data_set
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 fo...
ble_gap_adv_report_type_t
ble_gap_adv_report_type_t
Advertising report type.
Definition: ble_gapm.h:242
ble_gap_init_param_t::slave_latency
uint16_t slave_latency
Definition: ble_gapm.h:759
ble_gap_adv_param_set
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.
gap_connless_cte_trans_param_t::cte_count
uint8_t cte_count
Definition: ble_gapm.h:731
BLE_GAP_AD_TYPE_COMPLETE_LIST_32_BIT_UUID
@ BLE_GAP_AD_TYPE_COMPLETE_LIST_32_BIT_UUID
Definition: ble_gapm.h:493
ble_gap_scan_mode_t
ble_gap_scan_mode_t
Scanning modes.
Definition: ble_gapm.h:340
BLE_GAP_REPORT_TYPE_SCAN_RSP_EXT
@ BLE_GAP_REPORT_TYPE_SCAN_RSP_EXT
Definition: ble_gapm.h:245
ble_gap_bond_dev_list_t::num
uint8_t num
Definition: ble_gapm.h:815
BLE_GAP_ROLE_OBSERVER
@ BLE_GAP_ROLE_OBSERVER
Definition: ble_gapm.h:151
ble_gap_scan_wd_op_param_t::scan_intv
uint16_t scan_intv
Definition: ble_gapm.h:679
ble_gap_ext_init_param_t::peer_addr
ble_gap_bdaddr_t peer_addr
Definition: ble_gapm.h:797
gap_connless_cte_trans_param_t::cte_len
uint8_t cte_len
Definition: ble_gapm.h:729
BLE_GAP_SEC_LVL_ENC_NO_AUTH
@ BLE_GAP_SEC_LVL_ENC_NO_AUTH
Definition: ble_gapm.h:479
BLE_GAP_AD_TYPE_MANU_SPECIFIC_DATA
@ BLE_GAP_AD_TYPE_MANU_SPECIFIC_DATA
Definition: ble_gapm.h:521
ble_gap_ext_adv_param_t::filter_pol
uint8_t filter_pol
Definition: ble_gapm.h:632
ble_gap_check_whitelist_full
bool ble_gap_check_whitelist_full(void)
Check white list is full.
ble_gap_connless_iq_sample_param_t::antenna_id
uint8_t * antenna_id
Definition: ble_gapm.h:745
ble_gap_device_name_get
uint16_t ble_gap_device_name_get(uint8_t *p_dev_name, uint16_t *p_length)
Get GAP device name.
BLE_GAP_OWN_ADDR_GEN_NON_RSLV
@ BLE_GAP_OWN_ADDR_GEN_NON_RSLV
Definition: ble_gapm.h:165
ble_gap_connless_cte_trans_enable_set
uint16_t ble_gap_connless_cte_trans_enable_set(uint8_t per_adv_index, bool enable_flag)
Set connectionless CTE transmit enable.
BLE_GAP_AD_TYPE_MORE_128_BIT_UUID
@ BLE_GAP_AD_TYPE_MORE_128_BIT_UUID
Definition: ble_gapm.h:494
ble_gap_per_adv_list_add
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...
ble_gap_own_addr_t
ble_gap_own_addr_t
Own BD address source of the device.
Definition: ble_gapm.h:162
BLE_GAP_AD_TYPE_RQRD_16_BIT_SVC_UUID
@ BLE_GAP_AD_TYPE_RQRD_16_BIT_SVC_UUID
Definition: ble_gapm.h:505
ble_gap_evt_rslv_addr_report_t::type
ble_gap_actv_type_t type
Definition: ble_gapm.h:908
ble_gap_adv_period_cfg_t::adv_intv_min
uint16_t adv_intv_min
Definition: ble_gapm.h:618
ble_gap_connless_iq_sample_param_t::antenna_num
uint8_t antenna_num
Definition: ble_gapm.h:744
BLE_GAP_INIT_PROP_2M_BIT
@ BLE_GAP_INIT_PROP_2M_BIT
Definition: ble_gapm.h:407
BLE_GAP_AD_TYPE_SP_RANDOMIZER_R
@ BLE_GAP_AD_TYPE_SP_RANDOMIZER_R
Definition: ble_gapm.h:501
ble_gap_per_sync_param_t::report_disable
bool report_disable
Definition: ble_gapm.h:720
ble_gap_scan_param_t::interval
uint16_t interval
Definition: ble_gapm.h:669
ble_gap_per_sync_param_t::skip
uint16_t skip
Definition: ble_gapm.h:714
ble_gap_ext_init_param_t::conn_param_1m
ble_gap_ext_conn_param_t conn_param_1m
Definition: ble_gapm.h:794
BLE_GAP_AD_TYPE_ADV_INTV
@ BLE_GAP_AD_TYPE_ADV_INTV
Definition: ble_gapm.h:514
ble_gap_evt_adv_report_t::direct_addr
ble_gap_bdaddr_t direct_addr
Definition: ble_gapm.h:882
ble_gap_chnl_map_t
Channel map structure.
Definition: ble_gapc.h:354
BLE_GAP_ACTV_TYPE_PER_SYNC
@ BLE_GAP_ACTV_TYPE_PER_SYNC
Definition: ble_gapm.h:565
ble_gap_adv_time_param_t::max_adv_evt
uint8_t max_adv_evt
Definition: ble_gapm.h:648
ble_gap_adv_second_cfg_t
Configuration for advertising on secondary channel.
Definition: ble_gapm.h:606
ble_gap_privacy_params_set
uint16_t ble_gap_privacy_params_set(uint16_t renew_dur, bool enable_flag)
Set privacy related parameters.
ble_gap_rpa_list_get
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.
ble_gap_evt_rslv_addr_report_t
Resolvable address report event for BLE_GAPM_EVT_RSLV_ADDR_REPORT.
Definition: ble_gapm.h:907
ble_gap_scan_param_t::timeout
uint16_t timeout
Definition: ble_gapm.h:671
BLE_GAP_EXT_DUP_FILT_EN
@ BLE_GAP_EXT_DUP_FILT_EN
Definition: ble_gapm.h:387
ble_gap_ral_dev_list_t::items
ble_gap_ral_dev_info_t * items
Definition: ble_gapm.h:855
ble_gap_rpa_list_add
uint16_t ble_gap_rpa_list_add(ble_gap_bdaddr_t *p_peer_iden_addr, uint8_t *p_peer_irk)
Add rpa list.
BLE_GAP_ADV_TYPE_EXTENDED
@ BLE_GAP_ADV_TYPE_EXTENDED
Definition: ble_gapm.h:284
ble_gap_scan_param_t::scan_dup_filt
ble_gap_scan_dup_filt_policy_t scan_dup_filt
Definition: ble_gapm.h:667
ble_gap_init_param_t::conn_timeout
uint16_t conn_timeout
Definition: ble_gapm.h:761
BLE_GAP_WRITE_PERM_AUTH
@ BLE_GAP_WRITE_PERM_AUTH
Definition: ble_gapm.h:176
ble_gap_adv_param_t::adv_intv_max
uint16_t adv_intv_max
Definition: ble_gapm.h:582
ble_gap_ext_adv_param_t
Advertising parameters for extended advertising and periodic advertising.
Definition: ble_gapm.h:627
gap_connless_cte_trans_param_t::antenna_id
uint8_t * antenna_id
Definition: ble_gapm.h:733
ble_gap_evt_dtm_test_end_report_t
Definition: ble_gapm.h:920
ble_gap_evt_sync_established_t::bd_addr
ble_gap_bdaddr_t bd_addr
Definition: ble_gapm.h:901
ble_gap_adv_param_t::adv_intv_min
uint16_t adv_intv_min
Definition: ble_gapm.h:581
BLE_GAP_ADV_PROP_DIRECTED_POS
@ BLE_GAP_ADV_PROP_DIRECTED_POS
Definition: ble_gapm.h:296
ble_gap_ral_dev_info_t::priv_mode
uint8_t priv_mode
Definition: ble_gapm.h:843
ble_gap_whitelist_clear
uint16_t ble_gap_whitelist_clear(void)
Clear all the entries in the current white list.
BLE_GAP_EXT_SCAN_TYPE_GEN_DISC
@ BLE_GAP_EXT_SCAN_TYPE_GEN_DISC
Definition: ble_gapm.h:360
ble_gap_adv_filter_policy_t
ble_gap_adv_filter_policy_t
Advertising filter policy.
Definition: ble_gapm.h:233
ble_gap_scan_param_set
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.
ble_gap_evt_sync_established_t::adv_sid
uint8_t adv_sid
Definition: ble_gapm.h:899
ble_gap_ad_type_t
ble_gap_ad_type_t
GAP advertising types.
Definition: ble_gapm.h:488
ble_gap_reslv_rpa_addr
uint16_t ble_gap_reslv_rpa_addr(uint8_t *p_rpa)
Resolve the rpa address.
ble_gap_ext_adv_param_set
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.
ble_gap_adv_prop_t
ble_gap_adv_prop_t
Advertising properties bit field bit value.
Definition: ble_gapm.h:315
BLE_GAP_AD_TYPE_SPAIR_HASH
@ BLE_GAP_AD_TYPE_SPAIR_HASH
Definition: ble_gapm.h:517
ble_gap_init_param_t::peer_addr
ble_gap_bdaddr_t peer_addr
Definition: ble_gapm.h:754
BLE_GAP_ADV_PROP_CONNECTABLE_BIT
@ BLE_GAP_ADV_PROP_CONNECTABLE_BIT
Definition: ble_gapm.h:316
BLE_GAP_PHY_2MBPS_VALUE
@ BLE_GAP_PHY_2MBPS_VALUE
Definition: ble_gapm.h:274
ble_gap_adv_param_t::filter_pol
uint8_t filter_pol
Definition: ble_gapm.h:579
ble_gap_evt_sync_established_t::intv
uint16_t intv
Definition: ble_gapm.h:898
ble_gap_evt_sync_established_t::sync_hdl
uint16_t sync_hdl
Definition: ble_gapm.h:902
ble_gap_ext_conn_param_t::supervision_to
uint16_t supervision_to
Definition: ble_gapm.h:777
BLE_GAP_ADV_DATA_TYPE_SCAN_RSP
@ BLE_GAP_ADV_DATA_TYPE_SCAN_RSP
Definition: ble_gapm.h:186
ble_gap_adv_report_info_t
ble_gap_adv_report_info_t
Advertising report information.
Definition: ble_gapm.h:252
ble_gap_lepsm_register_t::le_psm
uint16_t le_psm
Definition: ble_gapm.h:805
ble_gap_ext_scan_param_set
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 starte...
ble_gap_init_prop_t
ble_gap_init_prop_t
Initiating properties.
Definition: ble_gapm.h:405
ble_gap_init_param_t::type
uint8_t type
Definition: ble_gapm.h:753
BLE_GAP_SYNC_REP_EN
@ BLE_GAP_SYNC_REP_EN
Definition: ble_gapm.h:450
BLE_GAP_SCAN_OBSERVER_MODE
@ BLE_GAP_SCAN_OBSERVER_MODE
Definition: ble_gapm.h:343
BLE_GAP_AD_TYPE_TK_VALUE
@ BLE_GAP_AD_TYPE_TK_VALUE
Definition: ble_gapm.h:502
ble_gap_tx_power_set
uint16_t ble_gap_tx_power_set(ble_gap_actv_role_t role, uint8_t index, int8_t txpwr_dbm)
Set the tx power.
BLE_GAP_INIT_TYPE_DIRECT_CONN_EST
@ BLE_GAP_INIT_TYPE_DIRECT_CONN_EST
Definition: ble_gapm.h:396
BLE_GAP_WRITE_PERM_SEC_CON
@ BLE_GAP_WRITE_PERM_SEC_CON
Definition: ble_gapm.h:177