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