ble_gapc.h
Go to the documentation of this file.
1
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
68 #define GAP_CHNL_MAP_LEN 0x05
69 #define GAP_FEATS_LEN 0x08
70 #define GAP_ADDR_LEN 0x06
71 #define GAP_INVALID_CONN_INDEX 0xFF
75 #define BLE_GAP_ADDR_TYPE_PUBLIC 0x00
76 #define BLE_GAP_ADDR_TYPE_RANDOM_STATIC 0x01
81 #define PHY_OPT_NO_CODING 0x00
82 #define PHY_OPT_S2_CODING 0x01
83 #define PHY_OPT_S8_CODING 0x02
93 typedef enum
94 {
95 GAP_GET_CON_RSSI = 0,
96 GAP_GET_CON_CHANNEL_MAP,
97 GAP_GET_PHY,
98 GAP_GET_CHAN_SEL_ALGO
99 } gap_get_conn_info_op_t;
100
102 typedef enum
103 {
104 GAP_GET_PEER_VERSION = 0,
105 GAP_GET_PEER_FEATURES
106 } gap_get_peer_info_op_t;
107
109 typedef enum
110 {
111 GAP_REPORT_TYPE_ADV_EXT = 0,
112 GAP_REPORT_TYPE_ADV_LEG,
113 GAP_REPORT_TYPE_SCAN_RSP_EXT,
114 GAP_REPORT_TYPE_SCAN_RSP_LEG,
115 GAP_REPORT_TYPE_PER_ADV,
116 } gap_adv_report_type_t;
117
119 typedef enum
120 {
121 GAP_REPORT_INFO_COMPLETE_BIT = (1 << 0),
122 GAP_REPORT_INFO_CONN_ADV_BIT = (1 << 1),
123 GAP_REPORT_INFO_SCAN_ADV_BIT = (1 << 2),
124 GAP_REPORT_INFO_DIR_ADV_BIT = (1 << 3),
125 } gap_adv_report_info_t;
126
128 typedef enum
129 {
130 GAP_STOPPED_REASON_TIMEOUT = 0,
131 GAP_STOPPED_REASON_ON_USER,
132 GAP_STOPPED_REASON_CONN_EST
133 } gap_stopped_reason_t;
134
136 typedef enum
137 {
138 GAP_LL_ROLE_MASTER = 0,
139 GAP_LL_ROLE_SLAVE = 1,
140 } gap_ll_role_type_t;
141
145 typedef enum
146 {
147 GAP_OPCODE_CHNL_MAP_SET,
148 GAP_OPCODE_WHITELIST_SET,
149 GAP_OPCODE_PER_ADV_LIST_SET,
150 GAP_OPCODE_PRIVACY_MODE_SET,
151 } gap_param_set_op_id_t;
152
156 typedef enum
157 {
158 GAP_OPCODE_LOCAL_RSLV_ADDR_READ,
159 GAP_OPCODE_PEER_RSLV_ADDR_READ,
160 } gap_rslv_addr_read_op_id_t;
161
165 typedef enum
166 {
167 GAP_OPCODE_LEPSM_REGISTER,
168 GAP_OPCODE_LEPSM_UNREGISTER,
169 } gap_psm_manager_op_id_t;
170
174 typedef enum
175 {
176 GAP_HCI_AUTHENTICATION_FAILURE = 0x05,
177 GAP_HCI_REMOTE_USER_TERMINATED_CONNECTION = 0x13,
178 GAP_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES = 0x14,
179 GAP_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF = 0x15,
180 GAP_HCI_UNSUPPORTED_REMOTE_FEATURE = 0x1A,
181 GAP_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED = 0X29,
182 GAP_HCI_CONN_INTERVAL_UNACCEPTABLE = 0x3B,
183 } gap_disconn_reason_t;
184
193 typedef struct
194 {
195 uint8_t hci_ver;
196 uint8_t lmp_ver;
197 uint8_t host_ver;
198 uint16_t hci_subver;
199 uint16_t lmp_subver;
200 uint16_t host_subver;
201 uint16_t manuf_name;
202 } gap_dev_version_ind_t;
203
205 typedef struct
206 {
207 uint8_t addr[GAP_ADDR_LEN];
208 } gap_addr_t;
209
211 typedef struct
212 {
213 gap_addr_t gap_addr;
214 uint8_t addr_type;
215 } gap_bdaddr_t;
216
218 typedef struct
219 {
220 uint8_t index;
221 gap_bdaddr_t bd_addr;
222 } gap_get_bd_addr_t;
223
225 typedef struct
226 {
227 int8_t power_lvl;
228 } gap_dev_adv_tx_power_t;
229
231 typedef struct
232 {
233 int8_t min_tx_pwr;
234 int8_t max_tx_pwr;
235 } gap_dev_tx_power_t;
236
238 typedef struct
239 {
240 uint16_t suppted_max_tx_octets;
242 uint16_t suppted_max_tx_time;
244 uint16_t suppted_max_rx_octets;
246 uint16_t suppted_max_rx_time;
248 } gap_max_data_len_t;
249
251 typedef struct
252 {
253 uint16_t suggted_max_tx_octets;
255 uint16_t suggted_max_tx_time;
257 } gap_sugg_dflt_data_len_t;
258
260 typedef struct
261 {
262 uint8_t nb_adv_sets;
263 } gap_nb_adv_sets_t;
264
266 typedef struct
267 {
268 uint16_t length;
269 } gap_max_adv_data_len_ind_t;
270
272 typedef struct
273 {
274 uint16_t tx_path_comp;
275 uint16_t rx_path_comp;
276 } gap_dev_rf_path_comp_ind_t;
277
279 typedef union
280 {
281 gap_dev_version_ind_t dev_version;
282 gap_get_bd_addr_t get_bd_addr;
283 gap_dev_adv_tx_power_t adv_tx_power;
284 gap_sugg_dflt_data_len_t sugg_dflt_data_len;
285 gap_max_data_len_t max_data_len;
286 gap_nb_adv_sets_t nb_adv_sets;
287 gap_max_adv_data_len_ind_t max_adv_data_len;
288 gap_dev_tx_power_t dev_tx_power;
289 gap_dev_rf_path_comp_ind_t dev_rf_path_comp;
290 } gap_dev_info_t;
291
293 typedef struct
294 {
295 uint8_t operation;
296 gap_dev_info_t dev_info;
297 } gap_dev_info_get_t;
298
300 typedef struct
301 {
302 uint8_t op_code;
303 gap_addr_t gap_addr;
304 } gap_rslv_addr_read_t;
305
307 typedef struct
308 {
309 uint8_t phy;
310 uint16_t intv;
311 uint8_t adv_sid;
312 uint8_t clk_acc;
313 gap_bdaddr_t bd_addr;
314 uint16_t sync_hdl;
315 } gap_sync_established_ind_t;
316
318 typedef struct
319 {
320 uint8_t adv_type;
321 uint8_t adv_info;
322 gap_bdaddr_t broadcaster_addr;
323 gap_bdaddr_t direct_addr;
324 int8_t tx_pwr;
325 int8_t rssi;
326 uint8_t phy_prim;
327 uint8_t phy_second;
328 uint8_t adv_sid;
329 uint16_t period_adv_intv;
330 uint8_t per_sync_idx;
331 uint16_t length;
332 uint8_t data[__ARRAY_EMPTY];
333 } gap_ext_adv_report_ind_t;
334
336 typedef struct
337 {
338 gap_addr_t peer_addr;
339 uint8_t addr_type;
340 uint8_t name_len;
341 uint8_t name[__ARRAY_EMPTY];
342 } gap_peer_name_ind_t;
343
345 typedef struct
346 {
347 uint16_t interval;
348 uint16_t latency;
349 uint16_t sup_timeout;
350 } gap_conn_update_cmp_t;
351
353 typedef struct
354 {
355 uint16_t interval_min;
357 uint16_t interval_max;
359 uint16_t slave_latency;
360 uint16_t sup_timeout;
361 } gap_conn_param_t;
362
364 typedef struct
365 {
366 uint16_t interval_min;
368 uint16_t interval_max;
370 uint16_t slave_latency;
371 uint16_t sup_timeout;
372 uint16_t ce_len;
374 } gap_conn_update_param_t;
375
377 typedef struct
378 {
379 uint16_t conhdl;
380 uint16_t con_interval;
381 uint16_t con_latency;
382 uint16_t sup_to;
383 uint8_t clk_accuracy;
385 uint8_t peer_addr_type;
386 gap_addr_t peer_addr;
387 gap_ll_role_type_t ll_role;
388 } gap_conn_cmp_t;
389
391 typedef struct
392 {
393 uint8_t map[GAP_CHNL_MAP_LEN];
395 } gap_chnl_map_t;
396
398 typedef struct
399 {
400 uint8_t tx_phy;
401 uint8_t rx_phy;
402 } gap_le_phy_ind_t;
403
405 typedef union
406 {
407 int8_t rssi;
408 gap_chnl_map_t chnl_map;
409 gap_le_phy_ind_t phy;
410 uint8_t chan_sel_algo;
412 } gap_conn_info_t;
413
415 typedef struct
416 {
417 uint8_t opcode;
418 gap_conn_info_t info;
419 } gap_conn_info_param_t;
420
422 typedef struct
423 {
424 uint16_t compid;
425 uint16_t lmp_subvers;
426 uint8_t lmp_vers;
427 } gap_peer_version_ind_t;
428
430 typedef struct
431 {
432 uint8_t features[GAP_FEATS_LEN];
454 }gap_peer_features_ind_t;
455
457 typedef union
458 {
459 gap_peer_version_ind_t peer_version;
460 gap_peer_features_ind_t peer_features;
461 } gap_peer_info_t;
462
464 typedef struct
465 {
466 uint8_t opcode;
467 gap_peer_info_t peer_info;
468 } gap_peer_info_param_t;
469
471 typedef struct
472 {
473 uint16_t max_tx_octets;
474 uint16_t max_tx_time;
475 uint16_t max_rx_octets;
476 uint16_t max_rx_time;
477 } gap_le_pkt_size_ind_t;
478
480 typedef struct
481 {
482 uint16_t conn_idx;
483 uint32_t interval;
484 uint32_t offset;
485 uint32_t duration;
486 } gap_con_plan_tag_t;
487
489 typedef struct
490 {
491 uint16_t duration;
492 uint8_t single_tx;
493 } gap_set_pref_slave_evt_dur_param_t;
494
496 typedef void (*app_ble_init_cmp_cb_t)(void);
497
499 typedef struct
500 {
501 // ----------------------------------------------------------------------------------
502 // ------------------------- Common Callbacks ------------------------------------
503 // ----------------------------------------------------------------------------------
504
513 void (*app_gap_param_set_cb)(uint8_t status, const gap_param_set_op_id_t set_param_op);
514
523 void (*app_gap_psm_manager_cb)(uint8_t status, const gap_psm_manager_op_id_t psm_op);
524
534 void (*app_gap_phy_update_cb)(uint8_t conn_idx, uint8_t status, const gap_le_phy_ind_t *p_phy);
535
544 void (*app_gap_dev_info_get_cb)(uint8_t status, const gap_dev_info_get_t* p_dev_info);
545
546 // ----------------------------------------------------------------------------------
547 // ------------------------- Advertising Callbacks ----------------------------------
548 // ----------------------------------------------------------------------------------
549
558 void (*app_gap_adv_start_cb)(uint8_t inst_idx, uint8_t status);
559
569 void (*app_gap_adv_stop_cb)(uint8_t inst_idx, uint8_t status, gap_stopped_reason_t adv_stop_reason);
570
579 void (*app_gap_scan_req_ind_cb)(uint8_t inst_idx, const gap_bdaddr_t *p_scanner_addr);
580
589 void (*app_gap_adv_data_update_cb)(uint8_t inst_idx, uint8_t status);
590
591 // ----------------------------------------------------------------------------------
592 // -------------------- Scanning/Periodic Synchronization Callbacks ------------------------
593 // ----------------------------------------------------------------------------------
594
602 void (*app_gap_scan_start_cb)(uint8_t status);
603
612 void (*app_gap_scan_stop_cb)(uint8_t status, gap_stopped_reason_t scan_stop_reason);
613
621 void (*app_gap_adv_report_ind_cb)(const gap_ext_adv_report_ind_t *p_adv_report);
622
632 void (*app_gap_sync_establish_cb)(uint8_t inst_idx, uint8_t status, const gap_sync_established_ind_t *p_sync_established_info);
633
642 void (*app_gap_stop_sync_cb)(uint8_t inst_idx, uint8_t status);
643
651 void (*app_gap_sync_lost_cb)(uint8_t inst_idx);
652
653 // ----------------------------------------------------------------------------------
654 // ------------------------- Initiating Callbacks --------------------------------------
655 // ----------------------------------------------------------------------------------
656
666 void (*app_gap_connect_cb)(uint8_t conn_idx, uint8_t status, const gap_conn_cmp_t *p_conn_param);
667
677 void (*app_gap_disconnect_cb)(uint8_t conn_idx, uint8_t status, uint8_t reason);
678
686 void (*app_gap_connect_cancel_cb)(uint8_t status);
687
694 void (*app_gap_auto_connection_timeout_cb)(void);
695
704 void (*app_gap_peer_name_ind_cb)(uint8_t conn_idx, const gap_peer_name_ind_t *p_peer_name);
705
706 // ----------------------------------------------------------------------------------
707 // ------------------------- Connection Control Callbacks ------------------------------
708 // ----------------------------------------------------------------------------------
709
719 void (*app_gap_connection_update_cb)(uint8_t conn_idx, uint8_t status, const gap_conn_update_cmp_t *p_conn_param_update_info);
720
729 void (*app_gap_connection_update_req_cb)(uint8_t conn_idx, const gap_conn_param_t *p_conn_param_update_req);
730
740 void (*app_gap_connection_info_get_cb)(uint8_t conn_idx, uint8_t status, const gap_conn_info_param_t *p_conn_info);
741
751 void (*app_gap_peer_info_get_cb)(uint8_t conn_idx, uint8_t status, const gap_peer_info_param_t *p_peer_dev_info);
752
762 void (*app_gap_le_pkt_size_info_cb)(uint8_t conn_idx, uint8_t status, const gap_le_pkt_size_ind_t *p_supported_data_length_size);
763
772 void (*app_gap_rslv_addr_read_cb)(uint8_t status, const gap_rslv_addr_read_t *p_read_rslv_addr);
773
774 }gap_cb_fun_t;
775
795 uint16_t ble_gap_disconnect(uint8_t conn_idx);
796
811 uint16_t ble_gap_disconnect_with_reason(uint8_t conn_idx, gap_disconn_reason_t reason);
812
828 uint16_t ble_gap_conn_param_update (uint8_t conn_idx, const gap_conn_update_param_t *p_conn_param);
829
842 uint16_t ble_gap_latency_set(uint8_t conn_idx, uint16_t latency);
843
856 uint16_t ble_gap_con_plan_consult(uint8_t *p_act_num, gap_con_plan_tag_t **p_conn_plan_arr);
857
874 uint16_t ble_gap_conn_param_update_reply(uint8_t conn_idx, bool accept);
875
892 uint16_t ble_gap_data_length_update(uint8_t conn_idx, uint16_t tx_octects , uint16_t tx_time);
893
909 uint16_t ble_gap_phy_update(uint8_t conn_idx, uint8_t tx_phys , uint8_t rx_phys, uint8_t phy_opt);
910
925 uint16_t ble_gap_conn_info_get(uint8_t conn_idx, gap_get_conn_info_op_t opcode);
926
941 uint16_t ble_gap_peer_info_get(uint8_t conn_idx, gap_get_peer_info_op_t opcode);
942
945 #endif
946
gap_max_data_len_t::suppted_max_rx_octets
uint16_t suppted_max_rx_octets
Definition: ble_gapc.h:244
gap_nb_adv_sets_t::nb_adv_sets
uint8_t nb_adv_sets
Definition: ble_gapc.h:262
GAP_HCI_AUTHENTICATION_FAILURE
@ GAP_HCI_AUTHENTICATION_FAILURE
Definition: ble_gapc.h:176
gap_dev_version_ind_t
The struct of device version.
Definition: ble_gapc.h:194
GAP_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES
@ GAP_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES
Definition: ble_gapc.h:178
GAP_LL_ROLE_SLAVE
@ GAP_LL_ROLE_SLAVE
Definition: ble_gapc.h:139
gap_peer_info_param_t::peer_info
gap_peer_info_t peer_info
Definition: ble_gapc.h:467
gap_max_data_len_t::suppted_max_tx_time
uint16_t suppted_max_tx_time
Definition: ble_gapc.h:242
gap_peer_version_ind_t
Peer version info.
Definition: ble_gapc.h:423
gap_con_plan_tag_t
The Structure for BLE Connection Arrangement.
Definition: ble_gapc.h:481
gap_peer_info_t
LE peer info.
Definition: ble_gapc.h:458
__ARRAY_EMPTY
#define __ARRAY_EMPTY
Definition: gr55xx_sys_cfg.h:57
gap_sugg_dflt_data_len_t
Suggested default data length info.
Definition: ble_gapc.h:252
gap_bdaddr_t::gap_addr
gap_addr_t gap_addr
Definition: ble_gapc.h:213
gap_sugg_dflt_data_len_t::suggted_max_tx_octets
uint16_t suggted_max_tx_octets
Definition: ble_gapc.h:253
GAP_CHNL_MAP_LEN
#define GAP_CHNL_MAP_LEN
Definition: ble_gapc.h:68
gap_conn_cmp_t::conhdl
uint16_t conhdl
Definition: ble_gapc.h:379
gap_con_plan_tag_t::conn_idx
uint16_t conn_idx
Definition: ble_gapc.h:482
gap_ext_adv_report_ind_t::phy_prim
uint8_t phy_prim
Definition: ble_gapc.h:326
gap_sync_established_ind_t::phy
uint8_t phy
Definition: ble_gapc.h:309
GAP_REPORT_TYPE_ADV_EXT
@ GAP_REPORT_TYPE_ADV_EXT
Definition: ble_gapc.h:111
gap_dev_version_ind_t::hci_ver
uint8_t hci_ver
Definition: ble_gapc.h:195
GAP_LL_ROLE_MASTER
@ GAP_LL_ROLE_MASTER
Definition: ble_gapc.h:138
gap_peer_version_ind_t::lmp_subvers
uint16_t lmp_subvers
Definition: ble_gapc.h:425
GAP_OPCODE_PER_ADV_LIST_SET
@ GAP_OPCODE_PER_ADV_LIST_SET
Definition: ble_gapc.h:149
gap_peer_version_ind_t::lmp_vers
uint8_t lmp_vers
Definition: ble_gapc.h:426
gap_ext_adv_report_ind_t::length
uint16_t length
Definition: ble_gapc.h:331
gap_get_peer_info_op_t
gap_get_peer_info_op_t
The operation code used to get peer device info.
Definition: ble_gapc.h:103
gap_dev_version_ind_t::lmp_ver
uint8_t lmp_ver
Definition: ble_gapc.h:196
gap_peer_info_param_t
Get peer info operation struct.
Definition: ble_gapc.h:465
gap_le_pkt_size_ind_t
Supported data length size Indication.
Definition: ble_gapc.h:472
gap_dev_rf_path_comp_ind_t::rx_path_comp
uint16_t rx_path_comp
Definition: ble_gapc.h:275
gap_sync_established_ind_t::bd_addr
gap_bdaddr_t bd_addr
Definition: ble_gapc.h:313
gap_ext_adv_report_ind_t::phy_second
uint8_t phy_second
Definition: ble_gapc.h:327
gap_max_data_len_t
Max data length info struct.
Definition: ble_gapc.h:239
gap_psm_manager_op_id_t
gap_psm_manager_op_id_t
Operation code used for LEPSM manager.
Definition: ble_gapc.h:166
GAP_GET_PEER_FEATURES
@ GAP_GET_PEER_FEATURES
Definition: ble_gapc.h:105
gap_ext_adv_report_ind_t::direct_addr
gap_bdaddr_t direct_addr
Definition: ble_gapc.h:323
gap_ext_adv_report_ind_t::broadcaster_addr
gap_bdaddr_t broadcaster_addr
Definition: ble_gapc.h:322
gap_adv_report_type_t
gap_adv_report_type_t
Advertising report type.
Definition: ble_gapc.h:110
GAP_REPORT_TYPE_SCAN_RSP_EXT
@ GAP_REPORT_TYPE_SCAN_RSP_EXT
Definition: ble_gapc.h:113
gap_conn_info_param_t
The info of connecting operation.
Definition: ble_gapc.h:416
gap_ext_adv_report_ind_t::rssi
int8_t rssi
Definition: ble_gapc.h:325
gap_rslv_addr_read_t::op_code
uint8_t op_code
Definition: ble_gapc.h:302
gap_chnl_map_t
Channel map structure.
Definition: ble_gapc.h:392
gap_peer_name_ind_t
Name of peer device indication.
Definition: ble_gapc.h:337
GAP_HCI_REMOTE_USER_TERMINATED_CONNECTION
@ GAP_HCI_REMOTE_USER_TERMINATED_CONNECTION
Definition: ble_gapc.h:177
gap_max_adv_data_len_ind_t::length
uint16_t length
Definition: ble_gapc.h:268
gap_conn_update_cmp_t::latency
uint16_t latency
Definition: ble_gapc.h:348
GAP_OPCODE_WHITELIST_SET
@ GAP_OPCODE_WHITELIST_SET
Definition: ble_gapc.h:148
gap_le_phy_ind_t::rx_phy
uint8_t rx_phy
Definition: ble_gapc.h:401
GAP_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF
@ GAP_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF
Definition: ble_gapc.h:179
app_ble_init_cmp_cb_t
void(* app_ble_init_cmp_cb_t)(void)
BLE initialization completed callback function for application.
Definition: ble_gapc.h:496
GAP_HCI_UNSUPPORTED_REMOTE_FEATURE
@ GAP_HCI_UNSUPPORTED_REMOTE_FEATURE
Definition: ble_gapc.h:180
GAP_OPCODE_LEPSM_REGISTER
@ GAP_OPCODE_LEPSM_REGISTER
Definition: ble_gapc.h:167
gap_le_pkt_size_ind_t::max_tx_octets
uint16_t max_tx_octets
Definition: ble_gapc.h:473
ble_gap_conn_info_get
uint16_t ble_gap_conn_info_get(uint8_t conn_idx, gap_get_conn_info_op_t opcode)
Get the information of the connection.
gap_peer_features_ind_t
LE features info.
Definition: ble_gapc.h:431
gap_ext_adv_report_ind_t::adv_info
uint8_t adv_info
Definition: ble_gapc.h:321
gap_conn_update_cmp_t::sup_timeout
uint16_t sup_timeout
Definition: ble_gapc.h:349
GAP_REPORT_INFO_SCAN_ADV_BIT
@ GAP_REPORT_INFO_SCAN_ADV_BIT
Definition: ble_gapc.h:123
gap_conn_cmp_t::clk_accuracy
uint8_t clk_accuracy
Definition: ble_gapc.h:383
gap_set_pref_slave_evt_dur_param_t::single_tx
uint8_t single_tx
Definition: ble_gapc.h:492
ble_gap_latency_set
uint16_t ble_gap_latency_set(uint8_t conn_idx, uint16_t latency)
Set connection's Latency.
gap_ext_adv_report_ind_t::period_adv_intv
uint16_t period_adv_intv
Definition: ble_gapc.h:329
gap_peer_name_ind_t::peer_addr
gap_addr_t peer_addr
Definition: ble_gapc.h:338
gap_sync_established_ind_t::intv
uint16_t intv
Definition: ble_gapc.h:310
gr55xx_sys_cfg.h
Define the chip configuration.
gap_conn_cmp_t::peer_addr_type
uint8_t peer_addr_type
Definition: ble_gapc.h:385
gap_dev_version_ind_t::host_subver
uint16_t host_subver
Definition: ble_gapc.h:200
gap_bdaddr_t
The struct of broadcast address with broadcast type.
Definition: ble_gapc.h:212
gap_ext_adv_report_ind_t::tx_pwr
int8_t tx_pwr
Definition: ble_gapc.h:324
gap_conn_update_param_t::interval_min
uint16_t interval_min
Definition: ble_gapc.h:366
gap_ext_adv_report_ind_t::adv_sid
uint8_t adv_sid
Definition: ble_gapc.h:328
gap_sync_established_ind_t
Sync established indication.
Definition: ble_gapc.h:308
GAP_GET_CON_CHANNEL_MAP
@ GAP_GET_CON_CHANNEL_MAP
Definition: ble_gapc.h:96
GAP_GET_PEER_VERSION
@ GAP_GET_PEER_VERSION
Definition: ble_gapc.h:104
GAP_REPORT_TYPE_SCAN_RSP_LEG
@ GAP_REPORT_TYPE_SCAN_RSP_LEG
Definition: ble_gapc.h:114
gap_conn_cmp_t
Connection complete info.
Definition: ble_gapc.h:378
gap_peer_info_param_t::opcode
uint8_t opcode
Definition: ble_gapc.h:466
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.
GAP_OPCODE_LEPSM_UNREGISTER
@ GAP_OPCODE_LEPSM_UNREGISTER
Definition: ble_gapc.h:168
gap_dev_tx_power_t::max_tx_pwr
int8_t max_tx_pwr
Definition: ble_gapc.h:234
gap_cb_fun_t
The gap callback function struct.
Definition: ble_gapc.h:500
gap_conn_info_t::rssi
int8_t rssi
Definition: ble_gapc.h:407
GAP_STOPPED_REASON_CONN_EST
@ GAP_STOPPED_REASON_CONN_EST
Definition: ble_gapc.h:132
gap_dev_tx_power_t
TX power info struct.
Definition: ble_gapc.h:232
gap_adv_report_info_t
gap_adv_report_info_t
Advertising report information.
Definition: ble_gapc.h:120
gap_conn_info_t
Connection info.
Definition: ble_gapc.h:406
ble_error.h
File that contains error codes.
gap_peer_version_ind_t::compid
uint16_t compid
Definition: ble_gapc.h:424
gap_con_plan_tag_t::interval
uint32_t interval
Definition: ble_gapc.h:483
gap_get_bd_addr_t
Get broadcast address struct.
Definition: ble_gapc.h:219
gap_set_pref_slave_evt_dur_param_t
Set preference slave event duration.
Definition: ble_gapc.h:490
gap_set_pref_slave_evt_dur_param_t::duration
uint16_t duration
Definition: ble_gapc.h:491
gap_le_pkt_size_ind_t::max_tx_time
uint16_t max_tx_time
Definition: ble_gapc.h:474
gap_dev_info_get_t::operation
uint8_t operation
Definition: ble_gapc.h:295
GAP_GET_PHY
@ GAP_GET_PHY
Definition: ble_gapc.h:97
gap_dev_rf_path_comp_ind_t::tx_path_comp
uint16_t tx_path_comp
Definition: ble_gapc.h:274
gap_conn_cmp_t::peer_addr
gap_addr_t peer_addr
Definition: ble_gapc.h:386
gap_conn_info_t::chnl_map
gap_chnl_map_t chnl_map
Definition: ble_gapc.h:408
GAP_GET_CON_RSSI
@ GAP_GET_CON_RSSI
Definition: ble_gapc.h:95
ble_gap_conn_param_update
uint16_t ble_gap_conn_param_update(uint8_t conn_idx, const gap_conn_update_param_t *p_conn_param)
Change the Link Layer connection parameters of a connection.
gap_dev_info_t::sugg_dflt_data_len
gap_sugg_dflt_data_len_t sugg_dflt_data_len
Definition: ble_gapc.h:284
gap_conn_info_param_t::info
gap_conn_info_t info
Definition: ble_gapc.h:418
gap_ext_adv_report_ind_t::per_sync_idx
uint8_t per_sync_idx
Definition: ble_gapc.h:330
gap_dev_info_t::nb_adv_sets
gap_nb_adv_sets_t nb_adv_sets
Definition: ble_gapc.h:286
gap_dev_info_t::adv_tx_power
gap_dev_adv_tx_power_t adv_tx_power
Definition: ble_gapc.h:283
gap_dev_rf_path_comp_ind_t
RF path compensation values info.
Definition: ble_gapc.h:273
gap_dev_info_t::dev_tx_power
gap_dev_tx_power_t dev_tx_power
Definition: ble_gapc.h:288
gap_conn_update_param_t::interval_max
uint16_t interval_max
Definition: ble_gapc.h:368
gap_dev_adv_tx_power_t
TX power info struct.
Definition: ble_gapc.h:226
gap_dev_info_t::dev_version
gap_dev_version_ind_t dev_version
Definition: ble_gapc.h:281
gap_le_pkt_size_ind_t::max_rx_time
uint16_t max_rx_time
Definition: ble_gapc.h:476
gap_conn_cmp_t::con_latency
uint16_t con_latency
Definition: ble_gapc.h:381
gap_peer_name_ind_t::addr_type
uint8_t addr_type
Definition: ble_gapc.h:339
gap_conn_info_param_t::opcode
uint8_t opcode
Definition: ble_gapc.h:417
GAP_REPORT_INFO_CONN_ADV_BIT
@ GAP_REPORT_INFO_CONN_ADV_BIT
Definition: ble_gapc.h:122
gap_le_pkt_size_ind_t::max_rx_octets
uint16_t max_rx_octets
Definition: ble_gapc.h:475
gap_rslv_addr_read_t
Read resolvable address info struct.
Definition: ble_gapc.h:301
ble_gap_con_plan_consult
uint16_t ble_gap_con_plan_consult(uint8_t *p_act_num, gap_con_plan_tag_t **p_conn_plan_arr)
Consult BLE connection activity plan situation function.
gap_get_conn_info_op_t
gap_get_conn_info_op_t
The operation code used to get connection info.
Definition: ble_gapc.h:94
GAP_REPORT_INFO_DIR_ADV_BIT
@ GAP_REPORT_INFO_DIR_ADV_BIT
Definition: ble_gapc.h:124
GAP_FEATS_LEN
#define GAP_FEATS_LEN
Definition: ble_gapc.h:69
gap_dev_info_t::dev_rf_path_comp
gap_dev_rf_path_comp_ind_t dev_rf_path_comp
Definition: ble_gapc.h:289
GAP_OPCODE_PRIVACY_MODE_SET
@ GAP_OPCODE_PRIVACY_MODE_SET
Definition: ble_gapc.h:150
gap_conn_info_t::phy
gap_le_phy_ind_t phy
Definition: ble_gapc.h:409
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 ...
gap_sync_established_ind_t::sync_hdl
uint16_t sync_hdl
Definition: ble_gapc.h:314
gap_addr_t
The struct of address.
Definition: ble_gapc.h:206
gap_conn_cmp_t::con_interval
uint16_t con_interval
Definition: ble_gapc.h:380
gap_get_bd_addr_t::bd_addr
gap_bdaddr_t bd_addr
Definition: ble_gapc.h:221
GAP_HCI_CONN_INTERVAL_UNACCEPTABLE
@ GAP_HCI_CONN_INTERVAL_UNACCEPTABLE
Definition: ble_gapc.h:182
gap_rslv_addr_read_op_id_t
gap_rslv_addr_read_op_id_t
Operation code used to read resolvable address.
Definition: ble_gapc.h:157
gap_max_data_len_t::suppted_max_tx_octets
uint16_t suppted_max_tx_octets
Definition: ble_gapc.h:240
gap_dev_version_ind_t::hci_subver
uint16_t hci_subver
Definition: ble_gapc.h:198
gap_le_phy_ind_t
PHY info.
Definition: ble_gapc.h:399
gap_dev_info_get_t::dev_info
gap_dev_info_t dev_info
Definition: ble_gapc.h:296
gap_conn_cmp_t::sup_to
uint16_t sup_to
Definition: ble_gapc.h:382
gap_dev_version_ind_t::manuf_name
uint16_t manuf_name
Definition: ble_gapc.h:201
gap_conn_info_t::chan_sel_algo
uint8_t chan_sel_algo
Definition: ble_gapc.h:410
gap_conn_param_t::sup_timeout
uint16_t sup_timeout
Definition: ble_gapc.h:360
gap_dev_info_get_t
Get device info operation struct.
Definition: ble_gapc.h:294
ble_gap_disconnect_with_reason
uint16_t ble_gap_disconnect_with_reason(uint8_t conn_idx, gap_disconn_reason_t reason)
Terminate an existing connection with a specified reason.
GAP_STOPPED_REASON_TIMEOUT
@ GAP_STOPPED_REASON_TIMEOUT
Definition: ble_gapc.h:130
GAP_ADDR_LEN
#define GAP_ADDR_LEN
Definition: ble_gapc.h:70
gap_disconn_reason_t
gap_disconn_reason_t
The specified reason for terminating a connection.
Definition: ble_gapc.h:175
gap_dev_version_ind_t::lmp_subver
uint16_t lmp_subver
Definition: ble_gapc.h:199
gap_con_plan_tag_t::offset
uint32_t offset
Definition: ble_gapc.h:484
gap_conn_update_cmp_t
Connection parameter used to update connection parameters.
Definition: ble_gapc.h:346
gap_dev_info_t::max_adv_data_len
gap_max_adv_data_len_ind_t max_adv_data_len
Definition: ble_gapc.h:287
gap_peer_info_t::peer_features
gap_peer_features_ind_t peer_features
Definition: ble_gapc.h:460
ble_gap_disconnect
uint16_t ble_gap_disconnect(uint8_t conn_idx)
Terminate an existing connection.
gap_get_bd_addr_t::index
uint8_t index
Definition: ble_gapc.h:220
gap_conn_param_t
The parameter of connection.
Definition: ble_gapc.h:354
gap_con_plan_tag_t::duration
uint32_t duration
Definition: ble_gapc.h:485
gap_ll_role_type_t
gap_ll_role_type_t
Device role of LL layer type.
Definition: ble_gapc.h:137
GAP_OPCODE_LOCAL_RSLV_ADDR_READ
@ GAP_OPCODE_LOCAL_RSLV_ADDR_READ
Definition: ble_gapc.h:158
GAP_REPORT_TYPE_PER_ADV
@ GAP_REPORT_TYPE_PER_ADV
Definition: ble_gapc.h:115
gap_dev_info_t
Device info.
Definition: ble_gapc.h:280
gap_conn_update_cmp_t::interval
uint16_t interval
Definition: ble_gapc.h:347
gap_le_phy_ind_t::tx_phy
uint8_t tx_phy
Definition: ble_gapc.h:400
gap_stopped_reason_t
gap_stopped_reason_t
Stop reason code.
Definition: ble_gapc.h:129
gap_dev_tx_power_t::min_tx_pwr
int8_t min_tx_pwr
Definition: ble_gapc.h:233
gap_max_data_len_t::suppted_max_rx_time
uint16_t suppted_max_rx_time
Definition: ble_gapc.h:246
gap_rslv_addr_read_t::gap_addr
gap_addr_t gap_addr
Definition: ble_gapc.h:303
gap_conn_cmp_t::ll_role
gap_ll_role_type_t ll_role
Definition: ble_gapc.h:387
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.
gap_ext_adv_report_ind_t
APP receives the extended advertising report indication info struct.
Definition: ble_gapc.h:319
gap_sugg_dflt_data_len_t::suggted_max_tx_time
uint16_t suggted_max_tx_time
Definition: ble_gapc.h:255
gap_ext_adv_report_ind_t::adv_type
uint8_t adv_type
Definition: ble_gapc.h:320
gap_bdaddr_t::addr_type
uint8_t addr_type
Definition: ble_gapc.h:214
GAP_GET_CHAN_SEL_ALGO
@ GAP_GET_CHAN_SEL_ALGO
Definition: ble_gapc.h:98
gap_conn_update_param_t
The parameter of update connection.
Definition: ble_gapc.h:365
gap_nb_adv_sets_t
Number of available advertising sets info.
Definition: ble_gapc.h:261
gap_dev_info_t::max_data_len
gap_max_data_len_t max_data_len
Definition: ble_gapc.h:285
gap_dev_info_t::get_bd_addr
gap_get_bd_addr_t get_bd_addr
Definition: ble_gapc.h:282
GAP_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED
@ GAP_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED
Definition: ble_gapc.h:181
gap_dev_adv_tx_power_t::power_lvl
int8_t power_lvl
Definition: ble_gapc.h:227
GAP_REPORT_INFO_COMPLETE_BIT
@ GAP_REPORT_INFO_COMPLETE_BIT
Definition: ble_gapc.h:121
gap_max_adv_data_len_ind_t
Maximum advertising data length info.
Definition: ble_gapc.h:267
gap_conn_update_param_t::ce_len
uint16_t ce_len
Definition: ble_gapc.h:372
GAP_STOPPED_REASON_ON_USER
@ GAP_STOPPED_REASON_ON_USER
Definition: ble_gapc.h:131
gap_conn_update_param_t::slave_latency
uint16_t slave_latency
Definition: ble_gapc.h:370
gap_conn_param_t::interval_min
uint16_t interval_min
Definition: ble_gapc.h:355
gap_sync_established_ind_t::clk_acc
uint8_t clk_acc
Definition: ble_gapc.h:312
gap_sync_established_ind_t::adv_sid
uint8_t adv_sid
Definition: ble_gapc.h:311
gap_conn_param_t::slave_latency
uint16_t slave_latency
Definition: ble_gapc.h:359
GAP_REPORT_TYPE_ADV_LEG
@ GAP_REPORT_TYPE_ADV_LEG
Definition: ble_gapc.h:112
gap_dev_version_ind_t::host_ver
uint8_t host_ver
Definition: ble_gapc.h:197
gap_conn_param_t::interval_max
uint16_t interval_max
Definition: ble_gapc.h:357
ble_gap_peer_info_get
uint16_t ble_gap_peer_info_get(uint8_t conn_idx, gap_get_peer_info_op_t opcode)
Get the information of the peer device.
gap_peer_info_t::peer_version
gap_peer_version_ind_t peer_version
Definition: ble_gapc.h:459
gap_param_set_op_id_t
gap_param_set_op_id_t
Operation code used to set param(s).
Definition: ble_gapc.h:146
gap_peer_name_ind_t::name_len
uint8_t name_len
Definition: ble_gapc.h:340
GAP_OPCODE_CHNL_MAP_SET
@ GAP_OPCODE_CHNL_MAP_SET
Definition: ble_gapc.h:147
gap_conn_update_param_t::sup_timeout
uint16_t sup_timeout
Definition: ble_gapc.h:371
GAP_OPCODE_PEER_RSLV_ADDR_READ
@ GAP_OPCODE_PEER_RSLV_ADDR_READ
Definition: ble_gapc.h:159