ble_gapc.h
Go to the documentation of this file.
1 /**
2 ****************************************************************************************
3 *
4 * @file ble_gapc.h
5 *
6 * @brief BLE GAPC 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 /**
51 * @defgroup BLE_GAPC Generic Access Profile (GAP) Connection Control
52 * @{
53 * @brief Definitions and prototypes for the GAP Connection Control interface.
54 */
55 #ifndef __BLE_GAPC_H__
56 #define __BLE_GAPC_H__
57
58 #include "ble_error.h"
59 #include "gr533x_sys_cfg.h"
60 #include <stdint.h> // Standard Integer
61 #include <string.h>
62 #include <stdbool.h>
63
64 /**
65 * @defgroup BLE_GAPC_DEFINES Defines
66 * @{
67 */
68 #define BLE_GAP_CHNL_MAP_LEN 0x05 /**< The length of channel map. */
69 #define BLE_GAP_FEATS_LEN 0x08 /**< The length of features. */
70 #define BLE_GAP_ADDR_LEN 0x06 /**< The length of address. */
71 #define BLE_GAP_INVALID_CONN_INDEX 0xFF /**< Invalid connection index. */
72
73 /// CTE length (in number of 8us periods)
74 #define BLE_GAP_MIN_CTE_LEN 0x02 /**< The minimum CTE length. */
75 #define BLE_GAP_MAX_CTE_LEN 0x14 /**< The maximum CTE length. */
76
77 /// CTE count
78 #define BLE_GAP_MIN_CTE_CNT 0x01 /**< The minimum CTE count. */
79 #define BLE_GAP_MAX_CTE_CNT 0x10 /**< The maximum CTE count. */
80
81 #define BLE_GAP_MIN_IQ_SAMPLE_NUM 0x09 /**< The minimum IQ sample number. */
82 #define BLE_GAP_MAX_IQ_SAMPLE_NUM 0x52 /**< The maximum IQ sample number. */
83
84 #define BLE_GAP_MAX_GDX_RANGING_CH 20 /**< The maximum GDX Ranging Channel. */
85
86 /** @} */
87
88 /**
89 * @defgroup BLE_SDK_GAP_ENUM Enumerations
90 * @{
91 */
92
93 /** @brief The identity address type */
94 typedef enum
95 {
96 BLE_GAP_ADDR_TYPE_PUBLIC = 0, /**< Public (identity) address.*/
97 BLE_GAP_ADDR_TYPE_RANDOM_STATIC, /**< Random static (identity) address. */
98 } ble_gap_addr_type_t;
99
100 /**
101 * @brief Bit field use to select the preferred TX or RX LE PHY.
102 */
103 typedef enum
104 {
105 /// No preferred PHY
106 BLE_GAP_PHY_ANY = 0x00,
107 /// LE 1M PHY preferred for an active link
108 BLE_GAP_PHY_LE_1MBPS = (1 << 0),
109 /// LE 2M PHY preferred for an active link
110 BLE_GAP_PHY_LE_2MBPS = (1 << 1),
111 /// LE Coded PHY preferred for an active link
112 BLE_GAP_PHY_LE_CODED = (1 << 2),
113 } ble_gap_phy_bit_t;
114
115 /** @brief The phy options */
116 typedef enum
117 {
118 BLE_GAP_PHY_OPT_NO_CODING = 0, /**< The Host has no preferred coding when transmitting on the LE Coded PHY. */
119 BLE_GAP_PHY_OPT_S2_CODING, /**< The Host prefers that S=2 coding be used when transmitting on the LE Coded PHY. */
120 BLE_GAP_PHY_OPT_S8_CODING, /**< The Host prefers that S=8 coding be used when transmitting on the LE Coded PHY. */
121 } ble_gap_phy_options_t;
122
123 /** @brief The operation code used to get connection info */
124 typedef enum
125 {
126 BLE_GAP_GET_CON_RSSI = 0, /**< Get connection RSSI info. */
127 BLE_GAP_GET_CON_CHANNEL_MAP, /**< Get connection channel map. */
128 BLE_GAP_GET_PHY, /**< Get connection PHY. */
129 BLE_GAP_GET_CHAN_SEL_ALGO /**< Get selection algorithm for connection channel. */
130 } ble_gap_get_conn_info_op_t;
131
132 /**@brief The operation code used to get peer device info. */
133 typedef enum
134 {
135 BLE_GAP_GET_PEER_VERSION = 0, /**< Get peer device version info. */
136 BLE_GAP_GET_PEER_FEATURES /**< Get peer device features info. */
137 } ble_gap_get_peer_info_op_t;
138
139 /** @brief Advertising report type. */
140 typedef enum
141 {
142 BLE_GAP_REPORT_TYPE_ADV_EXT = 0, /**< Extended advertising report. */
143 BLE_GAP_REPORT_TYPE_ADV_LEG, /**< Legacy advertising report. */
144 BLE_GAP_REPORT_TYPE_SCAN_RSP_EXT, /**< Extended scan response report. */
145 BLE_GAP_REPORT_TYPE_SCAN_RSP_LEG, /**< Legacy scan response report. */
146 BLE_GAP_REPORT_TYPE_PER_ADV, /**< Periodic advertising report. */
147 } ble_gap_adv_report_type_t;
148
149 /** @brief Advertising report information. */
150 typedef enum
151 {
152 BLE_GAP_REPORT_INFO_COMPLETE_BIT = (1 << 0), /**< Report is complete. */
153 BLE_GAP_REPORT_INFO_CONN_ADV_BIT = (1 << 1), /**< Connectable advertising. */
154 BLE_GAP_REPORT_INFO_SCAN_ADV_BIT = (1 << 2), /**< Scannable advertising. */
155 BLE_GAP_REPORT_INFO_DIR_ADV_BIT = (1 << 3), /**< Directed advertising. */
156 } ble_gap_adv_report_info_t;
157
158 /** @brief Stop reason code. */
159 typedef enum
160 {
161 BLE_GAP_STOPPED_REASON_TIMEOUT = 0, /**< Stop with timeout. */
162 BLE_GAP_STOPPED_REASON_ON_USER, /**< Stop with user stopping it actively. */
163 BLE_GAP_STOPPED_REASON_CONN_EST /**< Stop with connection established. */
164 } ble_gap_stopped_reason_t;
165
166 /** @brief Device role of LL layer type */
167 typedef enum
168 {
169 BLE_GAP_LL_ROLE_MASTER = 0, /**< Master role. */
170 BLE_GAP_LL_ROLE_SLAVE = 1, /**< Slave role. */
171 } ble_gap_ll_role_type_t;
172
173 /**
174 * @brief Operation code used to set param(s).
175 */
176 typedef enum
177 {
178 BLE_GAP_OPCODE_CHNL_MAP_SET, /**< Set Channel Map. */
179 BLE_GAP_OPCODE_WHITELIST_SET, /**< Set white list. */
180 BLE_GAP_OPCODE_PER_ADV_LIST_SET, /**< Set periodic advertising list. */
181 BLE_GAP_OPCODE_PRIVACY_MODE_SET, /**< Set privacy mode for peer device. */
182 } ble_gap_param_set_op_id_t;
183
184 /**
185 * @brief The specified reason for terminating a connection.
186 */
187 typedef enum
188 {
189 BLE_GAP_HCI_AUTHENTICATION_FAILURE = 0x05, /**< Authentication Failure. */
190 BLE_GAP_HCI_REMOTE_USER_TERMINATED_CONNECTION = 0x13, /**< Remote User Terminated Connection. */
191 BLE_GAP_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES = 0x14, /**< Remote Device Terminated Connection due to Low Resources. */
192 BLE_GAP_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF = 0x15, /**< Remote Device Terminated Connection due to Power Off. */
193 BLE_GAP_HCI_UNSUPPORTED_REMOTE_FEATURE = 0x1A, /**< Unsupported Remote Feature. */
194 BLE_GAP_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED = 0X29, /**< Pairing With Unit Key Not Supported. */
195 BLE_GAP_HCI_CONN_INTERVAL_UNACCEPTABLE = 0x3B, /**< Unacceptable Connection Parameters. */
196 } ble_gap_disconn_reason_t;
197
198 /**
199 * @brief Operation code used to read resolvable address.
200 */
201 typedef enum
202 {
203 BLE_GAP_OPCODE_LOCAL_RSLV_ADDR_READ, /**< Local resolvable address operation. */
204 BLE_GAP_OPCODE_PEER_RSLV_ADDR_READ, /**< Peer resolvable address operation. */
205 } ble_gap_rslv_addr_read_op_id_t;
206
207 /**
208 * @brief Operation code used for LEPSM manager.
209 */
210 typedef enum
211 {
212 BLE_GAP_OPCODE_LEPSM_REGISTER, /**< LEPSM register operation. */
213 BLE_GAP_OPCODE_LEPSM_UNREGISTER, /**< LEPSM unregister operation. */
214 } ble_gap_psm_manager_op_id_t;
215
216 /** @brief GAP Device inforamtion write indication. */
217 typedef enum
218 {
219 BLE_GAPC_DEV_NAME, /* Device name type*/
220 BLE_GAPC_DEV_APPEARANCE, /* Device Appearance Icon type*/
221 } ble_gap_dev_info_type_t;
222
223 /**
224 * @brief Type of constant tone extension.
225 */
226 typedef enum
227 {
228 BLE_GAP_CTE_TYPE_AOA = 0x01 << 0, /**< Allow AoA Constant Tone Extension Response. */
229 BLE_GAP_CTE_TYPE_AOD_1US = 0x01 << 1, /**< Allow AoD Constant Tone Extension Response with 1us slots. */
230 BLE_GAP_CTE_TYPE_AOD_2US = 0x01 << 2, /**< Allow AoD Constant Tone Extension Response with 2us slots. */
231 } ble_gap_cte_type_t;
232
233 /**
234 * @brief Type of switching and sampling slots
235 */
236 typedef enum
237 {
238 BLE_GAP_SLOT_1US = 0x01, /**< Switching and sampling slots are 1us each. */
239 BLE_GAP_SLOT_2US, /**< Switching and sampling slots are 2us each. */
240 } ble_gap_switching_sampling_type_t;
241
242 /**
243 * @brief Status of IQ report packet
244 */
245 typedef enum
246 {
247 BLE_GAP_CRC_OK, /**< CRC was correct. */
248 BLE_GAP_CRC_ERR1, /**< CRC was incorrect and the Length and CTETime fields of the packet were used to determine sampling points. */
249 BLE_GAP_CRC_ERR2, /**< CRC was incorrect but the Controller has determined the position and length of the Constant Tone Extension in some other way. */
250 BLE_GAP_INSUFFI_RESOURCE = 0xFF /**< Insufficient resources to sample (data_channel_idx, cte_type, and slot_dur invalid). */
251 } ble_gap_iq_report_status_t;
252
253 /**
254 * @brief Phy for power control management
255 */
256 typedef enum
257 {
258 BLE_GAP_PHY_1M = 0x01, /**< LE 1M PHY. */
259 BLE_GAP_PHY_2M = 0x02, /**< LE 2M PHY. */
260 BLE_GAP_PHY_CODED = 0x03, /**< LE Coded PHY, used for BLE_GAPC_EVT_PHY_UPDATED. */
261 BLE_GAP_PHY_CODED_S8 = 0x03, /**< LE Coded PHY with S=8 data coding. */
262 BLE_GAP_PHY_CODED_S2 = 0x04 /**< LE Coded PHY with S=2 data coding. */
263 } ble_gap_phy_type_t;
264
265 /**
266 * @brief Transmit power change reporting reason.
267 */
268 typedef enum
269 {
270 BLE_GAP_PWR_LOCAL_TX_CHG = 0x00, /**< Local transmit power changed. */
271 BLE_GAP_PWR_REMOTE_TX_CHG = 0x01, /**< Remote transmit power changed. */
272 } ble_gap_tx_pwr_change_report_reason_t;
273
274 /**
275 * @brief Transmit Power level flag.
276 */
277 typedef enum
278 {
279 BLE_GAP_PWR_MID_LVL = 0x00, /**< Transmit power level is between minimum and max level. */
280 BLE_GAP_PWR_MIN_LVL = 0x01, /**< Transmit power level is at minimum level. */
281 BLE_GAP_PWR_MAX_LVL = 0x02 /**< Transmit power level is at maximum level. */
282 } ble_gap_pwr_lvl_flag_t;
283
284 /// Path Loss zones. HCI:7.8.118
285 typedef enum
286 {
287 BLE_GAP_PATH_LOSS_LOW = 0x00, /**< Entered Low zone. */
288 BLE_GAP_PATH_LOSS_MID = 0x01, /**< Entered Middle zone. */
289 BLE_GAP_PATH_LOSS_HIGH = 0x02, /**< Entered High zone. */
290 } ble_gap_path_loss_zone_t;
291
292 /** @} */
293
294
295 /**
296 * @defgroup BLE_GAPC_STRUCT Structures
297 * @{
298 */
299
300 /** @brief The struct of device version. */
301 typedef struct
302 {
303 uint8_t hci_ver; /**< HCI version. */
304 uint8_t lmp_ver; /**< LMP version. */
305 uint8_t host_ver; /**< Host version. */
306 uint16_t hci_subver; /**< HCI subversion. */
307 uint16_t lmp_subver; /**< LMP subversion. */
308 uint16_t host_subver; /**< Host subversion. */
309 uint16_t manuf_name; /**< Manufacturer name. */
310 } ble_gap_dev_version_ind_t;
311
312 /** @brief The struct of address. */
313 typedef struct
314 {
315 uint8_t addr[BLE_GAP_ADDR_LEN]; /**< 6-byte array address value. */
316 } ble_gap_addr_t;
317
318 /** @brief The struct of broadcast address with broadcast type. */
319 typedef struct
320 {
321 ble_gap_addr_t gap_addr; /**< Device BD Address. */
322 uint8_t addr_type; /**< Address type of the device: 0=public/1=random. please @ref ble_gap_addr_type_t. */
323 } ble_gap_bdaddr_t;
324
325 /** @brief Get broadcast address struct. */
326 typedef struct
327 {
328 uint8_t index; /**< Advertsing index. The valid range is: 0 - 4. */
329 ble_gap_bdaddr_t bd_addr; /**< BD address. */
330 } ble_gap_get_bd_addr_t;
331
332 /** @brief TX power info struct. */
333 typedef struct
334 {
335 int8_t power_lvl; /**< Advertising channel TX power level. Range: -20 to 10. Unit: dBm. Accuracy: +/-4dB. */
336 } ble_gap_dev_adv_tx_power_t;
337
338 /** @brief TX power info struct. */
339 typedef struct
340 {
341 int8_t min_tx_pwr; /**< MIN of TX power. Size: 1 octet (signed integer). Range: -127 to +126. Unit: dBm. */
342 int8_t max_tx_pwr; /**< MAX of TX power. Size: 1 octet (signed integer). Range: -127 to +126. Unit: dBm. */
343 } ble_gap_dev_tx_power_t;
344
345 /** @brief Max data length info struct. */
346 typedef struct
347 {
348 uint16_t suppted_max_tx_octets; /**< Maximum number of payload octets that the local Controller supports for transmission of a single Link Layer packet on a data connection.
349 Range: 0x001B-0x00FB (all other values reserved for future use). */
350 uint16_t suppted_max_tx_time; /**< Maximum time, in microseconds, that the local Controller supports for transmission of a single Link Layer packet on a data connection.
351 Range: 0x0148-0x4290 (all other values reserved for future use). */
352 uint16_t suppted_max_rx_octets; /**< Maximum number of payload octets that the local Controller supports for reception of a single Link Layer packet on a data connection.
353 Range: 0x001B-0x00FB (all other values reserved for future use). */
354 uint16_t suppted_max_rx_time; /**< Maximum time, in microseconds, that the local Controller supports for reception of a single Link Layer packet on a data connection.
355 Range: 0x0148-0x4290 (all other values reserved for future use). */
356 } ble_gap_max_data_len_t;
357
358 /** @brief Suggested default data length info. */
359 typedef struct
360 {
361 uint16_t suggted_max_tx_octets; /**< The Host's suggested value for the Controller's maximum transmitted number of payload octets to be used for new connections.
362 Range: 0x001B-0x00FB (all other values reserved for future use), default: 0x001B */
363 uint16_t suggted_max_tx_time; /**< The Host's suggested value for the Controller's maximum packet transmission time to be used for new connections.
364 Range: 0x0148-0x4290 (all other values reserved for future use), default: 0x0148*/
365 } ble_gap_sugg_dflt_data_len_t;
366
367 /** @brief Number of available advertising sets info. */
368 typedef struct
369 {
370 uint8_t nb_adv_sets; /**< Number of available advertising sets. */
371 } ble_gap_nb_adv_sets_t;
372
373 /** @brief Maximum advertising data length info. */
374 typedef struct
375 {
376 uint16_t length; /**< Maximum advertising data length supported by controller. */
377 } ble_gap_max_adv_data_len_ind_t;
378
379 /** @brief RF path compensation values info. */
380 typedef struct
381 {
382 uint16_t tx_path_comp; /**< RF TX path compensation. */
383 uint16_t rx_path_comp; /**< RF RX path compensation. */
384 } ble_gap_dev_rf_path_comp_ind_t;
385
386 /** @brief antenna information. */
387 typedef struct
388 {
389 uint8_t supp_switching_sampl_rates; /**< Supported switching sampling rates bit field (@see enum gap_switch_sampling_rate). */
390 uint8_t antennae_num; /**< Number of antennae, range 0x01 to 0x4B. */
391 uint8_t max_switching_pattern_len; /**< Max length of switching pattern (number of antenna IDs in the pattern), range 0x02 to 0x4B. */
392 uint8_t max_cte_len; /**< Max CTE length, range 0x02 to 0x14. */
393 } ble_gap_antenna_inf_t;
394
395 /** @brief Device info. */
396 typedef union
397 {
398 ble_gap_dev_version_ind_t dev_version; /**< Version info. */
399 ble_gap_get_bd_addr_t get_bd_addr; /**< Device BD address info. */
400 ble_gap_dev_adv_tx_power_t adv_tx_power; /**< Advertising TX power info. */
401 ble_gap_sugg_dflt_data_len_t sugg_dflt_data_len; /**< Suggested default data length info. */
402 ble_gap_max_data_len_t max_data_len; /**< Suggested MAX data length info. */
403 ble_gap_nb_adv_sets_t nb_adv_sets; /**< Number of available advertising sets. */
404 ble_gap_max_adv_data_len_ind_t max_adv_data_len; /**< Maximum advertising data length info. */
405 ble_gap_dev_tx_power_t dev_tx_power; /**< Device TX power info. */
406 ble_gap_dev_rf_path_comp_ind_t dev_rf_path_comp; /**< RF path compensation values. */
407 ble_gap_antenna_inf_t dev_antenna_inf; /**< Device antenna information. */
408 } ble_gap_dev_info_t;
409
410 /** @brief Get device info operation struct. */
411 typedef struct
412 {
413 uint8_t operation; /**< Operation code. @see enum gap_dev_info_get_type_t. */
414 ble_gap_dev_info_t dev_info; /**< Device info. */
415 } ble_gap_dev_info_get_t;
416
417 /** @brief Read resolvable address info struct. */
418 typedef struct
419 {
420 uint8_t op_code; /**< Operation code. @see enum gap_rslv_addr_read_op_id_t. */
421 ble_gap_addr_t gap_addr; /**< Resolvable address info. */
422 } ble_gap_rslv_addr_read_t;
423
424 /** @brief Sync established indication. */
425 typedef struct
426 {
427 uint8_t phy; /**< PHY on which synchronization has been established. @see gap_phy_type. */
428 uint16_t intv; /**< Periodic advertising interval (in unit of 1.25ms, min is 7.5ms). */
429 uint8_t adv_sid; /**< Advertising SID. */
430 uint8_t clk_acc; /**< Advertiser clock accuracy. @see enum gapm_clk_acc. */
431 ble_gap_bdaddr_t bd_addr; /**< Advertiser address. */
432 uint16_t sync_hdl; /**< Sync handle. */
433 uint16_t serv_data; /**< Service data. */
434 bool report_flag; /**< Report Flag. */
435 } ble_gap_sync_established_ind_t;
436
437
438 /** @brief APP receives the extended advertising report indication info struct. */
439 typedef struct
440 {
441 uint8_t adv_type; /**< Advertising type. @see enum gap_adv_report_type_t. */
442 uint8_t adv_info; /**< Bit field providing information about the received report. @see enum gap_adv_report_info_t. */
443 ble_gap_bdaddr_t broadcaster_addr; /**< Broadcaster device address. */
444 ble_gap_bdaddr_t direct_addr; /**< Target address (in case of a directed advertising report). */
445 int8_t tx_pwr; /**< TX power (in dBm). */
446 int8_t rssi; /**< RSSI (between -127 and +20 dBm). */
447 uint8_t phy_prim; /**< Primary PHY on which advertising report has been received. */
448 uint8_t phy_second; /**< Secondary PHY on which advertising report has been received. */
449 uint8_t adv_sid; /**< Advertising SID , valid only for periodic advertising report. */
450 uint16_t period_adv_intv; /**< Periodic advertising interval (in unit of 1.25ms, min is 7.5ms), valid only for periodic advertising report. */
451 uint8_t per_sync_idx; /**< Periodic syncronization index, valid only for periodic advertising report. */
452 uint16_t length; /**< Report length. */
453 uint8_t data[__ARRAY_EMPTY]; /**< Report. */
454 } ble_gap_ext_adv_report_ind_t;
455
456 /** @brief Name of peer device indication. */
457 typedef struct
458 {
459 ble_gap_addr_t peer_addr; /**< Peer device bd address. */
460 uint8_t addr_type; /**< Peer device address type. */
461 uint8_t name_len; /**< Peer device name length. */
462 uint8_t name[__ARRAY_EMPTY]; /**< Peer device name. */
463 } ble_gap_peer_name_ind_t;
464
465 /** @brief Connection parameter used to update connection parameters. */
466 typedef struct
467 {
468 uint16_t interval; /**< Connection interval. Range: 0x0006 to 0x0C80. Unit: 1.25 ms. Time range: 7.5 ms to 4 s. */
469 uint16_t latency; /**< Latency for the connection in number of connection events. Range: 0x0000 to 0x01F3. */
470 uint16_t sup_timeout; /**< Supervision timeout for the LE link. Range: 0x000A to 0x0C80, unit: 10 ms, time range: 100 ms to 32 s. */
471 } ble_gap_conn_update_cmp_t;
472
473 /** @brief The parameter of connection. */
474 typedef struct
475 {
476 uint16_t interval_min; /**< Minimum value for the connection interval. This shall be less than or equal to Conn_Interval_Max.
477 Range: 0x0006 to 0x0C80, unit: 1.25 ms, time range: 7.5 ms to 4 s*/
478 uint16_t interval_max; /**< Maximum value for the connection interval. This shall be greater than or equal to Conn_Interval_Min.
479 Range: 0x0006 to 0x0C80, unit: 1.25 ms, time range: 7.5 ms to 4 s.*/
480 uint16_t slave_latency; /**< Slave latency for the connection in number of connection events. Range: 0x0000 to 0x01F3. */
481 uint16_t sup_timeout; /**< Supervision timeout for the LE link. Range: 0x000A to 0x0C80, unit: 10 ms, time range: 100 ms to 32 s. */
482 } ble_gap_conn_param_t;
483
484
485 /** @brief The parameter of update connection. */
486 typedef struct
487 {
488 uint16_t interval_min; /**< Minimum value for the connection interval. This shall be less than or equal to Conn_Interval_Max.
489 Range: 0x0006 to 0x0C80, unit: 1.25 ms, time range: 7.5 ms to 4 s*/
490 uint16_t interval_max; /**< Maximum value for the connection interval. This shall be greater than or equal to Conn_Interval_Min.
491 Range: 0x0006 to 0x0C80, unit: 1.25 ms, time range: 7.5 ms to 4 s.*/
492 uint16_t slave_latency; /**< Slave latency for the connection in number of connection events. Range: 0x0000 to 0x01F3. */
493 uint16_t sup_timeout; /**< Supervision timeout for the LE link. range: 0x000A to 0x0C80, unit: 10 ms, Time range: 100 ms to 32 s. */
494 uint16_t ce_len; /**< The 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.
495 recommended value: 0x0002 for 1M phy, 0x0006 for coded phy*/
496 } ble_gap_conn_update_param_t;
497
498 /** @brief Connection complete info. */
499 typedef struct
500 {
501 uint16_t conhdl; /**< Connection_Handle. Range: 0x0000-0x0EFF (all other values reserved for future use). */
502 uint16_t con_interval; /**< Connection interval. Range: 0x0006 to 0x0C80, unit: 1.25 ms, time range: 7.5 ms to 4 s. */
503 uint16_t con_latency; /**< Latency for the connection in number of connection events. Range: 0x0000 to 0x01F3. */
504 uint16_t sup_to; /**< Connection supervision timeout. Range: 0x000A to 0x0C80, unit: 10 ms, time range: 100 ms to 32 s. */
505 uint8_t clk_accuracy; /**< Clock accuracy (0x00: 500 ppm, 0x01: 250 ppm, 0x02: 150 ppm, 0x03: 100 ppm, 0x04: 75 ppm,
506 0x05:50 ppm, 0x06:30 ppm, 0x07:20 ppm, others: reserved for future use). */
507 uint8_t peer_addr_type; /**< Peer address type(0x00: Public Device Address, 0x01 : Random Device Address, others: reserved for future use). */
508 ble_gap_addr_t peer_addr; /**< Peer BT address. */
509 ble_gap_ll_role_type_t ll_role; /**< Device Role of LL Layer. */
510 } gap_conn_cmp_t;
511
512 /** @brief Channel map structure. */
513 typedef struct
514 {
515 uint8_t map[BLE_GAP_CHNL_MAP_LEN]; /**< This parameter contains 37 1-bit fields. The nth bit (n is in the range of 0 to 36) contains the value for the link layer channel index n.
516 Channel n is unused = 0, channel n is used = 1. The most significant bits are reserved for future use.*/
517 } ble_gap_chnl_map_t;
518
519 /** @brief PHY info. */
520 typedef struct
521 {
522 uint8_t tx_phy; /**< LE PHY for data transmission. @see ble_gap_phy_type_t. */
523 uint8_t rx_phy; /**< LE PHY for data reception. @see ble_gap_phy_type_t. */
524 } ble_gap_le_phy_ind_t;
525
526 /** @brief Connection info. */
527 typedef union
528 {
529 int8_t rssi; /**< RSSI. */
530 ble_gap_chnl_map_t chnl_map; /**< channel map. */
531 ble_gap_le_phy_ind_t phy; /**< PHY indicaiton. */
532 uint8_t chan_sel_algo; /**< Chanel Selection algorithm, 0x00: LE Channel Selection Algorithm #1 is used.
533 0x01: LE Channel Selection Algorithm #2 is used.\n 0x02-0xFF: reserved. */
534 } ble_gap_conn_info_t;
535
536 /** @brief The info of connecting operation. */
537 typedef struct
538 {
539 uint8_t opcode; /**< Operation code. See @ref ble_gap_get_conn_info_op_t. */
540 ble_gap_conn_info_t info; /**< Connection info. */
541 } ble_gap_conn_info_param_t;
542
543 /** @brief Peer version info. */
544 typedef struct
545 {
546 uint16_t compid; /**<Manufacturer name. */
547 uint16_t lmp_subvers; /**< LMP subversion. */
548 uint8_t lmp_vers; /**< LMP version. */
549 } ble_gap_peer_version_ind_t;
550
551
552 /** @brief LE features info. */
553 typedef struct
554 {
555 uint8_t features[BLE_GAP_FEATS_LEN]; /**< 8-byte array for LE features\n
556 Feature Setting field's bit mapping to Controller Features (0: not support, 1: support) \n
557 |Bit position | Link Layer Feature|
558 |-------------|-----------------|
559 |0 | LE Encryption|
560 |1 |Connection Parameters Request Procedure|
561 |2 |Extended Reject Indication|
562 |3 | Slave-initiated Features Exchange |
563 |4 |LE Ping |
564 |5 |LE Data Packet Length Extension |
565 |6 |LL Privacy |
566 |7 |Extended Scanner Filter Policies |
567 |8 |LE 2M PHY|
568 |9 | Stable Modulation Index - Transmitter |
569 |10 | Stable Modulation Index - Receiver |
570 |11 |LE Coded PHY |
571 |12 |LE Extended Advertising|
572 |13 | LE Periodic Advertising|
573 |14 | Channel Selection Algorithm #2|
574 |15 |LE Power Class 1|
575 |16 |Minimum Number of Used Channels Procedure|
576 |17 |Connection CTE Request|
577 |18 |Connection CTE Response|
578 |19 |Connectionless CTE Transmitter|
579 |20 |Connectionless CTE Receiver|
580 |21 |Antenna Switching During CTE Transmission(AoD)|
581 |22 |Antenna Switching During CTE Reception(AoA)|
582 |23 |Receiving Constant Tone Extensions|
583 |24 |Periodic Advertising Sync Transfer - Sender|
584 |25 |Periodic Advertising Sync Transfer - Recipient|
585 |26 |Sleep Clock Accuracy Updates|
586 |27 |Remote Public Key Validation|
587 |33 |LE Power Control Request|
588 |34 |LE Power Change Indication|
589 |35 |LE Path Loss Monitoring|
590
591 |All other values |Reserved for Future Use|*/
592 } ble_gap_peer_features_ind_t;
593
594 /** @brief LE peer info. */
595 typedef union
596 {
597 ble_gap_peer_version_ind_t peer_version; /**< Version info. */
598 ble_gap_peer_features_ind_t peer_features; /**< Features info. */
599 } ble_gap_peer_info_t;
600
601 /** @brief Get peer info operation struct. */
602 typedef struct
603 {
604 uint8_t opcode; /**< Operation code. See @ref ble_gap_get_peer_info_op_t. */
605 ble_gap_peer_info_t peer_info; /**< Peer info. */
606 } ble_gap_peer_info_param_t;
607
608 /** @brief Supported data length size Indication. */
609 typedef struct
610 {
611 uint16_t max_tx_octets; /**< The maximum number of payload octets in TX. */
612 uint16_t max_tx_time; /**< The maximum time that the local Controller will take to TX. */
613 uint16_t max_rx_octets; /**< The maximum number of payload octets in RX. */
614 uint16_t max_rx_time; /**< The maximum time that the local Controller will take to RX. */
615 } ble_gap_le_pkt_size_ind_t;
616
617 /**@brief The Structure for BLE Connection Arrangement. */
618 typedef struct
619 {
620 uint16_t conn_idx; /**< Connection Index. */
621 uint32_t interval; /**< Connection Interval (in 312.5 us). */
622 uint32_t offset; /**< Connection Offset (in 312.5 us). */
623 uint32_t duration; /**< Connection Duration (in 312.5 us). */
624 } ble_gap_con_plan_tag_t;
625
626 /** @brief Set preference slave event duration */
627 typedef struct
628 {
629 uint16_t duration; /**< Preferred event duration. */
630 uint8_t single_tx; /**< Slave transmits a single packet per connection event (False/True). */
631 } ble_gap_set_pref_slave_evt_dur_param_t;
632
633 /** @brief GAP Device name struct. */
634 typedef struct
635 {
636 uint16_t length; /**< Device name length. */
637 uint8_t value[__ARRAY_EMPTY]; /**< Device name data. */
638 } ble_gap_dev_name_ind_t;
639
640 /** @brief Device information data struct. */
641 typedef union
642 {
643 ble_gap_dev_name_ind_t dev_name; /**< Device name. see @ref ble_gap_dev_name_ind_t. */
644 uint16_t appearance; /**< Device appearance */
645 } ble_gapc_set_dev_info_t;
646
647
648 /** @brief GAP Device inforamtion write indication. */
649 typedef struct
650 {
651 ble_gap_dev_info_type_t info_type; /**< Device info type. see @ref ble_gap_dev_info_type_t. */
652 ble_gapc_set_dev_info_t info; /**< Device info data. see @ref ble_gap_cte_type_t. */
653 } gapc_set_dev_info_ind_t;
654
655 /**
656 * @brief Default periodic advertising synchronization transfer parameters
657 */
658 typedef struct
659 {
660 uint8_t mode; /**< @see gap_per_adv_sync_info_rec_mode. */
661 uint16_t skip; /**< Number of periodic advertising that can be skipped after a successful receive.
662 Maximum authorized value is 499. */
663 uint16_t sync_to; /**< Synchronization timeout for the periodic advertising (in unit of 10 ms between 100 ms and 163.84s). */
664 uint8_t cte_type; /**< Type of Constant Tone Extension device should sync on (@see enum gap_sync_cte_type). */
665 } ble_gap_per_sync_trans_param_t;
666
667 /**
668 * @brief Connectionless IQ Report info
669 */
670 typedef struct
671 {
672 uint8_t channel_idx; /**< The index of the channel on which the packet was received, range 0x00 to 0x24. */
673 int16_t rssi; /**< RSSI units: 0.1 dBm, range -1270 to +200. */
674 uint8_t rssi_antenna_id; /**< RSSI antenna ID. */
675 uint8_t cte_type; /**< CTE type (0: GAP_CET_AOA | 1: GAP_CET_AOD_1US | 2: GAP_CET_AOD_2US), @see enum ble_gap_cte_type_t. */
676 uint8_t slot_dur; /**< Slot durations (1: GAP_SLOT_1US | 2: GAP_SLOT_2US), see @ref ble_gap_switching_sampling_type_t. */
677 uint8_t pkt_status; /**< Packet status, @see enum ble_gap_iq_report_status_t. */
678 uint16_t pa_evt_cnt; /**< Periodic advertising event counter. */
679 uint8_t nb_samples; /**< Number of samples. 0x00: no samples provided (only permitted if pkt_status is 0xFF),
680 0x09 to 0x52: total number of sample pairs. */
681 int8_t i_sample[BLE_GAP_MAX_IQ_SAMPLE_NUM]; /**< The list of i samples for the reported PDU. */
682 int8_t q_sample[BLE_GAP_MAX_IQ_SAMPLE_NUM]; /**< The list of q samples for the reported PDU. */
683 } ble_gap_connless_iq_report_t;
684
685 /** @brief Set connection CTE transmit parameters info. */
686 typedef struct
687 {
688 uint8_t cte_type; /**< The type of cte, see @ref ble_gap_cte_type_t. */
689 uint8_t num_antenna; /**< The number of Antenna IDs in the pattern, range 0x02 to 0x4B. */
690 uint8_t *antenna_id; /**< List of Antenna IDs in the pattern. */
691 } ble_gap_set_conn_cte_trans_param_t;
692
693 /** @brief Set connection CTE receive parameters info. */
694 typedef struct
695 {
696 bool sampling_enable; /**< Wheter to sample IQ from the CTE. */
697 uint8_t slot_durations; /**< The slot for sample IQ from the CTE, see @ref ble_gap_switching_sampling_type_t. */
698 uint8_t num_antenna; /**< The number of Antenna IDs in the pattern, range 0x02 to 0x4B. */
699 uint8_t *antenna_id; /**< List of Antenna IDs in the pattern. */
700 } ble_gap_set_conn_cte_rcv_param_t;
701
702 /** @brief Set connection CTE Request enable info. */
703 typedef struct
704 {
705 uint16_t cte_req_interval; /**< Defines whether the cte request procedure is initiated only once or periodically.
706 0x0000: initiate the Constant Tone Extension Request procedure once.
707 0x0001 to 0xFFFF: requested interval for initiating the cte request procedure in number of connection events. */
708 uint8_t cte_req_len; /**< Minimum length of the cte being requested in 8us units, range 0x02 to 0x14. */
709 uint8_t cte_req_type; /**< The type for requested cte, see @ref ble_gap_cte_type_t. */
710 } ble_gap_set_conn_cte_req_enable_t;
711
712 /** @brief Connection IQ Report info. */
713 typedef struct
714 {
715 uint8_t rx_phy; /**< Rx PHY (0x01: 1M | 0x02: 2M), see @ref ble_gap_phy_type_t. */
716 uint8_t data_channel_idx; /**< Data channel index, range 0x00 to 0x24. */
717 int16_t rssi; /**< RSSI units: 0.1 dBm, range -1270 to +200. */
718 uint8_t rssi_antenna_id; /**< RSSI antenna ID. */
719 uint8_t cte_type; /**< CTE type (0: GAP_CET_AOA | 1: GAP_CET_AOD_1US | 2: GAP_CET_AOD_2US), @see enum ble_gap_cte_type_t. */
720 uint8_t slot_dur; /**< Slot durations (1: GAP_SLOT_1US | 2: GAP_SLOT_2US), see @ref ble_gap_switching_sampling_type_t. */
721 uint8_t pkt_status; /**< Packet status, @see enum ble_gap_iq_report_status_t. */
722 uint16_t con_evt_cnt; /**< Connection event counter. */
723 uint8_t nb_samples; /**< Number of samples. 0x00: no samples provided (only permitted if pkt_status is 0xFF),
724 0x09 to 0x52: total number of sample pairs. */
725 int8_t i_sample[BLE_GAP_MAX_IQ_SAMPLE_NUM]; /**< The list of i samples for the reported PDU. */
726 int8_t q_sample[BLE_GAP_MAX_IQ_SAMPLE_NUM]; /**< The list of q samples for the reported PDU. */
727 } ble_gap_conn_iq_report_t;
728
729 /** @brief Set path loss reporting parameter info. */
730 typedef struct
731 {
732 uint8_t high_thr; /**< High threshold for the path loss (dB). */
733 uint8_t high_hyst; /**< Hysteresis value for the high threshold (dB). */
734 uint8_t low_thr; /**< Low threshold for the path loss (dB). */
735 uint8_t low_hyst; /**< Hysteresis value for the low threshold (dB). */
736 uint16_t min_conn_evt_num; /**< Minimum time in number of connection events to be observed. */
737 } ble_gap_set_path_loss_report_param_t;
738
739 /** @brief Transmit power change reporting info. */
740 typedef struct
741 {
742 uint8_t reason; /**< Reason see @ref ble_gap_tx_pwr_change_report_reason_t. */
743 uint8_t phy; /**< Phy see @ref ble_gap_phy_type_t. */
744 int8_t tx_pwr; /**< Transmit Power level (dBm). */
745 uint8_t flags; /**< Transmit Power level flags, see @ref ble_gap_pwr_lvl_flag_t. */
746 int8_t delta; /**< Change in transmit power level (dBm). */
747 } ble_gap_tx_pwr_change_report_t;
748
749 /** @brief Path loss threshold reporting info. */
750 typedef struct
751 {
752 uint8_t curr_path_loss; /**< Current path loss (dB). */
753 uint8_t zone_entered; /**< Zone entered, see @ref ble_gap_path_loss_zone_t. */
754 } ble_gap_path_loss_threshold_report_t;
755
756 /** @brief Local transmit power read indication info. */
757 typedef struct
758 {
759 uint8_t phy; /**< Phy see @ref ble_gap_phy_type_t. */
760 int8_t curr_tx_pwr_lvl; /**< Current transmit power level (dBm). */
761 int8_t max_tx_pwr_lvl; /**< Max transmit power level (dBm). */
762 } ble_gap_local_tx_pwr_read_ind_t;
763
764 /** @brief Remote transmit power read indication info. */
765 typedef struct
766 {
767 uint8_t phy; /**< Phy see @ref ble_gap_phy_type_t. */
768 int8_t tx_pwr; /**< Transmit Power level (dBm). */
769 uint8_t flags; /**< Transmit Power level flags, see @ref ble_gap_pwr_lvl_flag_t. */
770 } ble_gap_remote_tx_pwr_read_ind_t;
771
772 /** @brief ranging parameter. */
773 typedef struct
774 {
775 uint8_t channel_sequence[BLE_GAP_MAX_GDX_RANGING_CH]; /**< Ranging channel sequence. */
776 uint8_t channel_num; /**< Number of channel to be collected. */
777 } ble_gap_ranging_param_t;
778
779 /** @brief ranging indication info. */
780 typedef struct
781 {
782 uint8_t status; /**< Ranging status. */
783 } ble_gap_ranging_ind_t;
784
785 /** @brief ranging sample report info. */
786 typedef struct
787 {
788 uint8_t status; /**< Status of ranging sample proc. */
789 uint16_t nb_sample; /**< Sample number. */
790 int32_t iq_sample_addr; /**< Sample address. */
791 } ble_gap_ranging_sample_report_ind_t;
792
793 /** @brief ranging complete info. */
794 typedef struct
795 {
796 uint8_t status; /**< indicate ranging complete status. */
797 } ble_gap_ranging_cmp_ind_t;
798
799 /** @brief Default Subrate command param. */
800 typedef struct
801 {
802 uint16_t subrate_min; /**< Minimum subrate factor allowed in requests by a Peripheral(Range: 0x0001 - 0x01F4, Default: 0x0001). */
803 uint16_t subrate_max; /**< Maximum subrate factor allowed in requests by a Peripheral(Range: 0x0001 - 0x01F4, Default: 0x0001). */
804 uint16_t max_latency; /**< Maximum Peripheral latency allowed in requests by a Peripheral. */
805 uint16_t continuation_num; /**< Minimum number of underlying connection events to remain active. */
806 uint16_t superv_timeout; /**< Maximum supervision timeout allowed in requests by a Peripheral. */
807 } ble_gap_dft_subrate_param_t;
808
809 /** @brief Subrate Request command param. */
810 typedef struct
811 {
812 uint16_t subrate_min; /**< Minimum subrate factor allowed in requests by a Peripheral(Range: 0x0001 - 0x01F4, Default: 0x0001). */
813 uint16_t subrate_max; /**< Maximum subrate factor allowed in requests by a Peripheral(Range: 0x0001 - 0x01F4, Default: 0x0001). */
814 uint16_t max_latency; /**< Maximum Peripheral latency allowed in requests by a Peripheral. */
815 uint16_t continuation_num; /**< Minimum number of underlying connection events to remain active. */
816 uint16_t superv_timeout; /**< Maximum supervision timeout allowed in requests by a Peripheral. */
817 } ble_gap_subrate_req_t;
818
819 /** @brief Subrate change indication. */
820 typedef struct
821 {
822 uint16_t subrate_factor; /**< subrate factor value. */
823 uint16_t con_latency; /**< Connection latency value. */
824 uint16_t continuation_number; /**< Connection continuation number value. */
825 uint16_t supervision_timeout; /**< Connection supervision timeout value. */
826 } ble_gap_subrate_chg_ind_t;
827
828 /**@brief PHY update event for @ref BLE_GAPC_EVT_PHY_UPDATED. */
829 typedef struct
830 {
831 uint8_t tx_phy; /**< LE PHY for data transmission. (0x00:1M, 0x01:2M, 0x03:coded) @ref ble_gap_phy_type_t. */
832 uint8_t rx_phy; /**< LE PHY for data reception. (0x00:1M, 0x01:2M, 0x03:coded) @ref ble_gap_phy_type_t. */
833 } ble_gap_evt_phy_update_t;
834
835 /** @brief Connection complete event for @ref BLE_GAPC_EVT_CONNECTED. */
836 typedef struct
837 {
838 uint16_t conn_handle; /**< Connection_Handle. Range: 0x0000-0x0EFF (all other values reserved for future use). */
839 uint16_t conn_interval; /**< Connection interval. Range: 0x0006 to 0x0C80, unit: 1.25 ms, time range: 7.5 ms to 4 s. */
840 uint16_t slave_latency; /**< Latency for the connection in number of connection events. Range: 0x0000 to 0x01F3. */
841 uint16_t sup_timeout; /**< Connection supervision timeout. Range: 0x000A to 0x0C80, unit: 10 ms, time range: 100 ms to 32 s. */
842 uint8_t clk_accuracy; /**< Clock accuracy (0x00: 500 ppm, 0x01: 250 ppm, 0x02: 150 ppm, 0x03: 100 ppm, 0x04: 75 ppm, 0x05:50 ppm, 0x06:30 ppm, 0x07:20 ppm, others: reserved for future use). */
843 uint8_t peer_addr_type; /**< Peer address type(0x00: Public Device Address, 0x01 : Random Device Address, others: reserved for future use). */
844 ble_gap_addr_t peer_addr; /**< Peer BT address. */
845 ble_gap_ll_role_type_t ll_role; /**< Device Role of LL Layer. */
846 } ble_gap_evt_connected_t;
847
848 /**@brief Disconnection event for @ref BLE_GAPC_EVT_DISCONNECTED. */
849 typedef struct
850 {
851 uint8_t reason; /**< Hci error code. */
852 } ble_gap_evt_disconnected_t;
853
854 /** @brief Name of peer device indication event for @ref BLE_GAPC_EVT_PEER_NAME_GOT. */
855 typedef struct
856 {
857 ble_gap_addr_t peer_addr; /**< Peer device bd address. */
858 uint8_t addr_type; /**< Peer device address type. */
859 uint8_t name_len; /**< Peer device name length. */
860 uint8_t *name; /**< Peer device name. */
861 } ble_gap_evt_peer_name_get_t;
862
863 /** @brief Get peer info event for @ref BLE_GAPC_EVT_PEER_INFO_GOT. */
864 typedef struct
865 {
866 uint8_t opcode; /**< Operation code. See @ref ble_gap_get_peer_info_op_t. */
867 ble_gap_peer_info_t peer_info; /**< Peer info. */
868 } ble_gap_evt_peer_info_t;
869
870 /** @brief Connection parameter updated event for @ref BLE_GAPC_EVT_CONN_PARAM_UPDATED. */
871 typedef struct
872 {
873 uint16_t conn_interval; /**< Connection interval. Range: 0x0006 to 0x0C80. Unit: 1.25 ms. Time range: 7.5 ms to 4 s. */
874 uint16_t slave_latency; /**< Latency for the connection in number of connection events. Range: 0x0000 to 0x01F3. */
875 uint16_t sup_timeout; /**< Supervision timeout for the LE link. Range: 0x000A to 0x0C80, unit: 10 ms, time range: 100 ms to 32 s. */
876 } ble_gap_evt_conn_param_updated_t;
877
878 /** @brief Connection parameter update request event for @ref BLE_GAPC_EVT_CONN_PARAM_UPDATE_REQ. */
879 typedef struct
880 {
881 uint16_t interval_min; /**< Minimum value for the connection interval. This shall be less than or equal to Conn_Interval_Max.
882 Range: 0x0006 to 0x0C80, unit: 1.25 ms, time range: 7.5 ms to 4 s*/
883 uint16_t interval_max; /**< Maximum value for the connection interval. This shall be greater than or equal to Conn_Interval_Min.
884 Range: 0x0006 to 0x0C80, unit: 1.25 ms, time range: 7.5 ms to 4 s.*/
885 uint16_t slave_latency; /**< Slave latency for the connection in number of connection events. Range: 0x0000 to 0x01F3. */
886 uint16_t sup_timeout; /**< Supervision timeout for the LE link. Range: 0x000A to 0x0C80, unit: 10 ms, time range: 100 ms to 32 s. */
887 } ble_gap_evt_conn_param_update_req_t;
888
889 /** @brief Get Connection info event for @ref BLE_GAPC_EVT_CONN_INFO_GOT. */
890 typedef struct
891 {
892 uint8_t opcode; /**< Operation code. See @ref ble_gap_get_conn_info_op_t. */
893 ble_gap_conn_info_t info; /**< Connection info. */
894 } ble_gap_evt_conn_info_t;
895
896 /** @brief Data Length Updated event for @ref BLE_GAPC_EVT_DATA_LENGTH_UPDATED. */
897 typedef struct
898 {
899 uint16_t max_tx_octets; /**< The maximum number of payload octets in TX. */
900 uint16_t max_tx_time; /**< The maximum time that the local Controller will take to TX. */
901 uint16_t max_rx_octets; /**< The maximum number of payload octets in RX. */
902 uint16_t max_rx_time; /**< The maximum time that the local Controller will take to RX. */
903 } ble_gap_evt_data_length_t;
904
905 /** @brief Device Information set event for @ref BLE_GAPC_EVT_DEV_INFO_SET. */
906 typedef struct
907 {
908 ble_gap_dev_info_type_t info_type; /**< Device info type. see @ref ble_gap_dev_info_type_t. */
909 ble_gapc_set_dev_info_t info; /**< Device info data. see @ref ble_gap_cte_type_t. */
910 } ble_gap_evt_dev_info_set_t;
911
912 /** @brief Connection IQ Report info event for @ref BLE_GAPC_EVT_CONNECT_IQ_REPORT. */
913 typedef struct
914 {
915 uint8_t rx_phy; /**< Rx PHY (0x01: 1M | 0x02: 2M). */
916 uint8_t data_channel_idx; /**< Data channel index, range 0x00 to 0x24. */
917 int16_t rssi; /**< RSSI units: 0.1 dBm, range -1270 to +200. */
918 uint8_t rssi_antenna_id; /**< RSSI antenna ID. */
919 uint8_t cte_type; /**< CTE type (0: GAP_CET_AOA | 1: GAP_CET_AOD_1US | 2: GAP_CET_AOD_2US), @see enum ble_gap_cte_type_t. */
920 uint8_t slot_dur; /**< Slot durations (1: GAP_SLOT_1US | 2: GAP_SLOT_2US), see @ref ble_gap_switching_sampling_type_t. */
921 uint8_t pkt_status; /**< Packet status, @see enum ble_gap_iq_report_status_t. */
922 uint16_t con_evt_cnt; /**< Connection event counter. */
923 uint8_t nb_samples; /**< Number of samples. 0x00: no samples provided (only permitted if pkt_status is 0xFF),
924 0x09 to 0x52: total number of sample pairs. */
925 int8_t i_sample[BLE_GAP_MAX_IQ_SAMPLE_NUM]; /**< The list of i samples for the reported PDU. */
926 int8_t q_sample[BLE_GAP_MAX_IQ_SAMPLE_NUM]; /**< The list of q samples for the reported PDU. */
927 } ble_gap_evt_conn_iq_report_t;
928
929 /** @brief Connectionless IQ Report info event for @ref BLE_GAPC_EVT_CONNECTLESS_IQ_REPORT. */
930 typedef struct
931 {
932 uint8_t channel_idx; /**< The index of the channel on which the packet was received, range 0x00 to 0x24. */
933 int16_t rssi; /**< RSSI units: 0.1 dBm, range -1270 to +200. */
934 uint8_t rssi_antenna_id; /**< RSSI antenna ID. */
935 uint8_t cte_type; /**< CTE type (0: GAP_CET_AOA | 1: GAP_CET_AOD_1US | 2: GAP_CET_AOD_2US), @see enum ble_gap_cte_type_t. */
936 uint8_t slot_dur; /**< Slot durations (1: GAP_SLOT_1US | 2: GAP_SLOT_2US), see @ref ble_gap_switching_sampling_type_t. */
937 uint8_t pkt_status; /**< Packet status, @see enum ble_gap_iq_report_status_t. */
938 uint16_t pa_evt_cnt; /**< Periodic advertising event counter. */
939 uint8_t nb_samples; /**< Number of samples. 0x00: no samples provided (only permitted if pkt_status is 0xFF),
940 0x09 to 0x52: total number of sample pairs. */
941 int8_t i_sample[BLE_GAP_MAX_IQ_SAMPLE_NUM]; /**< The list of i samples for the reported PDU. */
942 int8_t q_sample[BLE_GAP_MAX_IQ_SAMPLE_NUM]; /**< The list of q samples for the reported PDU. */
943 } ble_gap_evt_connless_iq_report_t;
944
945 /** @brief Local transmit power read indication info event for @ref BLE_GAPC_EVT_LOCAL_TX_POWER_READ. */
946 typedef struct
947 {
948 uint8_t phy; /**< Phy see @ref ble_gap_phy_type_t. */
949 int8_t curr_tx_pwr_lvl; /**< Current transmit power level (dBm). */
950 int8_t max_tx_pwr_lvl; /**< Max transmit power level (dBm). */
951 } ble_gap_evt_local_tx_pwr_read_ind_t;
952
953 /** @brief Remote transmit power read indication info event for @ref BLE_GAPC_EVT_REMOTE_TX_POWER_READ. */
954 typedef struct
955 {
956 uint8_t phy; /**< Phy see @ref ble_gap_phy_type_t. */
957 int8_t tx_pwr; /**< Transmit Power level (dBm). */
958 uint8_t flags; /**< Transmit Power level flags, see @ref ble_gap_pwr_lvl_flag_t. */
959 } ble_gap_evt_remote_tx_pwr_read_ind_t;
960
961 /** @brief Transmit power change reporting info event for @ref BLE_GAPC_EVT_TX_POWER_CHANGE_REPORT. */
962 typedef struct
963 {
964 uint8_t reason; /**< Reason see @ref ble_gap_tx_pwr_change_report_reason_t. */
965 uint8_t phy; /**< Phy see @ref ble_gap_phy_type_t. */
966 int8_t tx_pwr; /**< Transmit Power level (dBm). */
967 uint8_t flags; /**< Transmit Power level flags, see @ref ble_gap_pwr_lvl_flag_t. */
968 int8_t delta; /**< Change in transmit power level (dBm). */
969 } ble_gap_evt_tx_pwr_change_report_t;
970
971 /** @brief Path loss threshold reporting info event for @ref BLE_GAPC_EVT_PATH_LOSS_THRESHOLD_REPORT. */
972 typedef struct
973 {
974 uint8_t curr_path_loss; /**< Current path loss (dB). */
975 uint8_t zone_entered; /**< Zone entered, see @ref ble_gap_path_loss_zone_t. */
976 } ble_gap_evt_path_loss_threshold_report_t;
977
978 /** @brief Ranging indication event for @ref BLE_GAPC_EVT_RANGING_IND. */
979 typedef struct
980 {
981 uint8_t ranging_status; /**< ranging status. */
982 } ble_gap_evt_ranging_ind_t;
983
984 /** @brief Ranging sample report event for @ref BLE_GAPC_EVT_RANGING_SAMPLE_REPORT. */
985 typedef struct
986 {
987 uint16_t nb_sample; /**< Sample number. */
988 int32_t iq_sample_addr; /**< I/Q sample address. */
989 } ble_gap_evt_ranging_sample_report_ind_t;
990
991 /** @brief Ranging complete indication event for @ref BLE_GAPC_EVT_RANGING_CMP_IND. */
992 typedef struct
993 {
994 uint8_t ranging_status; /**< ranging complete status. */
995 } ble_gap_evt_ranging_cmp_ind_t;
996
997 /** @brief Subrate change indication event for @ref BLE_GAPC_EVT_SUBRATE_CHANGE_IND. */
998 typedef struct
999 {
1000 uint16_t subrate_factor; /**< subrate factor value. */
1001 uint16_t con_latency; /**< Connection latency value. */
1002 uint16_t continuation_number; /**< Connection continuation number value. */
1003 uint16_t supervision_timeout; /**< Connection supervision timeout value. */
1004 } ble_gap_evt_subrate_chg_ind_t;
1005
1006 /**@brief BLE GAPC event structure. */
1007 typedef struct
1008 {
1009 uint8_t index; /**< Index of connection. */
1010 union /**< union alternative identified by evt_id in enclosing struct. */
1011 {
1012 ble_gap_evt_phy_update_t phy_update; /**< PHY update parameters. */
1013 ble_gap_evt_connected_t connected; /**< Connection parameters. */
1014 ble_gap_evt_disconnected_t disconnected; /**< Disconnection parameters. See @ref BLE_STACK_ERROR_CODES. */
1015 ble_gap_evt_peer_name_get_t peer_name; /**< Peer device name indication parameters. */
1016 ble_gap_evt_peer_info_t peer_info; /**< Peer info indication parameters. */
1017 ble_gap_evt_conn_param_updated_t conn_param_updated; /**< Connection parameter updated parameters. */
1018 ble_gap_evt_conn_param_update_req_t conn_param_update_req; /**< Connection parameter update request parameters. */
1019 ble_gap_evt_conn_info_t conn_info; /**< Connection info parameters. */
1020 ble_gap_evt_data_length_t data_length; /**< Data Length Update parameter. */
1021 ble_gap_evt_dev_info_set_t dev_info_ind; /**< Device info parameters. */
1022 ble_gap_evt_conn_iq_report_t conn_iq_report; /**< Connection IQ Report info parameters. */
1023 ble_gap_evt_connless_iq_report_t connless_iq_report; /**< Connectionless IQ Report info parameters. */
1024 ble_gap_evt_local_tx_pwr_read_ind_t local_tx_pwr_read; /**< Local transmit power read indication info parameters. */
1025 ble_gap_evt_remote_tx_pwr_read_ind_t remote_tx_pwr_read; /**< Remote transmit power read indication info parameters. */
1026 ble_gap_evt_tx_pwr_change_report_t tx_pwr_change_report; /**< Transmit power change reporting info parameters. */
1027 ble_gap_evt_path_loss_threshold_report_t path_loss_threshold_reoprt; /**< Path loss threshold reporting info parameters. */
1028 ble_gap_evt_ranging_ind_t ranging_ind;
1029 ble_gap_evt_ranging_sample_report_ind_t ranging_sample_report;
1030 ble_gap_evt_ranging_cmp_ind_t ranging_cmp_ind;
1031 ble_gap_evt_subrate_chg_ind_t subrate_chg_ind;
1032 } params; /**< Event Parameters. */
1033 } ble_gapc_evt_t;
1034
1035 /** @} */
1036
1037 /**
1038 * @defgroup BLE_GAPC_FUNCTION Functions
1039 * @{
1040 */
1041 /**
1042 ****************************************************************************************
1043 * @brief Terminate an existing connection.
1044 *
1045 * @param[in] conn_idx: The index of connection.
1046 *
1047 * @retval ::SDK_SUCCESS: Operation is Success.
1048 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1049 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
1050 ****************************************************************************************
1051 */
1052 uint16_t ble_gap_disconnect(uint8_t conn_idx);
1053
1054 /**
1055 ****************************************************************************************
1056 * @brief Terminate an existing connection with a specified reason.
1057 *
1058 * @param[in] conn_idx: The index of connection.
1059 * @param[in] reason: The specified reason.
1060 *
1061 * @retval ::SDK_SUCCESS: Operation is Success.
1062 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1063 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
1064 ****************************************************************************************
1065 */
1066 uint16_t ble_gap_disconnect_with_reason(uint8_t conn_idx, ble_gap_disconn_reason_t reason);
1067
1068 /**
1069 ****************************************************************************************
1070 * @brief Change the Link Layer connection parameters of a connection.
1071 *
1072 * @param[in] conn_idx: The index of connection.
1073 * @param[in] p_conn_param: The new connection param.
1074 *
1075 * @retval ::SDK_SUCCESS: Operation is Success.
1076 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1077 * @retval ::SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1078 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
1079 ****************************************************************************************
1080 */
1081 uint16_t ble_gap_conn_param_update (uint8_t conn_idx, const ble_gap_conn_update_param_t *p_conn_param);
1082
1083 /**
1084 *****************************************************************************************
1085 * @brief Set the method for updating connection parameter.
1086 *
1087 * @param[in] conn_idx: Connection index.
1088 * @param[in] use_l2cap_flag: Preferred to use l2cap to update connection parameter.
1089 *
1090 * @retval ::SDK_SUCCESS: Operation is Success.
1091 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1092 *****************************************************************************************
1093 */
1094 uint16_t ble_gap_update_conn_param_method_set(uint8_t conn_idx, bool use_l2cap_flag);
1095
1096 /**
1097 *****************************************************************************************
1098 * @brief Set connection's Latency.
1099 * @note The latency shall be set to X value by LLCP firstly, then uses this API to change the latency in [0, X].
1100 *
1101 * @param[in] conn_idx: The index of connection.
1102 * @param[in] latency: The latency of connection.
1103 *
1104 * @retval ::SDK_SUCCESS: Operation is Success.
1105 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1106 *****************************************************************************************
1107 */
1108 uint16_t ble_gap_latency_set(uint8_t conn_idx, uint16_t latency);
1109
1110 /**
1111 *****************************************************************************************
1112 * @brief Get connection's Latency.
1113 * @note This function is used to get connection's Latency.
1114 *
1115 * @param[in] conn_idx: The index of connection.
1116 * @param[in] latency: Pointer to the latency of connection.
1117 *
1118 * @retval ::SDK_SUCCESS: Operation is Success.
1119 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1120 *****************************************************************************************
1121 */
1122 uint16_t ble_gap_latency_get(uint8_t conn_idx, uint16_t *latency);
1123
1124 /**
1125 *****************************************************************************************
1126 * @brief Consult BLE connection activity plan situation function.
1127 * @note This function should be called when connection established and no periodic advertising exists.
1128 *
1129 * @param[out] p_act_num: Pointer to the number of existing connection activities.
1130 * @param[out] p_conn_plan_arr: Pointer to the global array that stores planned connection activities.
1131 *
1132 * @retval ::SDK_SUCCESS: Operation is Success.
1133 * @retval ::SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1134 *****************************************************************************************
1135 */
1136 uint16_t ble_gap_con_plan_consult(uint8_t *p_act_num, ble_gap_con_plan_tag_t **p_conn_plan_arr);
1137
1138 /**
1139 ****************************************************************************************
1140 * @brief Connection param update reply to peer device.
1141 *
1142 * @param[in] conn_idx: The index of connection.
1143 * @param[in] accept: True to accept connection parameters, false to reject.
1144 *
1145 * @retval ::SDK_SUCCESS: Operation is success.
1146 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1147 * @retval ::SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1148 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
1149 ****************************************************************************************
1150 */
1151 uint16_t ble_gap_conn_param_update_reply(uint8_t conn_idx, bool accept);
1152
1153 /**
1154 ****************************************************************************************
1155 * @brief The suggested maximum transmission packet size and maximum packet transmission time to be used for a given connection.
1156 *
1157 * @param[in] conn_idx: The index of connection.
1158 * @param[in] tx_octects: Preferred maximum number of payload octets that the local Controller should include in a single Link Layer packet on this connection.
1159 * Range 0x001B-0x00FB (all other values reserved for future use).
1160 * @param[in] tx_time: Preferred maximum number of microseconds that the local Controller should use to transmit a single Link Layer packet on this connection.
1161 * Range 0x0148-0x4290 (all other values reserved for future use).
1162 *
1163 *
1164 * @retval ::SDK_SUCCESS: Operation is Success.
1165 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1166 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
1167 ****************************************************************************************
1168 */
1169 uint16_t ble_gap_data_length_update(uint8_t conn_idx, uint16_t tx_octects , uint16_t tx_time);
1170
1171 /**
1172 ****************************************************************************************
1173 * @brief Set the PHY preferences for the connection identified by the connection index.
1174 *
1175 * @param[in] conn_idx: The index of connection.
1176 * @param[in] tx_phys: A bit field that indicates the transmitter PHYs that the Host prefers the Controller to use (see @ref ble_gap_phy_bit_t).
1177 * @param[in] rx_phys: A bit field that indicates the receiver PHYs that the Host prefers the Controller to use (see @ref ble_gap_phy_bit_t).
1178 * @param[in] phy_opt: A bit field that allows the Host to specify options for PHYs (see @ref ble_gap_phy_options_t), only valid for coded phy.
1179 *
1180 * @retval ::SDK_SUCCESS: Operation is Success.
1181 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1182 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
1183 ****************************************************************************************
1184 */
1185 uint16_t ble_gap_phy_update(uint8_t conn_idx, uint8_t tx_phys, uint8_t rx_phys, uint8_t phy_opt);
1186
1187 /**
1188 ****************************************************************************************
1189 * @brief Get the information of the connection.
1190 *
1191 * @param[in] conn_idx: The index of connection.
1192 * @param[in] opcode: The operation code. See @ref ble_gap_get_conn_info_op_t.
1193 *
1194 * @retval ::SDK_SUCCESS: Operation is Success.
1195 * @retval ::SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1196 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1197 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
1198 ****************************************************************************************
1199 */
1200 uint16_t ble_gap_conn_info_get(uint8_t conn_idx, ble_gap_get_conn_info_op_t opcode);
1201
1202 /**
1203 ****************************************************************************************
1204 * @brief Get the information of the peer device.
1205 *
1206 * @param[in] conn_idx: The index of connection.
1207 * @param[in] opcode: The operation code. See @ref ble_gap_get_peer_info_op_t.
1208 *
1209 * @retval ::SDK_SUCCESS: Operation is Success.
1210 * @retval ::SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1211 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1212 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
1213 ****************************************************************************************
1214 */
1215 uint16_t ble_gap_peer_info_get(uint8_t conn_idx, ble_gap_get_peer_info_op_t opcode);
1216
1217 /**
1218 ****************************************************************************************
1219 * @brief Get BD address of the bonded device.
1220 *
1221 * @param[in] conn_idx: The index of connection.
1222 * @param[in] p_peer_addr: Pointer to the peer BD addrss
1223 *
1224 * @retval ::SDK_SUCCESS: Operation is Success.
1225 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1226 * @retval ::SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1227 ****************************************************************************************
1228 */
1229 uint16_t ble_gap_bond_dev_addr_get(uint8_t conn_idx, ble_gap_bdaddr_t *p_peer_addr);
1230
1231 /**
1232 ****************************************************************************************
1233 * @brief Set the parameters used for periodic sync transfer.
1234 *
1235 * @param[in] conn_idx: The index of connection.
1236 * @param[in] per_sync_idx: Periodic synchronization index (range is 0 to 4).
1237 * @param[in] p_per_sync_trans_param: Periodic synchronization transfer parameters.
1238 *
1239 * @retval ::SDK_SUCCESS: Operation is successful.
1240 * @retval ::SDK_ERR_POINTER_NULL: Invalid pointer supplied.
1241 * @retval ::SDK_ERR_DISALLOWED: Operation is disallowed.
1242 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
1243 ****************************************************************************************
1244 */
1245 uint16_t ble_gap_per_sync_trans_param_set(uint8_t conn_idx, uint8_t per_sync_idx, ble_gap_per_sync_trans_param_t* p_per_sync_trans_param);
1246
1247 /**
1248 ****************************************************************************************
1249 * @brief Send synchronization information about the periodic advertising in an advertising set to a connected device.
1250 *
1251 * @note Need to get the feature of peer device before invoke this function.
1252 *
1253 * @param[in] conn_idx: The index of connection.
1254 * @param[in] per_adv_idx: The index of per adv.
1255 * @param[in] service_data: Identify the periodic advertisement to the peer device.
1256 *
1257 * @retval ::SDK_SUCCESS: Operation is Success.
1258 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1259 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
1260 ****************************************************************************************
1261 */
1262 uint16_t ble_gap_per_adv_set_info_trans(uint8_t conn_idx, uint8_t per_adv_idx, uint16_t service_data);
1263
1264 /**
1265 ****************************************************************************************
1266 * @brief Send synchronization information about the periodic advertising identified by the sync_hdl parameter to a connected device.
1267 *
1268 * @param[in] conn_idx: The index of connection.
1269 * @param[in] per_sync_idx: The index of the periodic syncronization instance.
1270 * @param[in] service_data: Identify the periodic advertisement to the peer device.
1271 *
1272 * @retval ::SDK_SUCCESS: Operation is Success.
1273 * @retval ::SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1274 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1275 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
1276 ****************************************************************************************
1277 */
1278 uint16_t ble_gap_per_adv_sync_trans(uint8_t conn_idx, uint8_t per_sync_idx, uint16_t service_data);
1279
1280 /**
1281 ****************************************************************************************
1282 * @brief Set connection CTE transmit parameters.
1283 *
1284 * @param[in] conn_idx: The index of connection.
1285 * @param[in] param: Set connection CTE transmit parameters info, see @ref ble_gap_set_conn_cte_trans_param_t.
1286 *
1287 * @retval ::SDK_SUCCESS: Operation is Success.
1288 * @retval ::SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1289 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1290 ****************************************************************************************
1291 */
1292 uint16_t ble_gap_conn_cte_trans_param_set(uint8_t conn_idx, ble_gap_set_conn_cte_trans_param_t *param);
1293
1294 /**
1295 ****************************************************************************************
1296 * @brief Set connection CTE receive parameters.
1297 *
1298 * @param[in] conn_idx: The index of connection.
1299 * @param[in] param: Set connection CTE receive parameters info, see @ref ble_gap_set_conn_cte_rcv_param_t.
1300
1301 * @retval ::SDK_SUCCESS: Operation is Success.
1302 * @retval ::SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1303 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1304 ****************************************************************************************
1305 */
1306 uint16_t ble_gap_conn_cte_recv_param_set(uint8_t conn_idx, ble_gap_set_conn_cte_rcv_param_t *param);
1307
1308 /**
1309 ****************************************************************************************
1310 * @brief Set connection CTE request enable.
1311 *
1312 * @param[in] conn_idx: The index of connection.
1313 * @param[in] enable_flag: Wheter to request the cte for the connection. If enable_flag is set to false, the param shall be NULL.
1314 * @param[in] param: Set connection CTE request enable info, see @ref ble_gap_set_conn_cte_req_enable_t.
1315
1316 * @retval ::SDK_SUCCESS: Operation is Success.
1317 * @retval ::SDK_ERR_INVALID_PARAM: Invalid parameter supplied.
1318 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1319 ****************************************************************************************
1320 */
1321 uint16_t ble_gap_conn_cte_req_enable_set(uint8_t conn_idx, bool enable_flag, ble_gap_set_conn_cte_req_enable_t *param);
1322
1323 /**
1324 ****************************************************************************************
1325 * @brief Set connection CTE response enable.
1326 *
1327 * @param[in] conn_idx: The index of connection.
1328 * @param[in] enable_flag: Wheter to response the cte req for the connection.
1329
1330 * @retval ::SDK_SUCCESS: Operation is Success.
1331 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1332 ****************************************************************************************
1333 */
1334 uint16_t ble_gap_conn_cte_rsp_enable_set(uint8_t conn_idx, bool enable_flag);
1335
1336 /**
1337 ****************************************************************************************
1338 * @brief start ranging procedure.
1339 *
1340 * @param[in] con_idx: The index of connection.
1341 * @param[in] param: Ranging parameter, see @ref ble_gap_ranging_param_t.
1342
1343 * @retval ::SDK_SUCCESS: Operation is Success.
1344 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
1345 ****************************************************************************************
1346 */
1347 int ble_gap_ranging_start(uint8_t con_idx, ble_gap_ranging_param_t *param);
1348
1349 /**
1350 ****************************************************************************************
1351 * @brief Get BD address of the local device by the conidx.
1352 *
1353 * @param[in] conidx: The index of conncetion.
1354 * @param[in] p_addr: Pointer to the local BD addrss
1355 ****************************************************************************************
1356 */
1357 void ble_gap_get_local_addr_by_conidx(uint8_t conidx, uint8_t *p_addr);
1358
1359 /** @} */
1360 #endif
1361 /** @} */
1362 /** @} */
1363 /** @} */
ble_gap_peer_name_ind_t::name_len
uint8_t name_len
Definition: ble_gapc.h:461
ble_gap_evt_conn_iq_report_t::rssi
int16_t rssi
Definition: ble_gapc.h:917
ble_gap_sync_established_ind_t::sync_hdl
uint16_t sync_hdl
Definition: ble_gapc.h:432
ble_gap_path_loss_threshold_report_t::zone_entered
uint8_t zone_entered
Definition: ble_gapc.h:753
ble_gap_antenna_inf_t::max_switching_pattern_len
uint8_t max_switching_pattern_len
Definition: ble_gapc.h:391
ble_gap_connless_iq_report_t::slot_dur
uint8_t slot_dur
Definition: ble_gapc.h:676
ble_gap_le_pkt_size_ind_t::max_rx_time
uint16_t max_rx_time
Definition: ble_gapc.h:614
ble_gap_per_sync_trans_param_t::cte_type
uint8_t cte_type
Definition: ble_gapc.h:664
ble_gap_get_bd_addr_t::index
uint8_t index
Definition: ble_gapc.h:328
ble_gap_dft_subrate_param_t
Default Subrate command param.
Definition: ble_gapc.h:801
ble_gap_le_pkt_size_ind_t::max_tx_octets
uint16_t max_tx_octets
Definition: ble_gapc.h:611
ble_gap_dev_adv_tx_power_t
TX power info struct.
Definition: ble_gapc.h:334
ble_gap_conn_iq_report_t::cte_type
uint8_t cte_type
Definition: ble_gapc.h:719
ble_gap_ext_adv_report_ind_t::adv_sid
uint8_t adv_sid
Definition: ble_gapc.h:449
ble_gap_evt_path_loss_threshold_report_t
Path loss threshold reporting info event for BLE_GAPC_EVT_PATH_LOSS_THRESHOLD_REPORT.
Definition: ble_gapc.h:973
BLE_GAP_PATH_LOSS_MID
@ BLE_GAP_PATH_LOSS_MID
Definition: ble_gapc.h:288
BLE_GAP_SLOT_1US
@ BLE_GAP_SLOT_1US
Definition: ble_gapc.h:238
ble_gap_latency_get
uint16_t ble_gap_latency_get(uint8_t conn_idx, uint16_t *latency)
Get connection's Latency.
ble_gap_get_conn_info_op_t
ble_gap_get_conn_info_op_t
The operation code used to get connection info.
Definition: ble_gapc.h:125
BLE_GAP_ADDR_TYPE_RANDOM_STATIC
@ BLE_GAP_ADDR_TYPE_RANDOM_STATIC
Definition: ble_gapc.h:97
ble_gapc_set_dev_info_t::appearance
uint16_t appearance
Definition: ble_gapc.h:644
ble_gap_evt_subrate_chg_ind_t::continuation_number
uint16_t continuation_number
Definition: ble_gapc.h:1002
ble_gap_dev_rf_path_comp_ind_t
RF path compensation values info.
Definition: ble_gapc.h:381
ble_gap_get_bd_addr_t
Get broadcast address struct.
Definition: ble_gapc.h:327
ble_gapc_set_dev_info_t
Device information data struct.
Definition: ble_gapc.h:642
ble_gap_evt_peer_info_t::peer_info
ble_gap_peer_info_t peer_info
Definition: ble_gapc.h:867
ble_gap_sync_established_ind_t
Sync established indication.
Definition: ble_gapc.h:426
ble_gap_subrate_chg_ind_t::con_latency
uint16_t con_latency
Definition: ble_gapc.h:823
ble_gap_ranging_param_t
ranging parameter.
Definition: ble_gapc.h:774
ble_gap_peer_features_ind_t
LE features info.
Definition: ble_gapc.h:554
ble_gap_evt_local_tx_pwr_read_ind_t::max_tx_pwr_lvl
int8_t max_tx_pwr_lvl
Definition: ble_gapc.h:950
BLE_GAP_MAX_IQ_SAMPLE_NUM
#define BLE_GAP_MAX_IQ_SAMPLE_NUM
Definition: ble_gapc.h:82
ble_gap_evt_connected_t
Connection complete event for BLE_GAPC_EVT_CONNECTED.
Definition: ble_gapc.h:837
ble_gap_peer_info_t::peer_features
ble_gap_peer_features_ind_t peer_features
Definition: ble_gapc.h:598
ble_gap_evt_peer_name_get_t::peer_addr
ble_gap_addr_t peer_addr
Definition: ble_gapc.h:857
ble_gap_conn_iq_report_t::con_evt_cnt
uint16_t con_evt_cnt
Definition: ble_gapc.h:722
ble_gap_connless_iq_report_t::nb_samples
uint8_t nb_samples
Definition: ble_gapc.h:679
ble_gap_peer_name_ind_t::addr_type
uint8_t addr_type
Definition: ble_gapc.h:460
ble_gap_evt_dev_info_set_t::info
ble_gapc_set_dev_info_t info
Definition: ble_gapc.h:909
ble_gapc_evt_t::phy_update
ble_gap_evt_phy_update_t phy_update
Definition: ble_gapc.h:1012
BLE_GAP_OPCODE_LOCAL_RSLV_ADDR_READ
@ BLE_GAP_OPCODE_LOCAL_RSLV_ADDR_READ
Definition: ble_gapc.h:203
gap_conn_cmp_t::conhdl
uint16_t conhdl
Definition: ble_gapc.h:501
ble_gap_evt_ranging_sample_report_ind_t
Ranging sample report event for BLE_GAPC_EVT_RANGING_SAMPLE_REPORT.
Definition: ble_gapc.h:986
gap_conn_cmp_t::ll_role
ble_gap_ll_role_type_t ll_role
Definition: ble_gapc.h:509
ble_gapc_evt_t::disconnected
ble_gap_evt_disconnected_t disconnected
Definition: ble_gapc.h:1014
ble_gap_dev_rf_path_comp_ind_t::tx_path_comp
uint16_t tx_path_comp
Definition: ble_gapc.h:382
ble_gap_ext_adv_report_ind_t::per_sync_idx
uint8_t per_sync_idx
Definition: ble_gapc.h:451
ble_gap_max_adv_data_len_ind_t::length
uint16_t length
Definition: ble_gapc.h:376
BLE_GAP_CTE_TYPE_AOD_1US
@ BLE_GAP_CTE_TYPE_AOD_1US
Definition: ble_gapc.h:229
ble_gap_subrate_chg_ind_t::subrate_factor
uint16_t subrate_factor
Definition: ble_gapc.h:822
ble_gap_subrate_req_t::subrate_max
uint16_t subrate_max
Definition: ble_gapc.h:813
gr533x_sys_cfg.h
Define the chip configuration.
ble_gap_conn_iq_report_t::rssi_antenna_id
uint8_t rssi_antenna_id
Definition: ble_gapc.h:718
ble_gap_ranging_sample_report_ind_t::iq_sample_addr
int32_t iq_sample_addr
Definition: ble_gapc.h:790
ble_gap_ext_adv_report_ind_t::phy_second
uint8_t phy_second
Definition: ble_gapc.h:448
ble_gap_conn_update_param_t::interval_max
uint16_t interval_max
Definition: ble_gapc.h:490
ble_gap_dev_info_t::dev_antenna_inf
ble_gap_antenna_inf_t dev_antenna_inf
Definition: ble_gapc.h:407
BLE_GAP_GET_PEER_FEATURES
@ BLE_GAP_GET_PEER_FEATURES
Definition: ble_gapc.h:136
ble_gap_addr_t
The struct of address.
Definition: ble_gapc.h:314
ble_gap_dev_name_ind_t
GAP Device name struct.
Definition: ble_gapc.h:635
ble_gap_peer_version_ind_t
Peer version info.
Definition: ble_gapc.h:545
ble_gap_tx_pwr_change_report_t::phy
uint8_t phy
Definition: ble_gapc.h:743
ble_gap_conn_param_t::slave_latency
uint16_t slave_latency
Definition: ble_gapc.h:480
ble_gap_conn_info_t::rssi
int8_t rssi
Definition: ble_gapc.h:529
ble_gap_dev_info_t::dev_rf_path_comp
ble_gap_dev_rf_path_comp_ind_t dev_rf_path_comp
Definition: ble_gapc.h:406
ble_gap_peer_version_ind_t::lmp_vers
uint8_t lmp_vers
Definition: ble_gapc.h:548
ble_gap_conn_iq_report_t::slot_dur
uint8_t slot_dur
Definition: ble_gapc.h:720
ble_gap_max_data_len_t::suppted_max_rx_time
uint16_t suppted_max_rx_time
Definition: ble_gapc.h:354
ble_gap_conn_param_t::sup_timeout
uint16_t sup_timeout
Definition: ble_gapc.h:481
ble_gap_evt_connected_t::sup_timeout
uint16_t sup_timeout
Definition: ble_gapc.h:841
ble_gap_per_sync_trans_param_t
Default periodic advertising synchronization transfer parameters.
Definition: ble_gapc.h:659
ble_gap_evt_disconnected_t
Disconnection event for BLE_GAPC_EVT_DISCONNECTED.
Definition: ble_gapc.h:850
BLE_GAP_STOPPED_REASON_CONN_EST
@ BLE_GAP_STOPPED_REASON_CONN_EST
Definition: ble_gapc.h:163
ble_gap_con_plan_tag_t
The Structure for BLE Connection Arrangement.
Definition: ble_gapc.h:619
ble_gap_ext_adv_report_ind_t::adv_type
uint8_t adv_type
Definition: ble_gapc.h:441
ble_gap_set_path_loss_report_param_t::high_thr
uint8_t high_thr
Definition: ble_gapc.h:732
ble_gapc_evt_t::peer_info
ble_gap_evt_peer_info_t peer_info
Definition: ble_gapc.h:1016
BLE_GAP_GET_PHY
@ BLE_GAP_GET_PHY
Definition: ble_gapc.h:128
ble_gap_evt_connless_iq_report_t::slot_dur
uint8_t slot_dur
Definition: ble_gapc.h:936
ble_gapc_evt_t::conn_iq_report
ble_gap_evt_conn_iq_report_t conn_iq_report
Definition: ble_gapc.h:1022
BLE_GAP_GET_PEER_VERSION
@ BLE_GAP_GET_PEER_VERSION
Definition: ble_gapc.h:135
ble_gap_phy_bit_t
ble_gap_phy_bit_t
Bit field use to select the preferred TX or RX LE PHY.
Definition: ble_gapc.h:104
ble_gap_rslv_addr_read_op_id_t
ble_gap_rslv_addr_read_op_id_t
Operation code used to read resolvable address.
Definition: ble_gapc.h:202
ble_gap_evt_peer_info_t
Get peer info event for BLE_GAPC_EVT_PEER_INFO_GOT.
Definition: ble_gapc.h:865
ble_gap_set_conn_cte_req_enable_t::cte_req_type
uint8_t cte_req_type
Definition: ble_gapc.h:709
ble_gap_evt_data_length_t::max_rx_time
uint16_t max_rx_time
Definition: ble_gapc.h:902
ble_gap_bdaddr_t
The struct of broadcast address with broadcast type.
Definition: ble_gapc.h:320
ble_gap_evt_dev_info_set_t::info_type
ble_gap_dev_info_type_t info_type
Definition: ble_gapc.h:908
ble_gap_dev_info_t
Device info.
Definition: ble_gapc.h:397
ble_gapc_evt_t::ranging_cmp_ind
ble_gap_evt_ranging_cmp_ind_t ranging_cmp_ind
Definition: ble_gapc.h:1030
ble_gap_peer_info_t
LE peer info.
Definition: ble_gapc.h:596
ble_gap_remote_tx_pwr_read_ind_t
Remote transmit power read indication info.
Definition: ble_gapc.h:766
ble_gap_per_adv_sync_trans
uint16_t ble_gap_per_adv_sync_trans(uint8_t conn_idx, uint8_t per_sync_idx, uint16_t service_data)
Send synchronization information about the periodic advertising identified by the sync_hdl parameter ...
ble_gap_subrate_req_t::subrate_min
uint16_t subrate_min
Definition: ble_gapc.h:812
ble_gap_dev_version_ind_t::hci_subver
uint16_t hci_subver
Definition: ble_gapc.h:306
ble_gap_evt_local_tx_pwr_read_ind_t
Local transmit power read indication info event for BLE_GAPC_EVT_LOCAL_TX_POWER_READ.
Definition: ble_gapc.h:947
ble_gap_le_phy_ind_t::rx_phy
uint8_t rx_phy
Definition: ble_gapc.h:523
ble_gap_sync_established_ind_t::serv_data
uint16_t serv_data
Definition: ble_gapc.h:433
ble_gapc_evt_t::path_loss_threshold_reoprt
ble_gap_evt_path_loss_threshold_report_t path_loss_threshold_reoprt
Definition: ble_gapc.h:1027
ble_gap_evt_phy_update_t
PHY update event for BLE_GAPC_EVT_PHY_UPDATED.
Definition: ble_gapc.h:830
ble_gap_switching_sampling_type_t
ble_gap_switching_sampling_type_t
Type of switching and sampling slots.
Definition: ble_gapc.h:237
ble_gap_dev_rf_path_comp_ind_t::rx_path_comp
uint16_t rx_path_comp
Definition: ble_gapc.h:383
ble_gap_dev_version_ind_t::hci_ver
uint8_t hci_ver
Definition: ble_gapc.h:303
ble_gap_evt_tx_pwr_change_report_t::delta
int8_t delta
Definition: ble_gapc.h:968
ble_gap_conn_update_param_t::interval_min
uint16_t interval_min
Definition: ble_gapc.h:488
BLE_GAP_REPORT_TYPE_ADV_LEG
@ BLE_GAP_REPORT_TYPE_ADV_LEG
Definition: ble_gapc.h:143
ble_gap_phy_type_t
ble_gap_phy_type_t
Phy for power control management.
Definition: ble_gapc.h:257
ble_gap_evt_conn_iq_report_t::nb_samples
uint8_t nb_samples
Definition: ble_gapc.h:923
ble_gap_evt_tx_pwr_change_report_t::reason
uint8_t reason
Definition: ble_gapc.h:964
BLE_GAP_PHY_CODED_S2
@ BLE_GAP_PHY_CODED_S2
Definition: ble_gapc.h:262
BLE_GAP_PATH_LOSS_LOW
@ BLE_GAP_PATH_LOSS_LOW
Definition: ble_gapc.h:287
BLE_GAP_PHY_LE_CODED
@ BLE_GAP_PHY_LE_CODED
LE Coded PHY preferred for an active link.
Definition: ble_gapc.h:112
ble_gap_subrate_req_t::superv_timeout
uint16_t superv_timeout
Definition: ble_gapc.h:816
ble_gap_nb_adv_sets_t
Number of available advertising sets info.
Definition: ble_gapc.h:369
ble_gap_dft_subrate_param_t::max_latency
uint16_t max_latency
Definition: ble_gapc.h:804
ble_gap_dft_subrate_param_t::continuation_num
uint16_t continuation_num
Definition: ble_gapc.h:805
ble_gap_set_conn_cte_trans_param_t::antenna_id
uint8_t * antenna_id
Definition: ble_gapc.h:690
ble_gap_ext_adv_report_ind_t::length
uint16_t length
Definition: ble_gapc.h:452
ble_gap_evt_peer_name_get_t
Name of peer device indication event for BLE_GAPC_EVT_PEER_NAME_GOT.
Definition: ble_gapc.h:856
BLE_GAP_PWR_MAX_LVL
@ BLE_GAP_PWR_MAX_LVL
Definition: ble_gapc.h:281
ble_gap_psm_manager_op_id_t
ble_gap_psm_manager_op_id_t
Operation code used for LEPSM manager.
Definition: ble_gapc.h:211
ble_gap_connless_iq_report_t::channel_idx
uint8_t channel_idx
Definition: ble_gapc.h:672
gap_conn_cmp_t::peer_addr
ble_gap_addr_t peer_addr
Definition: ble_gapc.h:508
ble_gap_peer_version_ind_t::lmp_subvers
uint16_t lmp_subvers
Definition: ble_gapc.h:547
ble_gap_per_sync_trans_param_t::mode
uint8_t mode
Definition: ble_gapc.h:660
ble_gap_evt_ranging_cmp_ind_t
Ranging complete indication event for BLE_GAPC_EVT_RANGING_CMP_IND.
Definition: ble_gapc.h:993
ble_gap_con_plan_tag_t::interval
uint32_t interval
Definition: ble_gapc.h:621
ble_gap_evt_connless_iq_report_t::pkt_status
uint8_t pkt_status
Definition: ble_gapc.h:937
ble_gap_cte_type_t
ble_gap_cte_type_t
Type of constant tone extension.
Definition: ble_gapc.h:227
ble_gap_conn_update_cmp_t::sup_timeout
uint16_t sup_timeout
Definition: ble_gapc.h:470
ble_gap_evt_local_tx_pwr_read_ind_t::curr_tx_pwr_lvl
int8_t curr_tx_pwr_lvl
Definition: ble_gapc.h:949
ble_gap_evt_connless_iq_report_t::rssi_antenna_id
uint8_t rssi_antenna_id
Definition: ble_gapc.h:934
ble_gapc_evt_t::tx_pwr_change_report
ble_gap_evt_tx_pwr_change_report_t tx_pwr_change_report
Definition: ble_gapc.h:1026
BLE_GAP_PWR_REMOTE_TX_CHG
@ BLE_GAP_PWR_REMOTE_TX_CHG
Definition: ble_gapc.h:271
ble_gap_dev_info_t::max_adv_data_len
ble_gap_max_adv_data_len_ind_t max_adv_data_len
Definition: ble_gapc.h:404
ble_gapc_evt_t::peer_name
ble_gap_evt_peer_name_get_t peer_name
Definition: ble_gapc.h:1015
BLE_GAP_PHY_OPT_S8_CODING
@ BLE_GAP_PHY_OPT_S8_CODING
Definition: ble_gapc.h:120
ble_gap_conn_info_t::chnl_map
ble_gap_chnl_map_t chnl_map
Definition: ble_gapc.h:530
ble_gap_set_conn_cte_rcv_param_t::antenna_id
uint8_t * antenna_id
Definition: ble_gapc.h:699
ble_gap_antenna_inf_t::max_cte_len
uint8_t max_cte_len
Definition: ble_gapc.h:392
ble_gapc_evt_t::dev_info_ind
ble_gap_evt_dev_info_set_t dev_info_ind
Definition: ble_gapc.h:1021
BLE_GAP_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES
@ BLE_GAP_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES
Definition: ble_gapc.h:191
ble_gap_conn_iq_report_t::rx_phy
uint8_t rx_phy
Definition: ble_gapc.h:715
BLE_GAP_STOPPED_REASON_ON_USER
@ BLE_GAP_STOPPED_REASON_ON_USER
Definition: ble_gapc.h:162
ble_gap_le_pkt_size_ind_t
Supported data length size Indication.
Definition: ble_gapc.h:610
ble_gap_sugg_dflt_data_len_t::suggted_max_tx_octets
uint16_t suggted_max_tx_octets
Definition: ble_gapc.h:361
ble_gap_conn_info_get
uint16_t ble_gap_conn_info_get(uint8_t conn_idx, ble_gap_get_conn_info_op_t opcode)
Get the information of the connection.
ble_gap_ranging_ind_t::status
uint8_t status
Definition: ble_gapc.h:782
ble_gap_disconnect_with_reason
uint16_t ble_gap_disconnect_with_reason(uint8_t conn_idx, ble_gap_disconn_reason_t reason)
Terminate an existing connection with a specified reason.
gap_conn_cmp_t::clk_accuracy
uint8_t clk_accuracy
Definition: ble_gapc.h:505
BLE_GAP_STOPPED_REASON_TIMEOUT
@ BLE_GAP_STOPPED_REASON_TIMEOUT
Definition: ble_gapc.h:161
BLE_GAP_GET_CHAN_SEL_ALGO
@ BLE_GAP_GET_CHAN_SEL_ALGO
Definition: ble_gapc.h:129
ble_gap_peer_info_get
uint16_t ble_gap_peer_info_get(uint8_t conn_idx, ble_gap_get_peer_info_op_t opcode)
Get the information of the peer device.
ble_gap_conn_update_cmp_t::latency
uint16_t latency
Definition: ble_gapc.h:469
ble_gap_set_conn_cte_trans_param_t::num_antenna
uint8_t num_antenna
Definition: ble_gapc.h:689
ble_gap_peer_info_param_t
Get peer info operation struct.
Definition: ble_gapc.h:603
ble_gap_latency_set
uint16_t ble_gap_latency_set(uint8_t conn_idx, uint16_t latency)
Set connection's Latency.
ble_gap_con_plan_tag_t::duration
uint32_t duration
Definition: ble_gapc.h:623
BLE_GAP_SLOT_2US
@ BLE_GAP_SLOT_2US
Definition: ble_gapc.h:239
ble_gap_subrate_req_t::max_latency
uint16_t max_latency
Definition: ble_gapc.h:814
ble_gapc_evt_t::conn_param_update_req
ble_gap_evt_conn_param_update_req_t conn_param_update_req
Definition: ble_gapc.h:1018
ble_gap_set_pref_slave_evt_dur_param_t
Set preference slave event duration.
Definition: ble_gapc.h:628
ble_gap_con_plan_tag_t::conn_idx
uint16_t conn_idx
Definition: ble_gapc.h:620
ble_gap_evt_connected_t::peer_addr_type
uint8_t peer_addr_type
Definition: ble_gapc.h:843
ble_gap_conn_iq_report_t::nb_samples
uint8_t nb_samples
Definition: ble_gapc.h:723
ble_gap_evt_path_loss_threshold_report_t::curr_path_loss
uint8_t curr_path_loss
Definition: ble_gapc.h:974
gap_conn_cmp_t::peer_addr_type
uint8_t peer_addr_type
Definition: ble_gapc.h:507
ble_gap_dev_tx_power_t::max_tx_pwr
int8_t max_tx_pwr
Definition: ble_gapc.h:342
ble_gapc_evt_t::conn_param_updated
ble_gap_evt_conn_param_updated_t conn_param_updated
Definition: ble_gapc.h:1017
ble_gap_adv_report_type_t
ble_gap_adv_report_type_t
Advertising report type.
Definition: ble_gapc.h:141
BLE_GAP_CTE_TYPE_AOA
@ BLE_GAP_CTE_TYPE_AOA
Definition: ble_gapc.h:228
BLE_GAP_OPCODE_CHNL_MAP_SET
@ BLE_GAP_OPCODE_CHNL_MAP_SET
Definition: ble_gapc.h:178
ble_gap_sync_established_ind_t::bd_addr
ble_gap_bdaddr_t bd_addr
Definition: ble_gapc.h:431
ble_gap_conn_info_t
Connection info.
Definition: ble_gapc.h:528
BLE_GAP_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED
@ BLE_GAP_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED
Definition: ble_gapc.h:194
ble_gap_tx_pwr_change_report_t::tx_pwr
int8_t tx_pwr
Definition: ble_gapc.h:744
BLE_GAP_REPORT_INFO_DIR_ADV_BIT
@ BLE_GAP_REPORT_INFO_DIR_ADV_BIT
Definition: ble_gapc.h:155
ble_gap_rslv_addr_read_t::op_code
uint8_t op_code
Definition: ble_gapc.h:420
ble_gap_rslv_addr_read_t
Read resolvable address info struct.
Definition: ble_gapc.h:419
ble_gap_evt_conn_param_updated_t::conn_interval
uint16_t conn_interval
Definition: ble_gapc.h:873
ble_gap_ranging_cmp_ind_t::status
uint8_t status
Definition: ble_gapc.h:796
ble_gap_tx_pwr_change_report_reason_t
ble_gap_tx_pwr_change_report_reason_t
Transmit power change reporting reason.
Definition: ble_gapc.h:269
ble_gap_dev_version_ind_t::host_ver
uint8_t host_ver
Definition: ble_gapc.h:305
ble_gap_conn_cte_trans_param_set
uint16_t ble_gap_conn_cte_trans_param_set(uint8_t conn_idx, ble_gap_set_conn_cte_trans_param_t *param)
Set connection CTE transmit parameters.
ble_gap_dev_info_t::adv_tx_power
ble_gap_dev_adv_tx_power_t adv_tx_power
Definition: ble_gapc.h:400
ble_gap_conn_param_t::interval_min
uint16_t interval_min
Definition: ble_gapc.h:476
ble_gap_evt_conn_iq_report_t::cte_type
uint8_t cte_type
Definition: ble_gapc.h:919
ble_gap_evt_connless_iq_report_t::rssi
int16_t rssi
Definition: ble_gapc.h:933
ble_gap_evt_conn_info_t
Get Connection info event for BLE_GAPC_EVT_CONN_INFO_GOT.
Definition: ble_gapc.h:891
ble_gap_ranging_start
int ble_gap_ranging_start(uint8_t con_idx, ble_gap_ranging_param_t *param)
start ranging procedure.
ble_gap_stopped_reason_t
ble_gap_stopped_reason_t
Stop reason code.
Definition: ble_gapc.h:160
ble_gap_connless_iq_report_t::rssi
int16_t rssi
Definition: ble_gapc.h:673
ble_gap_connless_iq_report_t::rssi_antenna_id
uint8_t rssi_antenna_id
Definition: ble_gapc.h:674
ble_gap_max_data_len_t::suppted_max_tx_time
uint16_t suppted_max_tx_time
Definition: ble_gapc.h:350
ble_gap_conn_cte_req_enable_set
uint16_t ble_gap_conn_cte_req_enable_set(uint8_t conn_idx, bool enable_flag, ble_gap_set_conn_cte_req_enable_t *param)
Set connection CTE request enable.
gap_conn_cmp_t
Connection complete info.
Definition: ble_gapc.h:500
ble_gapc_evt_t::connected
ble_gap_evt_connected_t connected
Definition: ble_gapc.h:1013
ble_gap_evt_data_length_t::max_tx_octets
uint16_t max_tx_octets
Definition: ble_gapc.h:899
BLE_GAP_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF
@ BLE_GAP_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF
Definition: ble_gapc.h:192
ble_gap_remote_tx_pwr_read_ind_t::flags
uint8_t flags
Definition: ble_gapc.h:769
BLE_GAP_PHY_OPT_S2_CODING
@ BLE_GAP_PHY_OPT_S2_CODING
Definition: ble_gapc.h:119
ble_gap_set_conn_cte_req_enable_t::cte_req_len
uint8_t cte_req_len
Definition: ble_gapc.h:708
ble_gap_phy_update
uint16_t ble_gap_phy_update(uint8_t conn_idx, uint8_t tx_phys, uint8_t rx_phys, uint8_t phy_opt)
Set the PHY preferences for the connection identified by the connection index.
ble_gap_evt_conn_param_updated_t
Connection parameter updated event for BLE_GAPC_EVT_CONN_PARAM_UPDATED.
Definition: ble_gapc.h:872
ble_gap_per_sync_trans_param_t::skip
uint16_t skip
Definition: ble_gapc.h:661
ble_gap_peer_name_ind_t
Name of peer device indication.
Definition: ble_gapc.h:458
ble_gap_evt_data_length_t::max_rx_octets
uint16_t max_rx_octets
Definition: ble_gapc.h:901
ble_gap_path_loss_threshold_report_t
Path loss threshold reporting info.
Definition: ble_gapc.h:751
ble_gap_evt_subrate_chg_ind_t::subrate_factor
uint16_t subrate_factor
Definition: ble_gapc.h:1000
ble_gap_set_path_loss_report_param_t::min_conn_evt_num
uint16_t min_conn_evt_num
Definition: ble_gapc.h:736
ble_gap_evt_ranging_ind_t::ranging_status
uint8_t ranging_status
Definition: ble_gapc.h:981
BLE_GAP_PATH_LOSS_HIGH
@ BLE_GAP_PATH_LOSS_HIGH
Definition: ble_gapc.h:289
ble_gap_ext_adv_report_ind_t
APP receives the extended advertising report indication info struct.
Definition: ble_gapc.h:440
BLE_GAP_PHY_CODED_S8
@ BLE_GAP_PHY_CODED_S8
Definition: ble_gapc.h:261
BLE_GAP_ADDR_TYPE_PUBLIC
@ BLE_GAP_ADDR_TYPE_PUBLIC
Definition: ble_gapc.h:96
ble_gap_evt_conn_param_update_req_t::interval_max
uint16_t interval_max
Definition: ble_gapc.h:883
ble_gap_evt_conn_iq_report_t::con_evt_cnt
uint16_t con_evt_cnt
Definition: ble_gapc.h:922
ble_gap_evt_conn_param_update_req_t::slave_latency
uint16_t slave_latency
Definition: ble_gapc.h:885
ble_gap_ranging_sample_report_ind_t::nb_sample
uint16_t nb_sample
Definition: ble_gapc.h:789
ble_gap_evt_conn_param_updated_t::slave_latency
uint16_t slave_latency
Definition: ble_gapc.h:874
ble_gap_phy_options_t
ble_gap_phy_options_t
The phy options.
Definition: ble_gapc.h:117
ble_gap_evt_conn_iq_report_t::rssi_antenna_id
uint8_t rssi_antenna_id
Definition: ble_gapc.h:918
ble_gap_evt_connless_iq_report_t::channel_idx
uint8_t channel_idx
Definition: ble_gapc.h:932
ble_gap_bdaddr_t::addr_type
uint8_t addr_type
Definition: ble_gapc.h:322
ble_gap_subrate_chg_ind_t::supervision_timeout
uint16_t supervision_timeout
Definition: ble_gapc.h:825
ble_gap_conn_param_t
The parameter of connection.
Definition: ble_gapc.h:475
ble_gap_ext_adv_report_ind_t::rssi
int8_t rssi
Definition: ble_gapc.h:446
ble_gap_evt_subrate_chg_ind_t::con_latency
uint16_t con_latency
Definition: ble_gapc.h:1001
ble_gap_sync_established_ind_t::phy
uint8_t phy
Definition: ble_gapc.h:427
ble_gap_set_conn_cte_rcv_param_t::num_antenna
uint8_t num_antenna
Definition: ble_gapc.h:698
BLE_GAP_PHY_LE_1MBPS
@ BLE_GAP_PHY_LE_1MBPS
LE 1M PHY preferred for an active link.
Definition: ble_gapc.h:108
ble_gap_antenna_inf_t
antenna information.
Definition: ble_gapc.h:388
ble_error.h
File that contains error codes.
ble_gap_subrate_chg_ind_t::continuation_number
uint16_t continuation_number
Definition: ble_gapc.h:824
BLE_GAP_FEATS_LEN
#define BLE_GAP_FEATS_LEN
Definition: ble_gapc.h:69
ble_gap_evt_conn_iq_report_t::pkt_status
uint8_t pkt_status
Definition: ble_gapc.h:921
ble_gap_path_loss_threshold_report_t::curr_path_loss
uint8_t curr_path_loss
Definition: ble_gapc.h:752
ble_gap_evt_conn_iq_report_t::rx_phy
uint8_t rx_phy
Definition: ble_gapc.h:915
ble_gap_evt_ranging_ind_t
Ranging indication event for BLE_GAPC_EVT_RANGING_IND.
Definition: ble_gapc.h:980
ble_gap_conn_update_param_t
The parameter of update connection.
Definition: ble_gapc.h:487
ble_gap_subrate_chg_ind_t
Subrate change indication.
Definition: ble_gapc.h:821
ble_gap_addr_type_t
ble_gap_addr_type_t
The identity address type.
Definition: ble_gapc.h:95
BLE_GAP_OPCODE_LEPSM_REGISTER
@ BLE_GAP_OPCODE_LEPSM_REGISTER
Definition: ble_gapc.h:212
ble_gap_evt_ranging_sample_report_ind_t::iq_sample_addr
int32_t iq_sample_addr
Definition: ble_gapc.h:988
ble_gap_evt_connless_iq_report_t::nb_samples
uint8_t nb_samples
Definition: ble_gapc.h:939
BLE_GAP_REPORT_TYPE_ADV_EXT
@ BLE_GAP_REPORT_TYPE_ADV_EXT
Definition: ble_gapc.h:142
ble_gapc_evt_t::local_tx_pwr_read
ble_gap_evt_local_tx_pwr_read_ind_t local_tx_pwr_read
Definition: ble_gapc.h:1024
ble_gap_bond_dev_addr_get
uint16_t ble_gap_bond_dev_addr_get(uint8_t conn_idx, ble_gap_bdaddr_t *p_peer_addr)
Get BD address of the bonded device.
ble_gap_adv_report_info_t
ble_gap_adv_report_info_t
Advertising report information.
Definition: ble_gapc.h:151
BLE_GAP_CHNL_MAP_LEN
#define BLE_GAP_CHNL_MAP_LEN
Definition: ble_gapc.h:68
ble_gap_dev_info_get_t
Get device info operation struct.
Definition: ble_gapc.h:412
ble_gap_evt_remote_tx_pwr_read_ind_t
Remote transmit power read indication info event for BLE_GAPC_EVT_REMOTE_TX_POWER_READ.
Definition: ble_gapc.h:955
ble_gap_evt_disconnected_t::reason
uint8_t reason
Definition: ble_gapc.h:851
ble_gap_peer_name_ind_t::peer_addr
ble_gap_addr_t peer_addr
Definition: ble_gapc.h:459
BLE_GAP_HCI_UNSUPPORTED_REMOTE_FEATURE
@ BLE_GAP_HCI_UNSUPPORTED_REMOTE_FEATURE
Definition: ble_gapc.h:193
ble_gap_evt_connected_t::peer_addr
ble_gap_addr_t peer_addr
Definition: ble_gapc.h:844
ble_gap_dev_tx_power_t
TX power info struct.
Definition: ble_gapc.h:340
ble_gap_evt_connected_t::clk_accuracy
uint8_t clk_accuracy
Definition: ble_gapc.h:842
ble_gap_evt_peer_info_t::opcode
uint8_t opcode
Definition: ble_gapc.h:866
BLE_GAP_REPORT_TYPE_SCAN_RSP_EXT
@ BLE_GAP_REPORT_TYPE_SCAN_RSP_EXT
Definition: ble_gapc.h:144
ble_gap_set_conn_cte_req_enable_t
Set connection CTE Request enable info.
Definition: ble_gapc.h:704
ble_gap_le_pkt_size_ind_t::max_rx_octets
uint16_t max_rx_octets
Definition: ble_gapc.h:613
ble_gap_evt_conn_param_update_req_t::sup_timeout
uint16_t sup_timeout
Definition: ble_gapc.h:886
ble_gap_evt_conn_param_updated_t::sup_timeout
uint16_t sup_timeout
Definition: ble_gapc.h:875
BLE_GAP_CRC_ERR2
@ BLE_GAP_CRC_ERR2
Definition: ble_gapc.h:249
BLE_GAP_OPCODE_LEPSM_UNREGISTER
@ BLE_GAP_OPCODE_LEPSM_UNREGISTER
Definition: ble_gapc.h:213
ble_gap_conn_iq_report_t
Connection IQ Report info.
Definition: ble_gapc.h:714
ble_gap_tx_pwr_change_report_t
Transmit power change reporting info.
Definition: ble_gapc.h:741
ble_gap_dev_info_t::dev_tx_power
ble_gap_dev_tx_power_t dev_tx_power
Definition: ble_gapc.h:405
BLE_GAP_REPORT_INFO_CONN_ADV_BIT
@ BLE_GAP_REPORT_INFO_CONN_ADV_BIT
Definition: ble_gapc.h:153
__ARRAY_EMPTY
#define __ARRAY_EMPTY
Definition: gr533x_sys_cfg.h:53
ble_gap_dev_info_t::dev_version
ble_gap_dev_version_ind_t dev_version
Definition: ble_gapc.h:398
ble_gap_connless_iq_report_t::cte_type
uint8_t cte_type
Definition: ble_gapc.h:675
ble_gap_set_path_loss_report_param_t::low_thr
uint8_t low_thr
Definition: ble_gapc.h:734
ble_gap_conn_cte_recv_param_set
uint16_t ble_gap_conn_cte_recv_param_set(uint8_t conn_idx, ble_gap_set_conn_cte_rcv_param_t *param)
Set connection CTE receive parameters.
ble_gap_dev_version_ind_t::manuf_name
uint16_t manuf_name
Definition: ble_gapc.h:309
ble_gap_evt_tx_pwr_change_report_t
Transmit power change reporting info event for BLE_GAPC_EVT_TX_POWER_CHANGE_REPORT.
Definition: ble_gapc.h:963
gapc_set_dev_info_ind_t::info
ble_gapc_set_dev_info_t info
Definition: ble_gapc.h:652
ble_gap_evt_remote_tx_pwr_read_ind_t::flags
uint8_t flags
Definition: ble_gapc.h:958
BLE_GAP_PWR_MIN_LVL
@ BLE_GAP_PWR_MIN_LVL
Definition: ble_gapc.h:280
ble_gap_conn_info_t::chan_sel_algo
uint8_t chan_sel_algo
Definition: ble_gapc.h:532
ble_gap_peer_info_param_t::peer_info
ble_gap_peer_info_t peer_info
Definition: ble_gapc.h:605
BLE_GAP_OPCODE_PER_ADV_LIST_SET
@ BLE_GAP_OPCODE_PER_ADV_LIST_SET
Definition: ble_gapc.h:180
BLE_GAP_OPCODE_WHITELIST_SET
@ BLE_GAP_OPCODE_WHITELIST_SET
Definition: ble_gapc.h:179
ble_gap_update_conn_param_method_set
uint16_t ble_gap_update_conn_param_method_set(uint8_t conn_idx, bool use_l2cap_flag)
Set the method for updating connection parameter.
ble_gap_dev_info_get_t::operation
uint8_t operation
Definition: ble_gapc.h:413
ble_gap_antenna_inf_t::supp_switching_sampl_rates
uint8_t supp_switching_sampl_rates
Definition: ble_gapc.h:389
ble_gap_dft_subrate_param_t::subrate_min
uint16_t subrate_min
Definition: ble_gapc.h:802
BLE_GAP_REPORT_TYPE_PER_ADV
@ BLE_GAP_REPORT_TYPE_PER_ADV
Definition: ble_gapc.h:146
gapc_set_dev_info_ind_t
GAP Device inforamtion write indication.
Definition: ble_gapc.h:650
ble_gap_local_tx_pwr_read_ind_t::max_tx_pwr_lvl
int8_t max_tx_pwr_lvl
Definition: ble_gapc.h:761
BLE_GAP_OPCODE_PEER_RSLV_ADDR_READ
@ BLE_GAP_OPCODE_PEER_RSLV_ADDR_READ
Definition: ble_gapc.h:204
ble_gap_ext_adv_report_ind_t::broadcaster_addr
ble_gap_bdaddr_t broadcaster_addr
Definition: ble_gapc.h:443
gapc_set_dev_info_ind_t::info_type
ble_gap_dev_info_type_t info_type
Definition: ble_gapc.h:651
ble_gap_evt_ranging_sample_report_ind_t::nb_sample
uint16_t nb_sample
Definition: ble_gapc.h:987
ble_gap_evt_connected_t::conn_interval
uint16_t conn_interval
Definition: ble_gapc.h:839
ble_gap_set_path_loss_report_param_t::low_hyst
uint8_t low_hyst
Definition: ble_gapc.h:735
BLE_GAP_HCI_CONN_INTERVAL_UNACCEPTABLE
@ BLE_GAP_HCI_CONN_INTERVAL_UNACCEPTABLE
Definition: ble_gapc.h:195
BLE_GAP_MAX_GDX_RANGING_CH
#define BLE_GAP_MAX_GDX_RANGING_CH
Definition: ble_gapc.h:84
ble_gap_dev_info_get_t::dev_info
ble_gap_dev_info_t dev_info
Definition: ble_gapc.h:414
ble_gap_evt_path_loss_threshold_report_t::zone_entered
uint8_t zone_entered
Definition: ble_gapc.h:975
ble_gap_remote_tx_pwr_read_ind_t::phy
uint8_t phy
Definition: ble_gapc.h:767
BLE_GAP_ADDR_LEN
#define BLE_GAP_ADDR_LEN
Definition: ble_gapc.h:70
ble_gap_ext_adv_report_ind_t::direct_addr
ble_gap_bdaddr_t direct_addr
Definition: ble_gapc.h:444
ble_gap_connless_iq_report_t::pa_evt_cnt
uint16_t pa_evt_cnt
Definition: ble_gapc.h:678
ble_gap_remote_tx_pwr_read_ind_t::tx_pwr
int8_t tx_pwr
Definition: ble_gapc.h:768
ble_gap_local_tx_pwr_read_ind_t::phy
uint8_t phy
Definition: ble_gapc.h:759
gap_conn_cmp_t::con_latency
uint16_t con_latency
Definition: ble_gapc.h:503
ble_gap_local_tx_pwr_read_ind_t::curr_tx_pwr_lvl
int8_t curr_tx_pwr_lvl
Definition: ble_gapc.h:760
ble_gap_conn_param_update
uint16_t ble_gap_conn_param_update(uint8_t conn_idx, const ble_gap_conn_update_param_t *p_conn_param)
Change the Link Layer connection parameters of a connection.
ble_gap_dev_version_ind_t
The struct of device version.
Definition: ble_gapc.h:302
ble_gap_set_conn_cte_rcv_param_t
Set connection CTE receive parameters info.
Definition: ble_gapc.h:695
ble_gap_ranging_param_t::channel_num
uint8_t channel_num
Definition: ble_gapc.h:776
ble_gap_evt_subrate_chg_ind_t::supervision_timeout
uint16_t supervision_timeout
Definition: ble_gapc.h:1003
ble_gap_conn_update_cmp_t
Connection parameter used to update connection parameters.
Definition: ble_gapc.h:467
BLE_GAP_REPORT_INFO_SCAN_ADV_BIT
@ BLE_GAP_REPORT_INFO_SCAN_ADV_BIT
Definition: ble_gapc.h:154
ble_gap_conn_info_param_t
The info of connecting operation.
Definition: ble_gapc.h:538
ble_gap_evt_data_length_t
Data Length Updated event for BLE_GAPC_EVT_DATA_LENGTH_UPDATED.
Definition: ble_gapc.h:898
ble_gap_get_bd_addr_t::bd_addr
ble_gap_bdaddr_t bd_addr
Definition: ble_gapc.h:329
ble_gap_conn_update_param_t::slave_latency
uint16_t slave_latency
Definition: ble_gapc.h:492
ble_gap_conn_cte_rsp_enable_set
uint16_t ble_gap_conn_cte_rsp_enable_set(uint8_t conn_idx, bool enable_flag)
Set connection CTE response enable.
ble_gap_evt_conn_iq_report_t
Connection IQ Report info event for BLE_GAPC_EVT_CONNECT_IQ_REPORT.
Definition: ble_gapc.h:914
ble_gapc_evt_t::ranging_sample_report
ble_gap_evt_ranging_sample_report_ind_t ranging_sample_report
Definition: ble_gapc.h:1029
ble_gap_connless_iq_report_t
Connectionless IQ Report info.
Definition: ble_gapc.h:671
BLE_GAP_PWR_MID_LVL
@ BLE_GAP_PWR_MID_LVL
Definition: ble_gapc.h:279
ble_gap_conn_info_t::phy
ble_gap_le_phy_ind_t phy
Definition: ble_gapc.h:531
ble_gap_param_set_op_id_t
ble_gap_param_set_op_id_t
Operation code used to set param(s).
Definition: ble_gapc.h:177
ble_gap_evt_ranging_cmp_ind_t::ranging_status
uint8_t ranging_status
Definition: ble_gapc.h:994
BLE_GAP_CTE_TYPE_AOD_2US
@ BLE_GAP_CTE_TYPE_AOD_2US
Definition: ble_gapc.h:230
ble_gap_dev_info_t::get_bd_addr
ble_gap_get_bd_addr_t get_bd_addr
Definition: ble_gapc.h:399
ble_gapc_set_dev_info_t::dev_name
ble_gap_dev_name_ind_t dev_name
Definition: ble_gapc.h:643
ble_gap_evt_tx_pwr_change_report_t::flags
uint8_t flags
Definition: ble_gapc.h:967
ble_gap_evt_connected_t::ll_role
ble_gap_ll_role_type_t ll_role
Definition: ble_gapc.h:845
BLE_GAP_REPORT_TYPE_SCAN_RSP_LEG
@ BLE_GAP_REPORT_TYPE_SCAN_RSP_LEG
Definition: ble_gapc.h:145
BLE_GAPC_DEV_NAME
@ BLE_GAPC_DEV_NAME
Definition: ble_gapc.h:219
ble_gap_per_sync_trans_param_set
uint16_t ble_gap_per_sync_trans_param_set(uint8_t conn_idx, uint8_t per_sync_idx, ble_gap_per_sync_trans_param_t *p_per_sync_trans_param)
Set the parameters used for periodic sync transfer.
ble_gapc_evt_t
BLE GAPC event structure.
Definition: ble_gapc.h:1008
ble_gapc_evt_t::connless_iq_report
ble_gap_evt_connless_iq_report_t connless_iq_report
Definition: ble_gapc.h:1023
ble_gap_le_phy_ind_t::tx_phy
uint8_t tx_phy
Definition: ble_gapc.h:522
ble_gap_data_length_update
uint16_t ble_gap_data_length_update(uint8_t conn_idx, uint16_t tx_octects, uint16_t tx_time)
The suggested maximum transmission packet size and maximum packet transmission time to be used for a ...
ble_gap_dev_name_ind_t::length
uint16_t length
Definition: ble_gapc.h:636
ble_gapc_evt_t::ranging_ind
ble_gap_evt_ranging_ind_t ranging_ind
Definition: ble_gapc.h:1028
ble_gap_peer_version_ind_t::compid
uint16_t compid
Definition: ble_gapc.h:546
gap_conn_cmp_t::con_interval
uint16_t con_interval
Definition: ble_gapc.h:502
ble_gap_dev_info_type_t
ble_gap_dev_info_type_t
GAP Device inforamtion write indication.
Definition: ble_gapc.h:218
ble_gap_evt_conn_iq_report_t::slot_dur
uint8_t slot_dur
Definition: ble_gapc.h:920
ble_gap_ranging_ind_t
ranging indication info.
Definition: ble_gapc.h:781
ble_gap_evt_tx_pwr_change_report_t::tx_pwr
int8_t tx_pwr
Definition: ble_gapc.h:966
ble_gapc_evt_t::remote_tx_pwr_read
ble_gap_evt_remote_tx_pwr_read_ind_t remote_tx_pwr_read
Definition: ble_gapc.h:1025
ble_gap_evt_dev_info_set_t
Device Information set event for BLE_GAPC_EVT_DEV_INFO_SET.
Definition: ble_gapc.h:907
ble_gap_disconn_reason_t
ble_gap_disconn_reason_t
The specified reason for terminating a connection.
Definition: ble_gapc.h:188
ble_gap_conn_update_cmp_t::interval
uint16_t interval
Definition: ble_gapc.h:468
ble_gap_con_plan_tag_t::offset
uint32_t offset
Definition: ble_gapc.h:622
ble_gap_conn_info_param_t::info
ble_gap_conn_info_t info
Definition: ble_gapc.h:540
ble_gap_dft_subrate_param_t::subrate_max
uint16_t subrate_max
Definition: ble_gapc.h:803
ble_gap_rslv_addr_read_t::gap_addr
ble_gap_addr_t gap_addr
Definition: ble_gapc.h:421
BLE_GAP_CRC_ERR1
@ BLE_GAP_CRC_ERR1
Definition: ble_gapc.h:248
ble_gap_dft_subrate_param_t::superv_timeout
uint16_t superv_timeout
Definition: ble_gapc.h:806
ble_gap_le_phy_ind_t
PHY info.
Definition: ble_gapc.h:521
ble_gap_conn_info_param_t::opcode
uint8_t opcode
Definition: ble_gapc.h:539
gap_conn_cmp_t::sup_to
uint16_t sup_to
Definition: ble_gapc.h:504
ble_gap_conn_iq_report_t::data_channel_idx
uint8_t data_channel_idx
Definition: ble_gapc.h:716
ble_gap_dev_tx_power_t::min_tx_pwr
int8_t min_tx_pwr
Definition: ble_gapc.h:341
ble_gap_sync_established_ind_t::clk_acc
uint8_t clk_acc
Definition: ble_gapc.h:430
ble_gap_peer_info_param_t::opcode
uint8_t opcode
Definition: ble_gapc.h:604
ble_gap_evt_peer_name_get_t::name
uint8_t * name
Definition: ble_gapc.h:860
ble_gap_ll_role_type_t
ble_gap_ll_role_type_t
Device role of LL layer type.
Definition: ble_gapc.h:168
ble_gap_tx_pwr_change_report_t::reason
uint8_t reason
Definition: ble_gapc.h:742
ble_gap_dev_version_ind_t::lmp_ver
uint8_t lmp_ver
Definition: ble_gapc.h:304
ble_gap_evt_connected_t::slave_latency
uint16_t slave_latency
Definition: ble_gapc.h:840
ble_gap_evt_data_length_t::max_tx_time
uint16_t max_tx_time
Definition: ble_gapc.h:900
ble_gap_ext_adv_report_ind_t::adv_info
uint8_t adv_info
Definition: ble_gapc.h:442
ble_gap_dev_version_ind_t::host_subver
uint16_t host_subver
Definition: ble_gapc.h:308
ble_gap_evt_conn_info_t::opcode
uint8_t opcode
Definition: ble_gapc.h:892
BLE_GAP_PHY_OPT_NO_CODING
@ BLE_GAP_PHY_OPT_NO_CODING
Definition: ble_gapc.h:118
ble_gap_per_sync_trans_param_t::sync_to
uint16_t sync_to
Definition: ble_gapc.h:663
BLE_GAP_LL_ROLE_SLAVE
@ BLE_GAP_LL_ROLE_SLAVE
Definition: ble_gapc.h:170
ble_gap_per_adv_set_info_trans
uint16_t ble_gap_per_adv_set_info_trans(uint8_t conn_idx, uint8_t per_adv_idx, uint16_t service_data)
Send synchronization information about the periodic advertising in an advertising set to a connected ...
ble_gap_max_data_len_t::suppted_max_tx_octets
uint16_t suppted_max_tx_octets
Definition: ble_gapc.h:348
BLE_GAP_PHY_LE_2MBPS
@ BLE_GAP_PHY_LE_2MBPS
LE 2M PHY preferred for an active link.
Definition: ble_gapc.h:110
ble_gap_conn_param_t::interval_max
uint16_t interval_max
Definition: ble_gapc.h:478
BLE_GAPC_DEV_APPEARANCE
@ BLE_GAPC_DEV_APPEARANCE
Definition: ble_gapc.h:220
ble_gap_nb_adv_sets_t::nb_adv_sets
uint8_t nb_adv_sets
Definition: ble_gapc.h:370
ble_gap_get_peer_info_op_t
ble_gap_get_peer_info_op_t
The operation code used to get peer device info.
Definition: ble_gapc.h:134
ble_gap_sugg_dflt_data_len_t
Suggested default data length info.
Definition: ble_gapc.h:360
ble_gap_set_conn_cte_trans_param_t
Set connection CTE transmit parameters info.
Definition: ble_gapc.h:687
ble_gap_local_tx_pwr_read_ind_t
Local transmit power read indication info.
Definition: ble_gapc.h:758
ble_gap_conn_iq_report_t::pkt_status
uint8_t pkt_status
Definition: ble_gapc.h:721
BLE_GAP_PHY_CODED
@ BLE_GAP_PHY_CODED
Definition: ble_gapc.h:260
ble_gap_evt_conn_param_update_req_t::interval_min
uint16_t interval_min
Definition: ble_gapc.h:881
ble_gap_evt_conn_param_update_req_t
Connection parameter update request event for BLE_GAPC_EVT_CONN_PARAM_UPDATE_REQ.
Definition: ble_gapc.h:880
ble_gap_ext_adv_report_ind_t::period_adv_intv
uint16_t period_adv_intv
Definition: ble_gapc.h:450
BLE_GAP_LL_ROLE_MASTER
@ BLE_GAP_LL_ROLE_MASTER
Definition: ble_gapc.h:169
ble_gap_tx_pwr_change_report_t::delta
int8_t delta
Definition: ble_gapc.h:746
ble_gap_ranging_sample_report_ind_t
ranging sample report info.
Definition: ble_gapc.h:787
ble_gap_evt_local_tx_pwr_read_ind_t::phy
uint8_t phy
Definition: ble_gapc.h:948
ble_gap_evt_phy_update_t::tx_phy
uint8_t tx_phy
Definition: ble_gapc.h:831
ble_gap_max_data_len_t
Max data length info struct.
Definition: ble_gapc.h:347
BLE_GAP_PWR_LOCAL_TX_CHG
@ BLE_GAP_PWR_LOCAL_TX_CHG
Definition: ble_gapc.h:270
BLE_GAP_INSUFFI_RESOURCE
@ BLE_GAP_INSUFFI_RESOURCE
Definition: ble_gapc.h:250
ble_gap_disconnect
uint16_t ble_gap_disconnect(uint8_t conn_idx)
Terminate an existing connection.
ble_gap_conn_update_param_t::sup_timeout
uint16_t sup_timeout
Definition: ble_gapc.h:493
ble_gap_peer_info_t::peer_version
ble_gap_peer_version_ind_t peer_version
Definition: ble_gapc.h:597
BLE_GAP_CRC_OK
@ BLE_GAP_CRC_OK
Definition: ble_gapc.h:247
ble_gap_max_data_len_t::suppted_max_rx_octets
uint16_t suppted_max_rx_octets
Definition: ble_gapc.h:352
ble_gap_set_pref_slave_evt_dur_param_t::single_tx
uint8_t single_tx
Definition: ble_gapc.h:630
ble_gap_set_conn_cte_rcv_param_t::slot_durations
uint8_t slot_durations
Definition: ble_gapc.h:697
ble_gap_evt_conn_iq_report_t::data_channel_idx
uint8_t data_channel_idx
Definition: ble_gapc.h:916
ble_gap_evt_conn_info_t::info
ble_gap_conn_info_t info
Definition: ble_gapc.h:893
ble_gap_tx_pwr_change_report_t::flags
uint8_t flags
Definition: ble_gapc.h:745
ble_gap_pwr_lvl_flag_t
ble_gap_pwr_lvl_flag_t
Transmit Power level flag.
Definition: ble_gapc.h:278
ble_gap_get_local_addr_by_conidx
void ble_gap_get_local_addr_by_conidx(uint8_t conidx, uint8_t *p_addr)
Get BD address of the local device by the conidx.
ble_gap_conn_iq_report_t::rssi
int16_t rssi
Definition: ble_gapc.h:717
ble_gap_bdaddr_t::gap_addr
ble_gap_addr_t gap_addr
Definition: ble_gapc.h:321
ble_gap_conn_param_update_reply
uint16_t ble_gap_conn_param_update_reply(uint8_t conn_idx, bool accept)
Connection param update reply to peer device.
ble_gap_antenna_inf_t::antennae_num
uint8_t antennae_num
Definition: ble_gapc.h:390
ble_gap_evt_connless_iq_report_t::cte_type
uint8_t cte_type
Definition: ble_gapc.h:935
ble_gap_set_conn_cte_req_enable_t::cte_req_interval
uint16_t cte_req_interval
Definition: ble_gapc.h:705
BLE_GAP_HCI_AUTHENTICATION_FAILURE
@ BLE_GAP_HCI_AUTHENTICATION_FAILURE
Definition: ble_gapc.h:189
ble_gap_set_conn_cte_rcv_param_t::sampling_enable
bool sampling_enable
Definition: ble_gapc.h:696
ble_gap_chnl_map_t
Channel map structure.
Definition: ble_gapc.h:514
ble_gap_dev_adv_tx_power_t::power_lvl
int8_t power_lvl
Definition: ble_gapc.h:335
ble_gap_evt_subrate_chg_ind_t
Subrate change indication event for BLE_GAPC_EVT_SUBRATE_CHANGE_IND.
Definition: ble_gapc.h:999
ble_gap_evt_tx_pwr_change_report_t::phy
uint8_t phy
Definition: ble_gapc.h:965
BLE_GAP_PHY_1M
@ BLE_GAP_PHY_1M
Definition: ble_gapc.h:258
ble_gapc_evt_t::data_length
ble_gap_evt_data_length_t data_length
Definition: ble_gapc.h:1020
ble_gap_iq_report_status_t
ble_gap_iq_report_status_t
Status of IQ report packet.
Definition: ble_gapc.h:246
ble_gap_evt_remote_tx_pwr_read_ind_t::phy
uint8_t phy
Definition: ble_gapc.h:956
ble_gap_connless_iq_report_t::pkt_status
uint8_t pkt_status
Definition: ble_gapc.h:677
ble_gap_max_adv_data_len_ind_t
Maximum advertising data length info.
Definition: ble_gapc.h:375
ble_gap_evt_peer_name_get_t::addr_type
uint8_t addr_type
Definition: ble_gapc.h:858
ble_gap_dev_info_t::nb_adv_sets
ble_gap_nb_adv_sets_t nb_adv_sets
Definition: ble_gapc.h:403
ble_gapc_evt_t::index
uint8_t index
Definition: ble_gapc.h:1009
ble_gap_le_pkt_size_ind_t::max_tx_time
uint16_t max_tx_time
Definition: ble_gapc.h:612
ble_gap_sugg_dflt_data_len_t::suggted_max_tx_time
uint16_t suggted_max_tx_time
Definition: ble_gapc.h:363
ble_gap_ranging_sample_report_ind_t::status
uint8_t status
Definition: ble_gapc.h:788
ble_gap_conn_update_param_t::ce_len
uint16_t ce_len
Definition: ble_gapc.h:494
ble_gap_sync_established_ind_t::adv_sid
uint8_t adv_sid
Definition: ble_gapc.h:429
ble_gap_set_conn_cte_trans_param_t::cte_type
uint8_t cte_type
Definition: ble_gapc.h:688
BLE_GAP_REPORT_INFO_COMPLETE_BIT
@ BLE_GAP_REPORT_INFO_COMPLETE_BIT
Definition: ble_gapc.h:152
ble_gap_ranging_cmp_ind_t
ranging complete info.
Definition: ble_gapc.h:795
ble_gap_path_loss_zone_t
ble_gap_path_loss_zone_t
Path Loss zones. HCI:7.8.118.
Definition: ble_gapc.h:286
ble_gap_set_path_loss_report_param_t
Set path loss reporting parameter info.
Definition: ble_gapc.h:731
ble_gap_ext_adv_report_ind_t::phy_prim
uint8_t phy_prim
Definition: ble_gapc.h:447
ble_gap_dev_info_t::sugg_dflt_data_len
ble_gap_sugg_dflt_data_len_t sugg_dflt_data_len
Definition: ble_gapc.h:401
ble_gapc_evt_t::subrate_chg_ind
ble_gap_evt_subrate_chg_ind_t subrate_chg_ind
Definition: ble_gapc.h:1031
BLE_GAP_HCI_REMOTE_USER_TERMINATED_CONNECTION
@ BLE_GAP_HCI_REMOTE_USER_TERMINATED_CONNECTION
Definition: ble_gapc.h:190
BLE_GAP_GET_CON_RSSI
@ BLE_GAP_GET_CON_RSSI
Definition: ble_gapc.h:126
ble_gap_set_pref_slave_evt_dur_param_t::duration
uint16_t duration
Definition: ble_gapc.h:629
ble_gap_evt_phy_update_t::rx_phy
uint8_t rx_phy
Definition: ble_gapc.h:832
ble_gap_ext_adv_report_ind_t::tx_pwr
int8_t tx_pwr
Definition: ble_gapc.h:445
ble_gap_subrate_req_t
Subrate Request command param.
Definition: ble_gapc.h:811
BLE_GAP_PHY_ANY
@ BLE_GAP_PHY_ANY
No preferred PHY.
Definition: ble_gapc.h:106
ble_gap_set_path_loss_report_param_t::high_hyst
uint8_t high_hyst
Definition: ble_gapc.h:733
ble_gap_dev_info_t::max_data_len
ble_gap_max_data_len_t max_data_len
Definition: ble_gapc.h:402
ble_gap_evt_connected_t::conn_handle
uint16_t conn_handle
Definition: ble_gapc.h:838
BLE_GAP_PHY_2M
@ BLE_GAP_PHY_2M
Definition: ble_gapc.h:259
ble_gapc_evt_t::conn_info
ble_gap_evt_conn_info_t conn_info
Definition: ble_gapc.h:1019
BLE_GAP_GET_CON_CHANNEL_MAP
@ BLE_GAP_GET_CON_CHANNEL_MAP
Definition: ble_gapc.h:127
BLE_GAP_OPCODE_PRIVACY_MODE_SET
@ BLE_GAP_OPCODE_PRIVACY_MODE_SET
Definition: ble_gapc.h:181
ble_gap_con_plan_consult
uint16_t ble_gap_con_plan_consult(uint8_t *p_act_num, ble_gap_con_plan_tag_t **p_conn_plan_arr)
Consult BLE connection activity plan situation function.
ble_gap_evt_connless_iq_report_t::pa_evt_cnt
uint16_t pa_evt_cnt
Definition: ble_gapc.h:938
ble_gap_evt_remote_tx_pwr_read_ind_t::tx_pwr
int8_t tx_pwr
Definition: ble_gapc.h:957
ble_gap_evt_connless_iq_report_t
Connectionless IQ Report info event for BLE_GAPC_EVT_CONNECTLESS_IQ_REPORT.
Definition: ble_gapc.h:931
ble_gap_evt_peer_name_get_t::name_len
uint8_t name_len
Definition: ble_gapc.h:859
ble_gap_sync_established_ind_t::report_flag
bool report_flag
Definition: ble_gapc.h:434
ble_gap_subrate_req_t::continuation_num
uint16_t continuation_num
Definition: ble_gapc.h:815
ble_gap_dev_version_ind_t::lmp_subver
uint16_t lmp_subver
Definition: ble_gapc.h:307
ble_gap_sync_established_ind_t::intv
uint16_t intv
Definition: ble_gapc.h:428