1 /****************************************************************************** 2 * 3 * Copyright (C) 1999-2012 Broadcom Corporation 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ******************************************************************************/ 18 19 #ifndef HCIMSGS_H 20 #define HCIMSGS_H 21 22 #include "common/bt_target.h" 23 #include "stack/hcidefs.h" 24 #include "stack/bt_types.h" 25 26 void bte_main_hci_send(BT_HDR *p_msg, UINT16 event); 27 void bte_main_lpm_allow_bt_device_sleep(void); 28 29 /* Message by message.... */ 30 31 BOOLEAN btsnd_hcic_inquiry(const LAP inq_lap, UINT8 duration, 32 UINT8 response_cnt); 33 34 #define HCIC_PARAM_SIZE_INQUIRY 5 35 36 37 #define HCIC_INQ_INQ_LAP_OFF 0 38 #define HCIC_INQ_DUR_OFF 3 39 #define HCIC_INQ_RSP_CNT_OFF 4 40 /* Inquiry */ 41 42 /* Inquiry Cancel */ 43 BOOLEAN btsnd_hcic_inq_cancel(void); 44 45 #define HCIC_PARAM_SIZE_INQ_CANCEL 0 46 47 /* Periodic Inquiry Mode */ 48 BOOLEAN btsnd_hcic_per_inq_mode(UINT16 max_period, UINT16 min_period, 49 const LAP inq_lap, UINT8 duration, 50 UINT8 response_cnt); 51 52 #define HCIC_PARAM_SIZE_PER_INQ_MODE 9 53 54 #define HCI_PER_INQ_MAX_INTRVL_OFF 0 55 #define HCI_PER_INQ_MIN_INTRVL_OFF 2 56 #define HCI_PER_INQ_INQ_LAP_OFF 4 57 #define HCI_PER_INQ_DURATION_OFF 7 58 #define HCI_PER_INQ_RSP_CNT_OFF 8 59 /* Periodic Inquiry Mode */ 60 61 /* Exit Periodic Inquiry Mode */ 62 BOOLEAN btsnd_hcic_exit_per_inq(void); 63 64 #define HCIC_PARAM_SIZE_EXIT_PER_INQ 0 65 /* Create Connection */ 66 BOOLEAN btsnd_hcic_create_conn(BD_ADDR dest, UINT16 packet_types, 67 UINT8 page_scan_rep_mode, 68 UINT8 page_scan_mode, 69 UINT16 clock_offset, 70 UINT8 allow_switch); 71 72 #define HCIC_PARAM_SIZE_CREATE_CONN 13 73 74 #define HCIC_CR_CONN_BD_ADDR_OFF 0 75 #define HCIC_CR_CONN_PKT_TYPES_OFF 6 76 #define HCIC_CR_CONN_REP_MODE_OFF 8 77 #define HCIC_CR_CONN_PAGE_SCAN_MODE_OFF 9 78 #define HCIC_CR_CONN_CLK_OFF_OFF 10 79 #define HCIC_CR_CONN_ALLOW_SWITCH_OFF 12 80 /* Create Connection */ 81 82 /* Disconnect */ 83 BOOLEAN btsnd_hcic_disconnect(UINT16 handle, UINT8 reason); 84 85 #define HCIC_PARAM_SIZE_DISCONNECT 3 86 87 #define HCI_DISC_HANDLE_OFF 0 88 #define HCI_DISC_REASON_OFF 2 89 /* Disconnect */ 90 91 #if BTM_SCO_INCLUDED == TRUE 92 /* Add SCO Connection */ 93 BOOLEAN btsnd_hcic_add_SCO_conn (UINT16 handle, UINT16 packet_types); 94 #endif /* BTM_SCO_INCLUDED */ 95 96 #define HCIC_PARAM_SIZE_ADD_SCO_CONN 4 97 98 #define HCI_ADD_SCO_HANDLE_OFF 0 99 #define HCI_ADD_SCO_PACKET_TYPES_OFF 2 100 /* Add SCO Connection */ 101 102 /* Create Connection Cancel */ 103 BOOLEAN btsnd_hcic_create_conn_cancel(BD_ADDR dest); 104 105 #define HCIC_PARAM_SIZE_CREATE_CONN_CANCEL 6 106 107 #define HCIC_CR_CONN_CANCEL_BD_ADDR_OFF 0 108 /* Create Connection Cancel */ 109 110 /* Accept Connection Request */ 111 BOOLEAN btsnd_hcic_accept_conn (BD_ADDR bd_addr, UINT8 role); 112 113 #define HCIC_PARAM_SIZE_ACCEPT_CONN 7 114 115 #define HCI_ACC_CONN_BD_ADDR_OFF 0 116 #define HCI_ACC_CONN_ROLE_OFF 6 117 /* Accept Connection Request */ 118 119 /* Reject Connection Request */ 120 BOOLEAN btsnd_hcic_reject_conn (BD_ADDR bd_addr, UINT8 reason); 121 122 #define HCIC_PARAM_SIZE_REJECT_CONN 7 123 124 #define HCI_REJ_CONN_BD_ADDR_OFF 0 125 #define HCI_REJ_CONN_REASON_OFF 6 126 /* Reject Connection Request */ 127 128 /* Link Key Request Reply */ 129 BOOLEAN btsnd_hcic_link_key_req_reply (BD_ADDR bd_addr, 130 LINK_KEY link_key); 131 132 #define HCIC_PARAM_SIZE_LINK_KEY_REQ_REPLY 22 133 134 #define HCI_LINK_KEY_REPLY_BD_ADDR_OFF 0 135 #define HCI_LINK_KEY_REPLY_LINK_KEY_OFF 6 136 /* Link Key Request Reply */ 137 138 /* Link Key Request Neg Reply */ 139 BOOLEAN btsnd_hcic_link_key_neg_reply (BD_ADDR bd_addr); 140 141 #define HCIC_PARAM_SIZE_LINK_KEY_NEG_REPLY 6 142 143 #define HCI_LINK_KEY_NEG_REP_BD_ADR_OFF 0 144 /* Link Key Request Neg Reply */ 145 146 /* PIN Code Request Reply */ 147 BOOLEAN btsnd_hcic_pin_code_req_reply (BD_ADDR bd_addr, 148 UINT8 pin_code_len, 149 PIN_CODE pin_code); 150 151 #define HCIC_PARAM_SIZE_PIN_CODE_REQ_REPLY 23 152 153 #define HCI_PIN_CODE_REPLY_BD_ADDR_OFF 0 154 #define HCI_PIN_CODE_REPLY_PIN_LEN_OFF 6 155 #define HCI_PIN_CODE_REPLY_PIN_CODE_OFF 7 156 /* PIN Code Request Reply */ 157 158 /* Link Key Request Neg Reply */ 159 BOOLEAN btsnd_hcic_pin_code_neg_reply (BD_ADDR bd_addr); 160 161 #define HCIC_PARAM_SIZE_PIN_CODE_NEG_REPLY 6 162 163 #define HCI_PIN_CODE_NEG_REP_BD_ADR_OFF 0 164 /* Link Key Request Neg Reply */ 165 166 /* Change Connection Type */ 167 BOOLEAN btsnd_hcic_change_conn_type (UINT16 handle, UINT16 packet_types); 168 169 #define HCIC_PARAM_SIZE_CHANGE_CONN_TYPE 4 170 171 #define HCI_CHNG_PKT_TYPE_HANDLE_OFF 0 172 #define HCI_CHNG_PKT_TYPE_PKT_TYPE_OFF 2 173 /* Change Connection Type */ 174 175 #define HCIC_PARAM_SIZE_CMD_HANDLE 2 176 177 #define HCI_CMD_HANDLE_HANDLE_OFF 0 178 179 BOOLEAN btsnd_hcic_auth_request (UINT16 handle); /* Authentication Request */ 180 181 /* Set Connection Encryption */ 182 BOOLEAN btsnd_hcic_set_conn_encrypt (UINT16 handle, BOOLEAN enable); 183 #define HCIC_PARAM_SIZE_SET_CONN_ENCRYPT 3 184 185 186 #define HCI_SET_ENCRYPT_HANDLE_OFF 0 187 #define HCI_SET_ENCRYPT_ENABLE_OFF 2 188 /* Set Connection Encryption */ 189 190 /* Remote Name Request */ 191 BOOLEAN btsnd_hcic_rmt_name_req (BD_ADDR bd_addr, 192 UINT8 page_scan_rep_mode, 193 UINT8 page_scan_mode, 194 UINT16 clock_offset); 195 196 #define HCIC_PARAM_SIZE_RMT_NAME_REQ 10 197 198 #define HCI_RMT_NAME_BD_ADDR_OFF 0 199 #define HCI_RMT_NAME_REP_MODE_OFF 6 200 #define HCI_RMT_NAME_PAGE_SCAN_MODE_OFF 7 201 #define HCI_RMT_NAME_CLK_OFF_OFF 8 202 /* Remote Name Request */ 203 204 /* Remote Name Request Cancel */ 205 BOOLEAN btsnd_hcic_rmt_name_req_cancel(BD_ADDR bd_addr); 206 207 #define HCIC_PARAM_SIZE_RMT_NAME_REQ_CANCEL 6 208 209 #define HCI_RMT_NAME_CANCEL_BD_ADDR_OFF 0 210 /* Remote Name Request Cancel */ 211 212 BOOLEAN btsnd_hcic_rmt_features_req(UINT16 handle); /* Remote Features Request */ 213 214 /* Remote Extended Features */ 215 BOOLEAN btsnd_hcic_rmt_ext_features(UINT16 handle, UINT8 page_num); 216 217 #define HCIC_PARAM_SIZE_RMT_EXT_FEATURES 3 218 219 #define HCI_RMT_EXT_FEATURES_HANDLE_OFF 0 220 #define HCI_RMT_EXT_FEATURES_PAGE_NUM_OFF 2 221 /* Remote Extended Features */ 222 223 224 BOOLEAN btsnd_hcic_rmt_ver_req(UINT16 handle); /* Remote Version Info Request */ 225 BOOLEAN btsnd_hcic_read_rmt_clk_offset(UINT16 handle); /* Remote Clock Offset */ 226 BOOLEAN btsnd_hcic_read_lmp_handle(UINT16 handle); /* Remote LMP Handle */ 227 228 BOOLEAN btsnd_hcic_setup_esco_conn (UINT16 handle, 229 UINT32 tx_bw, UINT32 rx_bw, 230 UINT16 max_latency, UINT16 voice, 231 UINT8 retrans_effort, 232 UINT16 packet_types); 233 #define HCIC_PARAM_SIZE_SETUP_ESCO 17 234 235 #define HCI_SETUP_ESCO_HANDLE_OFF 0 236 #define HCI_SETUP_ESCO_TX_BW_OFF 2 237 #define HCI_SETUP_ESCO_RX_BW_OFF 6 238 #define HCI_SETUP_ESCO_MAX_LAT_OFF 10 239 #define HCI_SETUP_ESCO_VOICE_OFF 12 240 #define HCI_SETUP_ESCO_RETRAN_EFF_OFF 14 241 #define HCI_SETUP_ESCO_PKT_TYPES_OFF 15 242 243 244 BOOLEAN btsnd_hcic_accept_esco_conn (BD_ADDR bd_addr, 245 UINT32 tx_bw, UINT32 rx_bw, 246 UINT16 max_latency, 247 UINT16 content_fmt, 248 UINT8 retrans_effort, 249 UINT16 packet_types); 250 #define HCIC_PARAM_SIZE_ACCEPT_ESCO 21 251 252 #define HCI_ACCEPT_ESCO_BDADDR_OFF 0 253 #define HCI_ACCEPT_ESCO_TX_BW_OFF 6 254 #define HCI_ACCEPT_ESCO_RX_BW_OFF 10 255 #define HCI_ACCEPT_ESCO_MAX_LAT_OFF 14 256 #define HCI_ACCEPT_ESCO_VOICE_OFF 16 257 #define HCI_ACCEPT_ESCO_RETRAN_EFF_OFF 18 258 #define HCI_ACCEPT_ESCO_PKT_TYPES_OFF 19 259 260 261 BOOLEAN btsnd_hcic_reject_esco_conn (BD_ADDR bd_addr, UINT8 reason); 262 #define HCIC_PARAM_SIZE_REJECT_ESCO 7 263 264 #define HCI_REJECT_ESCO_BDADDR_OFF 0 265 #define HCI_REJECT_ESCO_REASON_OFF 6 266 267 /* Hold Mode */ 268 BOOLEAN btsnd_hcic_hold_mode(UINT16 handle, UINT16 max_hold_period, 269 UINT16 min_hold_period); 270 271 #define HCIC_PARAM_SIZE_HOLD_MODE 6 272 273 #define HCI_HOLD_MODE_HANDLE_OFF 0 274 #define HCI_HOLD_MODE_MAX_PER_OFF 2 275 #define HCI_HOLD_MODE_MIN_PER_OFF 4 276 /* Hold Mode */ 277 278 /** 279 * Sniff Mode 280 * sniff_attempt should no more than 0xFF 281 */ 282 BOOLEAN btsnd_hcic_sniff_mode(UINT16 handle, 283 UINT16 max_sniff_period, 284 UINT16 min_sniff_period, 285 UINT16 sniff_attempt, 286 UINT16 sniff_timeout); 287 288 #define HCIC_PARAM_SIZE_SNIFF_MODE 10 289 290 291 #define HCI_SNIFF_MODE_HANDLE_OFF 0 292 #define HCI_SNIFF_MODE_MAX_PER_OFF 2 293 #define HCI_SNIFF_MODE_MIN_PER_OFF 4 294 #define HCI_SNIFF_MODE_ATTEMPT_OFF 6 295 #define HCI_SNIFF_MODE_TIMEOUT_OFF 8 296 /* Sniff Mode */ 297 298 BOOLEAN btsnd_hcic_exit_sniff_mode(UINT16 handle); /* Exit Sniff Mode */ 299 300 /* Park Mode */ 301 BOOLEAN btsnd_hcic_park_mode (UINT16 handle, 302 UINT16 beacon_max_interval, 303 UINT16 beacon_min_interval); 304 305 #define HCIC_PARAM_SIZE_PARK_MODE 6 306 307 #define HCI_PARK_MODE_HANDLE_OFF 0 308 #define HCI_PARK_MODE_MAX_PER_OFF 2 309 #define HCI_PARK_MODE_MIN_PER_OFF 4 310 /* Park Mode */ 311 312 BOOLEAN btsnd_hcic_exit_park_mode(UINT16 handle); /* Exit Park Mode */ 313 314 /* QoS Setup */ 315 BOOLEAN btsnd_hcic_qos_setup (UINT16 handle, UINT8 flags, 316 UINT8 service_type, 317 UINT32 token_rate, UINT32 peak, 318 UINT32 latency, UINT32 delay_var); 319 320 #define HCIC_PARAM_SIZE_QOS_SETUP 20 321 322 #define HCI_QOS_HANDLE_OFF 0 323 #define HCI_QOS_FLAGS_OFF 2 324 #define HCI_QOS_SERVICE_TYPE_OFF 3 325 #define HCI_QOS_TOKEN_RATE_OFF 4 326 #define HCI_QOS_PEAK_BANDWIDTH_OFF 8 327 #define HCI_QOS_LATENCY_OFF 12 328 #define HCI_QOS_DELAY_VAR_OFF 16 329 /* QoS Setup */ 330 331 /* Switch Role Request */ 332 BOOLEAN btsnd_hcic_switch_role (BD_ADDR bd_addr, UINT8 role); 333 334 #define HCIC_PARAM_SIZE_SWITCH_ROLE 7 335 336 #define HCI_SWITCH_BD_ADDR_OFF 0 337 #define HCI_SWITCH_ROLE_OFF 6 338 /* Switch Role Request */ 339 340 /* Write Policy Settings */ 341 BOOLEAN btsnd_hcic_write_policy_set(UINT16 handle, UINT16 settings); 342 343 #define HCIC_PARAM_SIZE_WRITE_POLICY_SET 4 344 345 #define HCI_WRITE_POLICY_HANDLE_OFF 0 346 #define HCI_WRITE_POLICY_SETTINGS_OFF 2 347 /* Write Policy Settings */ 348 349 /* Write Default Policy Settings */ 350 BOOLEAN btsnd_hcic_write_def_policy_set(UINT16 settings); 351 352 #define HCIC_PARAM_SIZE_WRITE_DEF_POLICY_SET 2 353 354 #define HCI_WRITE_DEF_POLICY_SETTINGS_OFF 0 355 /* Write Default Policy Settings */ 356 357 /****************************************** 358 ** Lisbon Features 359 *******************************************/ 360 #if BTM_SSR_INCLUDED == TRUE 361 /* Sniff Subrating */ 362 BOOLEAN btsnd_hcic_sniff_sub_rate(UINT16 handle, UINT16 max_lat, 363 UINT16 min_remote_lat, 364 UINT16 min_local_lat); 365 366 #define HCIC_PARAM_SIZE_SNIFF_SUB_RATE 8 367 368 #define HCI_SNIFF_SUB_RATE_HANDLE_OFF 0 369 #define HCI_SNIFF_SUB_RATE_MAX_LAT_OFF 2 370 #define HCI_SNIFF_SUB_RATE_MIN_REM_LAT_OFF 4 371 #define HCI_SNIFF_SUB_RATE_MIN_LOC_LAT_OFF 6 372 /* Sniff Subrating */ 373 374 #else /* BTM_SSR_INCLUDED == FALSE */ 375 376 #define btsnd_hcic_sniff_sub_rate(handle, max_lat, min_remote_lat, min_local_lat) FALSE 377 378 #endif /* BTM_SSR_INCLUDED */ 379 380 /* Extended Inquiry Response */ 381 void btsnd_hcic_write_ext_inquiry_response(void *buffer, UINT8 fec_req); 382 383 #define HCIC_PARAM_SIZE_EXT_INQ_RESP 241 384 385 #define HCIC_EXT_INQ_RESP_FEC_OFF 0 386 #define HCIC_EXT_INQ_RESP_RESPONSE 1 387 /* IO Capabilities Response */ 388 BOOLEAN btsnd_hcic_io_cap_req_reply (BD_ADDR bd_addr, UINT8 capability, 389 UINT8 oob_present, UINT8 auth_req); 390 391 #define HCIC_PARAM_SIZE_IO_CAP_RESP 9 392 393 #define HCI_IO_CAP_BD_ADDR_OFF 0 394 #define HCI_IO_CAPABILITY_OFF 6 395 #define HCI_IO_CAP_OOB_DATA_OFF 7 396 #define HCI_IO_CAP_AUTH_REQ_OFF 8 397 398 /* IO Capabilities Req Neg Reply */ 399 BOOLEAN btsnd_hcic_io_cap_req_neg_reply (BD_ADDR bd_addr, UINT8 err_code); 400 401 #define HCIC_PARAM_SIZE_IO_CAP_NEG_REPLY 7 402 403 #define HCI_IO_CAP_NR_BD_ADDR_OFF 0 404 #define HCI_IO_CAP_NR_ERR_CODE 6 405 406 /* Read Local OOB Data */ 407 BOOLEAN btsnd_hcic_read_local_oob_data (void); 408 409 #define HCIC_PARAM_SIZE_R_LOCAL_OOB 0 410 411 412 BOOLEAN btsnd_hcic_user_conf_reply (BD_ADDR bd_addr, BOOLEAN is_yes); 413 414 #define HCIC_PARAM_SIZE_UCONF_REPLY 6 415 416 #define HCI_USER_CONF_BD_ADDR_OFF 0 417 418 419 BOOLEAN btsnd_hcic_user_passkey_reply (BD_ADDR bd_addr, UINT32 value); 420 421 #define HCIC_PARAM_SIZE_U_PKEY_REPLY 10 422 423 #define HCI_USER_PASSKEY_BD_ADDR_OFF 0 424 #define HCI_USER_PASSKEY_VALUE_OFF 6 425 426 427 BOOLEAN btsnd_hcic_user_passkey_neg_reply (BD_ADDR bd_addr); 428 429 #define HCIC_PARAM_SIZE_U_PKEY_NEG_REPLY 6 430 431 #define HCI_USER_PASSKEY_NEG_BD_ADDR_OFF 0 432 433 /* Remote OOB Data Request Reply */ 434 BOOLEAN btsnd_hcic_rem_oob_reply (BD_ADDR bd_addr, UINT8 *p_c, 435 UINT8 *p_r); 436 437 #define HCIC_PARAM_SIZE_REM_OOB_REPLY 38 438 439 #define HCI_REM_OOB_DATA_BD_ADDR_OFF 0 440 #define HCI_REM_OOB_DATA_C_OFF 6 441 #define HCI_REM_OOB_DATA_R_OFF 22 442 443 /* Remote OOB Data Request Negative Reply */ 444 BOOLEAN btsnd_hcic_rem_oob_neg_reply (BD_ADDR bd_addr); 445 446 #define HCIC_PARAM_SIZE_REM_OOB_NEG_REPLY 6 447 448 #define HCI_REM_OOB_DATA_NEG_BD_ADDR_OFF 0 449 450 /* Read Tx Power Level */ 451 BOOLEAN btsnd_hcic_read_inq_tx_power (void); 452 453 #define HCIC_PARAM_SIZE_R_TX_POWER 0 454 455 /* Read Default Erroneous Data Reporting */ 456 BOOLEAN btsnd_hcic_read_default_erroneous_data_rpt (void); 457 458 #define HCIC_PARAM_SIZE_R_ERR_DATA_RPT 0 459 460 #if L2CAP_NON_FLUSHABLE_PB_INCLUDED == TRUE 461 BOOLEAN btsnd_hcic_enhanced_flush (UINT16 handle, UINT8 packet_type); 462 463 #define HCIC_PARAM_SIZE_ENHANCED_FLUSH 3 464 #endif 465 466 467 BOOLEAN btsnd_hcic_send_keypress_notif (BD_ADDR bd_addr, UINT8 notif); 468 469 #define HCIC_PARAM_SIZE_SEND_KEYPRESS_NOTIF 7 470 471 #define HCI_SEND_KEYPRESS_NOTIF_BD_ADDR_OFF 0 472 #define HCI_SEND_KEYPRESS_NOTIF_NOTIF_OFF 6 473 474 /**** end of Simple Pairing Commands ****/ 475 476 /* Store Current Settings */ 477 #define MAX_FILT_COND (sizeof (BD_ADDR) + 1) 478 479 BOOLEAN btsnd_hcic_set_event_filter(UINT8 filt_type, 480 UINT8 filt_cond_type, 481 UINT8 *filt_cond, 482 UINT8 filt_cond_len); 483 484 #define HCIC_PARAM_SIZE_SET_EVT_FILTER 9 485 486 #define HCI_FILT_COND_FILT_TYPE_OFF 0 487 #define HCI_FILT_COND_COND_TYPE_OFF 1 488 #define HCI_FILT_COND_FILT_OFF 2 489 /* Set Event Filter */ 490 491 /* Delete Stored Key */ 492 BOOLEAN btsnd_hcic_delete_stored_key (BD_ADDR bd_addr, BOOLEAN delete_all_flag); 493 494 #define HCIC_PARAM_SIZE_DELETE_STORED_KEY 7 495 496 #define HCI_DELETE_KEY_BD_ADDR_OFF 0 497 #define HCI_DELETE_KEY_ALL_FLAG_OFF 6 498 /* Delete Stored Key */ 499 500 /* Change Local Name */ 501 BOOLEAN btsnd_hcic_change_name(BD_NAME name); 502 503 #define HCIC_PARAM_SIZE_CHANGE_NAME BD_NAME_LEN 504 505 #define HCI_CHANGE_NAME_NAME_OFF 0 506 /* Change Local Name */ 507 508 509 #define HCIC_PARAM_SIZE_READ_CMD 0 510 511 #define HCIC_PARAM_SIZE_WRITE_PARAM1 1 512 513 #define HCIC_WRITE_PARAM1_PARAM_OFF 0 514 515 #define HCIC_PARAM_SIZE_WRITE_PARAM2 2 516 517 #define HCIC_WRITE_PARAM2_PARAM_OFF 0 518 519 #define HCIC_PARAM_SIZE_WRITE_PARAM3 3 520 521 #define HCIC_WRITE_PARAM3_PARAM_OFF 0 522 523 /* set AFH channels */ 524 BOOLEAN btsnd_hcic_set_afh_channels (AFH_CHANNELS channels); 525 #define HCIC_PARAM_SIZE_SET_AFH_CHANNELS 10 526 BOOLEAN btsnd_hcic_ble_set_channels (BLE_CHANNELS channels); 527 #define HCIC_PARAM_SIZE_BLE_SET_CHANNELS 5 528 529 BOOLEAN btsnd_hcic_write_pin_type(UINT8 type); /* Write PIN Type */ 530 BOOLEAN btsnd_hcic_write_auto_accept(UINT8 flag); /* Write Auto Accept */ 531 BOOLEAN btsnd_hcic_read_name (void); /* Read Local Name */ 532 BOOLEAN btsnd_hcic_write_page_tout(UINT16 timeout); /* Write Page Timout */ 533 BOOLEAN btsnd_hcic_write_scan_enable(UINT8 flag); /* Write Scan Enable */ 534 BOOLEAN btsnd_hcic_write_pagescan_cfg(UINT16 interval, 535 UINT16 window); /* Write Page Scan Activity */ 536 537 #define HCIC_PARAM_SIZE_WRITE_PAGESCAN_CFG 4 538 539 #define HCI_SCAN_CFG_INTERVAL_OFF 0 540 #define HCI_SCAN_CFG_WINDOW_OFF 2 541 /* Write Page Scan Activity */ 542 543 /* Write Inquiry Scan Activity */ 544 BOOLEAN btsnd_hcic_write_inqscan_cfg(UINT16 interval, UINT16 window); 545 546 #define HCIC_PARAM_SIZE_WRITE_INQSCAN_CFG 4 547 548 #define HCI_SCAN_CFG_INTERVAL_OFF 0 549 #define HCI_SCAN_CFG_WINDOW_OFF 2 550 /* Write Inquiry Scan Activity */ 551 552 BOOLEAN btsnd_hcic_write_auth_enable(UINT8 flag); /* Write Authentication Enable */ 553 BOOLEAN btsnd_hcic_write_dev_class(DEV_CLASS dev); /* Write Class of Device */ 554 BOOLEAN btsnd_hcic_write_voice_settings(UINT16 flags); /* Write Voice Settings */ 555 556 /* Host Controller to Host flow control */ 557 #define HCI_HOST_FLOW_CTRL_OFF 0 558 #define HCI_HOST_FLOW_CTRL_ACL_ON 1 559 #define HCI_HOST_FLOW_CTRL_SCO_ON 2 560 #define HCI_HOST_FLOW_CTRL_BOTH_ON 3 561 562 #define HCI_HOST_FLOW_CTRL_ADV_REPORT_OFF 0 563 #define HCI_HOST_FLOW_CTRL_ADV_REPORT_ON 1 564 565 566 BOOLEAN btsnd_hcic_write_auto_flush_tout(UINT16 handle, 567 UINT16 timeout); /* Write Retransmit Timout */ 568 569 #define HCIC_PARAM_SIZE_WRITE_AUTO_FLUSH_TOUT 4 570 571 #define HCI_FLUSH_TOUT_HANDLE_OFF 0 572 #define HCI_FLUSH_TOUT_TOUT_OFF 2 573 574 BOOLEAN btsnd_hcic_read_tx_power(UINT16 handle, UINT8 type); /* Read Tx Power */ 575 576 #define HCIC_PARAM_SIZE_READ_TX_POWER 3 577 578 #define HCI_READ_TX_POWER_HANDLE_OFF 0 579 #define HCI_READ_TX_POWER_TYPE_OFF 2 580 581 /* Read transmit power level parameter */ 582 #define HCI_READ_CURRENT 0x00 583 #define HCI_READ_MAXIMUM 0x01 584 585 BOOLEAN btsnd_hcic_host_num_xmitted_pkts (UINT8 num_handles, 586 UINT16 *handle, 587 UINT16 *num_pkts); /* Set Host Buffer Size */ 588 589 #define HCIC_PARAM_SIZE_NUM_PKTS_DONE_SIZE sizeof(btmsg_hcic_num_pkts_done_t) 590 591 #define MAX_DATA_HANDLES 10 592 593 #define HCI_PKTS_DONE_NUM_HANDLES_OFF 0 594 #define HCI_PKTS_DONE_HANDLE_OFF 1 595 #define HCI_PKTS_DONE_NUM_PKTS_OFF 3 596 597 /* Write Link Supervision Timeout */ 598 BOOLEAN btsnd_hcic_write_link_super_tout(UINT8 local_controller_id, UINT16 handle, UINT16 timeout); 599 600 #define HCIC_PARAM_SIZE_WRITE_LINK_SUPER_TOUT 4 601 602 #define HCI_LINK_SUPER_TOUT_HANDLE_OFF 0 603 #define HCI_LINK_SUPER_TOUT_TOUT_OFF 2 604 /* Write Link Supervision Timeout */ 605 606 BOOLEAN btsnd_hcic_write_cur_iac_lap (UINT8 num_cur_iac, 607 LAP *const iac_lap); /* Write Current IAC LAP */ 608 609 #define MAX_IAC_LAPS 0x40 610 611 #define HCI_WRITE_IAC_LAP_NUM_OFF 0 612 #define HCI_WRITE_IAC_LAP_LAP_OFF 1 613 /* Write Current IAC LAP */ 614 615 BOOLEAN btsnd_hcic_get_link_quality (UINT16 handle); /* Get Link Quality */ 616 BOOLEAN btsnd_hcic_read_rssi (UINT16 handle); /* Read RSSI */ 617 BOOLEAN btsnd_hcic_enable_test_mode (void); /* Enable Device Under Test Mode */ 618 BOOLEAN btsnd_hcic_write_pagescan_type(UINT8 type); /* Write Page Scan Type */ 619 BOOLEAN btsnd_hcic_write_inqscan_type(UINT8 type); /* Write Inquiry Scan Type */ 620 BOOLEAN btsnd_hcic_write_inquiry_mode(UINT8 type); /* Write Inquiry Mode */ 621 622 #define HCI_DATA_HANDLE_MASK 0x0FFF 623 624 #define HCID_GET_HANDLE_EVENT(p) (UINT16)((*((UINT8 *)((p) + 1) + p->offset) + \ 625 (*((UINT8 *)((p) + 1) + p->offset + 1) << 8))) 626 627 #define HCID_GET_HANDLE(u16) (UINT16)((u16) & HCI_DATA_HANDLE_MASK) 628 629 #define HCI_DATA_EVENT_MASK 3 630 #define HCI_DATA_EVENT_OFFSET 12 631 #define HCID_GET_EVENT(u16) (UINT8)(((u16) >> HCI_DATA_EVENT_OFFSET) & HCI_DATA_EVENT_MASK) 632 633 #define HCI_DATA_BCAST_MASK 3 634 #define HCI_DATA_BCAST_OFFSET 10 635 #define HCID_GET_BCAST(u16) (UINT8)(((u16) >> HCI_DATA_BCAST_OFFSET) & HCI_DATA_BCAST_MASK) 636 637 #define HCID_GET_ACL_LEN(p) (UINT16)((*((UINT8 *)((p) + 1) + p->offset + 2) + \ 638 (*((UINT8 *)((p) + 1) + p->offset + 3) << 8))) 639 640 #define HCID_HEADER_SIZE 4 641 642 #define HCID_GET_SCO_LEN(p) (*((UINT8 *)((p) + 1) + p->offset + 2)) 643 644 void btsnd_hcic_vendor_spec_cmd (void *buffer, UINT16 opcode, 645 UINT8 len, UINT8 *p_data, 646 void *p_cmd_cplt_cback); 647 648 #if (BLE_INCLUDED == TRUE) 649 /******************************************************************************** 650 ** BLE Commands 651 ** Note: "local_controller_id" is for transport, not counted in HCI message size 652 *********************************************************************************/ 653 #define HCIC_BLE_RAND_DI_SIZE 8 654 #define HCIC_BLE_ENCRYT_KEY_SIZE 16 655 #define HCIC_BLE_IRK_SIZE 16 656 657 #define HCIC_PARAM_SIZE_SET_USED_FEAT_CMD 8 658 #define HCIC_PARAM_SIZE_WRITE_RANDOM_ADDR_CMD 6 659 #define HCIC_PARAM_SIZE_BLE_WRITE_ADV_PARAMS 15 660 #if (BLE_50_FEATURE_SUPPORT == TRUE) 661 #define HCIC_PARAM_SIZE_BLE_WRITE_EXT_ADV_PARAMS 25 662 #endif // #if (BLE_50_FEATURE_SUPPORT == TRUE) 663 #define HCIC_PARAM_SIZE_BLE_WRITE_SCAN_RSP 31 664 #define HCIC_PARAM_SIZE_WRITE_ADV_ENABLE 1 665 #define HCIC_PARAM_SIZE_BLE_WRITE_SCAN_PARAM 7 666 #define HCIC_PARAM_SIZE_BLE_WRITE_SCAN_ENABLE 2 667 #define HCIC_PARAM_SIZE_BLE_CREATE_LL_CONN 25 668 #define HCIC_PARAM_SIZE_BLE_CREATE_CONN_CANCEL 0 669 #define HCIC_PARAM_SIZE_CLEAR_WHITE_LIST 0 670 #define HCIC_PARAM_SIZE_ADD_WHITE_LIST 7 671 #define HCIC_PARAM_SIZE_REMOVE_WHITE_LIST 7 672 #define HCIC_PARAM_SIZE_BLE_UPD_LL_CONN_PARAMS 14 673 #define HCIC_PARAM_SIZE_SET_HOST_CHNL_CLASS 5 674 #define HCIC_PARAM_SIZE_READ_CHNL_MAP 2 675 #define HCIC_PARAM_SIZE_BLE_READ_REMOTE_FEAT 2 676 #define HCIC_PARAM_SIZE_BLE_ENCRYPT 32 677 #define HCIC_PARAM_SIZE_BLE_RAND 0 678 #define HCIC_PARAM_SIZE_WRITE_LE_HOST_SUPPORTED 2 679 680 #define HCIC_BLE_RAND_DI_SIZE 8 681 #define HCIC_BLE_ENCRYT_KEY_SIZE 16 682 #define HCIC_PARAM_SIZE_BLE_START_ENC (4 + HCIC_BLE_RAND_DI_SIZE + HCIC_BLE_ENCRYT_KEY_SIZE) 683 #define HCIC_PARAM_SIZE_LTK_REQ_REPLY (2 + HCIC_BLE_ENCRYT_KEY_SIZE) 684 #define HCIC_PARAM_SIZE_LTK_REQ_NEG_REPLY 2 685 #define HCIC_BLE_CHNL_MAP_SIZE 5 686 #define HCIC_PARAM_SIZE_BLE_WRITE_ADV_DATA 31 687 688 #define HCIC_PARAM_SIZE_BLE_ADD_DEV_RESOLVING_LIST (7 + HCIC_BLE_IRK_SIZE * 2) 689 #define HCIC_PARAM_SIZE_BLE_RM_DEV_RESOLVING_LIST 7 690 #define HCIC_PARAM_SIZE_BLE_CLEAR_RESOLVING_LIST 0 691 #define HCIC_PARAM_SIZE_BLE_READ_RESOLVING_LIST_SIZE 0 692 #define HCIC_PARAM_SIZE_BLE_READ_RESOLVABLE_ADDR_PEER 7 693 #define HCIC_PARAM_SIZE_BLE_READ_RESOLVABLE_ADDR_LOCAL 7 694 #define HCIC_PARAM_SIZE_BLE_SET_ADDR_RESOLUTION_ENABLE 1 695 #define HCIC_PARAM_SIZE_BLE_SET_RAND_PRIV_ADDR_TIMOUT 2 696 #define HCIC_PARAM_SIZE_BLE_SET_DATA_LENGTH 6 697 #define HCIC_PARAM_SIZE_BLE_WRITE_EXTENDED_SCAN_PARAM 11 698 #define HCIC_PARAM_SIZE_BLE_UPDATE_ADV_FLOW_CONTROL 2 699 #if (BLE_50_FEATURE_SUPPORT == TRUE) 700 #define HCIC_PARAM_SIZE_BLE_READ_PHY 2 701 #define HCIC_PARAM_SIZE_BLE_SET_DEF_PHY 3 702 #define HCIC_PARAM_SIZE_BLE_SET_PHY 7 703 #define HCIC_PARAM_SIZE_ENH_RX_TEST 3 704 #define HCIC_PARAM_SIZE_ENH_TX_TEST 4 705 #define HCIC_PARAM_SIZE_EXT_RAND_ADDR 7 706 #define HCIC_PARAM_SIZE_EXT_ADV_SET_PARAMS 25 707 #define HCIC_PARAM_SIZE_EXT_ADV_WRITE_DATA 251 708 #define HCIC_PARAM_SIZE_READ_MAX_ADV_SIZE 0 709 #define HCIC_PARAM_SIZE_NUM_SUPPORT_ADV_SET 0 710 #define HCIC_PARAM_SIZE_REMOVE_ADV_SET 1 711 #define HCIC_PARAM_SIZE_CLEAR_ADV_SET 0 712 #define HCIC_PARAM_SIZE_SET_PERIODIC_ADV_PARAMS 7 713 #define HCIC_PARAM_SIZE_WRITE_PERIODIC_ADV_DATA 252 714 #define HCIC_PARAM_SIZE_PERIODIC_ADV_ENABLE 2 715 #define HCIC_PARAM_SIZE_SET_EXT_SCAN_PARAMS 3 716 #define HCIC_PARAM_SIZE_EXT_SCAN_ENABLE 6 717 #define HCIC_PARAM_SIZE_EXT_CONN_CREATE_BASE 10 718 #define HCIC_PARAM_SIZE_PERIODIC_ADV_CREATE_SYNC 12 719 #define HCIC_PARAM_SIZE_PERIODIC_ADV_CREATE_SYNC_CANCEL 0 720 #define HCIC_PARAM_SIZE_PERIODIC_ADV_TERM_SYNC 2 721 #define HCIC_PARAM_SIZE_ADD_DEV_TO_PERIODIC_ADV_LIST 8 722 #define HCIC_PARAM_SIZE_RM_DEV_FROM_PERIODIC_ADV_LIST 8 723 #define HCIC_PARAM_SIZE_CLEAR_PERIODIC_ADV_LIST 0 724 #define HCIC_PARAM_SIZE_READ_PERIODIC_ADV_LIST 0 725 #define HCIC_PARAM_SIZE_READ_TRANS_POWER 0 726 #define HCIC_PARAM_SIZE_READ_RF_PATH_COMPENSATION 0 727 #define HCIC_PARAM_SIZE_WRITE_RF_PATH_COMPENSATION 4 728 729 BlE_SYNC *btsnd_hcic_ble_get_sync_info(void); 730 void btsnd_hcic_ble_sync_sem_init(void); 731 void btsnd_hcic_ble_sync_sem_deinit(void); 732 733 uint8_t btsnd_hcic_ble_get_status(void); 734 735 void btsnd_hci_ble_set_status(UINT8 hci_status); 736 #endif // #if (BLE_50_FEATURE_SUPPORT == TRUE) 737 738 /* ULP HCI command */ 739 BOOLEAN btsnd_hcic_ble_set_evt_mask (BT_EVENT_MASK event_mask); 740 741 BOOLEAN btsnd_hcic_ble_read_buffer_size (void); 742 743 BOOLEAN btsnd_hcic_ble_read_local_spt_feat (void); 744 745 BOOLEAN btsnd_hcic_ble_set_local_used_feat (UINT8 feat_set[8]); 746 747 BOOLEAN btsnd_hcic_ble_set_random_addr (BD_ADDR random_addr); 748 749 BOOLEAN btsnd_hcic_ble_write_adv_params (UINT16 adv_int_min, UINT16 adv_int_max, 750 UINT8 adv_type, UINT8 addr_type_own, 751 UINT8 addr_type_dir, BD_ADDR direct_bda, 752 UINT8 channel_map, UINT8 adv_filter_policy); 753 754 BOOLEAN btsnd_hcic_ble_read_adv_chnl_tx_power (void); 755 756 BOOLEAN btsnd_hcic_ble_set_adv_data (UINT8 data_len, UINT8 *p_data); 757 758 BOOLEAN btsnd_hcic_ble_set_scan_rsp_data (UINT8 data_len, UINT8 *p_scan_rsp); 759 760 BOOLEAN btsnd_hcic_ble_set_adv_enable (UINT8 adv_enable); 761 762 BOOLEAN btsnd_hcic_ble_set_scan_params (UINT8 scan_type, 763 UINT16 scan_int, UINT16 scan_win, 764 UINT8 addr_type, UINT8 scan_filter_policy); 765 766 BOOLEAN btsnd_hcic_ble_set_scan_enable (UINT8 scan_enable, UINT8 duplicate); 767 768 BOOLEAN btsnd_hcic_ble_create_ll_conn (UINT16 scan_int, UINT16 scan_win, 769 UINT8 init_filter_policy, UINT8 addr_type_peer, BD_ADDR bda_peer, UINT8 addr_type_own, 770 UINT16 conn_int_min, UINT16 conn_int_max, UINT16 conn_latency, UINT16 conn_timeout, 771 UINT16 min_ce_len, UINT16 max_ce_len); 772 773 BOOLEAN btsnd_hcic_ble_create_conn_cancel (void); 774 775 BOOLEAN btsnd_hcic_ble_read_white_list_size (void); 776 777 BOOLEAN btsnd_hcic_ble_clear_white_list (void); 778 779 BOOLEAN btsnd_hcic_ble_add_white_list (UINT8 addr_type, BD_ADDR bda); 780 781 BOOLEAN btsnd_hcic_ble_remove_from_white_list (UINT8 addr_type, BD_ADDR bda); 782 783 BOOLEAN btsnd_hcic_ble_upd_ll_conn_params (UINT16 handle, UINT16 conn_int_min, UINT16 conn_int_max, 784 UINT16 conn_latency, UINT16 conn_timeout, UINT16 min_len, UINT16 max_len); 785 786 BOOLEAN btsnd_hcic_ble_set_host_chnl_class (UINT8 chnl_map[HCIC_BLE_CHNL_MAP_SIZE]); 787 788 BOOLEAN btsnd_hcic_ble_read_chnl_map (UINT16 handle); 789 790 BOOLEAN btsnd_hcic_ble_read_remote_feat ( UINT16 handle); 791 792 BOOLEAN btsnd_hcic_ble_encrypt (UINT8 *key, UINT8 key_len, UINT8 *plain_text, UINT8 pt_len, void *p_cmd_cplt_cback); 793 794 BOOLEAN btsnd_hcic_ble_rand (void *p_cmd_cplt_cback); 795 796 BOOLEAN btsnd_hcic_ble_start_enc ( UINT16 handle, 797 UINT8 rand[HCIC_BLE_RAND_DI_SIZE], 798 UINT16 ediv, UINT8 ltk[HCIC_BLE_ENCRYT_KEY_SIZE]); 799 800 BOOLEAN btsnd_hcic_ble_ltk_req_reply (UINT16 handle, UINT8 ltk[HCIC_BLE_ENCRYT_KEY_SIZE]); 801 802 BOOLEAN btsnd_hcic_ble_ltk_req_neg_reply (UINT16 handle); 803 804 BOOLEAN btsnd_hcic_ble_read_supported_states (void); 805 806 BOOLEAN btsnd_hcic_ble_write_host_supported (UINT8 le_host_spt, UINT8 simul_le_host_spt); 807 808 BOOLEAN btsnd_hcic_ble_read_host_supported (void); 809 810 BOOLEAN btsnd_hcic_ble_receiver_test(UINT8 rx_freq); 811 812 BOOLEAN btsnd_hcic_ble_transmitter_test(UINT8 tx_freq, UINT8 test_data_len, 813 UINT8 payload); 814 BOOLEAN btsnd_hcic_ble_test_end(void); 815 816 #if (defined BLE_LLT_INCLUDED) && (BLE_LLT_INCLUDED == TRUE) 817 818 #define HCIC_PARAM_SIZE_BLE_RC_PARAM_REQ_REPLY 14 819 BOOLEAN btsnd_hcic_ble_rc_param_req_reply(UINT16 handle, 820 UINT16 conn_int_min, UINT16 conn_int_max, 821 UINT16 conn_latency, UINT16 conn_timeout, 822 UINT16 min_ce_len, UINT16 max_ce_len); 823 824 #define HCIC_PARAM_SIZE_BLE_RC_PARAM_REQ_NEG_REPLY 3 825 BOOLEAN btsnd_hcic_ble_rc_param_req_neg_reply(UINT16 handle, UINT8 reason); 826 827 #endif /* BLE_LLT_INCLUDED */ 828 829 BOOLEAN btsnd_hcic_ble_set_data_length(UINT16 conn_handle, UINT16 tx_octets, 830 UINT16 tx_time); 831 832 BOOLEAN btsnd_hcic_ble_add_device_resolving_list (UINT8 addr_type_peer, 833 BD_ADDR bda_peer, 834 UINT8 irk_peer[HCIC_BLE_IRK_SIZE], 835 UINT8 irk_local[HCIC_BLE_IRK_SIZE]); 836 837 BOOLEAN btsnd_hcic_ble_rm_device_resolving_list (UINT8 addr_type_peer, 838 BD_ADDR bda_peer); 839 840 BOOLEAN btsnd_hcic_ble_clear_resolving_list (void); 841 842 BOOLEAN btsnd_hcic_ble_read_resolvable_addr_peer (UINT8 addr_type_peer, 843 BD_ADDR bda_peer); 844 845 BOOLEAN btsnd_hcic_ble_read_resolvable_addr_local (UINT8 addr_type_peer, 846 BD_ADDR bda_peer); 847 848 BOOLEAN btsnd_hcic_ble_set_addr_resolution_enable (UINT8 addr_resolution_enable); 849 850 BOOLEAN btsnd_hcic_ble_set_rand_priv_addr_timeout (UINT16 rpa_timout); 851 852 #endif /* BLE_INCLUDED */ 853 #if (BLE_50_FEATURE_SUPPORT == TRUE) 854 typedef struct { 855 UINT8 scan_type; 856 UINT16 scan_interval; 857 UINT16 scan_window; 858 } tHCI_EXT_SCAN_PARAMS; 859 860 typedef struct { 861 UINT16 scan_interval; 862 UINT16 scan_window; 863 UINT16 conn_interval_min; 864 UINT16 conn_interval_max; 865 UINT16 conn_latency; 866 UINT16 sup_timeout; 867 UINT16 min_ce_len; 868 UINT16 max_ce_len; 869 } tHCI_ExtConnParams; 870 871 typedef struct { 872 UINT8 filter_policy; 873 UINT8 own_addr_type; 874 UINT8 peer_addr_type; 875 BD_ADDR peer_addr; 876 UINT8 init_phy_mask; 877 tHCI_ExtConnParams params[3]; 878 } tHCI_CreatExtConn; 879 #endif // #if (BLE_50_FEATURE_SUPPORT == TRUE) 880 BOOLEAN btsnd_hcic_read_authenticated_payload_tout(UINT16 handle); 881 882 BOOLEAN btsnd_hcic_write_authenticated_payload_tout(UINT16 handle, 883 UINT16 timeout); 884 885 BOOLEAN btsnd_hcic_ble_update_adv_report_flow_control (UINT16 num); 886 #if (BLE_50_FEATURE_SUPPORT == TRUE) 887 BOOLEAN btsnd_hcic_ble_read_phy(UINT16 conn_handle); 888 889 UINT8 btsnd_hcic_ble_set_prefered_default_phy(UINT8 all_phys, 890 UINT8 tx_phys, 891 UINT8 rx_phys); 892 BOOLEAN btsnd_hcic_ble_set_phy(UINT16 conn_handle, 893 UINT8 all_phys, UINT8 tx_phys, 894 UINT8 rx_phys, UINT16 phy_options); 895 896 UINT8 btsnd_hcic_ble_enhand_rx_test(UINT8 rx_channel, UINT8 phy, 897 UINT8 modulation_idx); 898 899 UINT8 btsnd_hcic_ble_enhand_tx_test(UINT8 tx_channel, UINT8 len, 900 UINT8 packect, 901 UINT8 phy); 902 903 UINT8 btsnd_hcic_ble_set_extend_rand_address(UINT8 adv_handle, BD_ADDR rand_addr); 904 905 UINT8 btsnd_hcic_ble_set_ext_adv_params(UINT8 adv_handle, UINT16 properties, UINT32 interval_min, 906 UINT32 interval_max, UINT8 channel_map, UINT8 own_addr_type, 907 UINT8 peer_addr_type, BD_ADDR peer_addr, 908 UINT8 adv_filter_policy, UINT8 adv_tx_power, 909 UINT8 primary_adv_phy, UINT8 secondary_adv_max_skip, 910 UINT8 secondary_adv_phy, 911 UINT8 adv_sid, UINT8 scan_req_ntf_enable); 912 913 UINT8 btsnd_hcic_ble_set_ext_adv_data(UINT8 adv_handle, 914 UINT8 operation, UINT8 fragment_prefrence, 915 UINT8 data_len, UINT8 *p_data); 916 917 UINT8 btsnd_hcic_ble_set_ext_adv_scan_rsp_data(UINT8 adv_handle, 918 UINT8 operation, UINT8 fragment_prefrence, 919 UINT8 data_len, UINT8 *p_data); 920 921 UINT8 btsnd_hcic_ble_ext_adv_enable(UINT8 enable, UINT8 num_of_sets, UINT8 *adv_handle, 922 UINT16 *duration, UINT8 *max_adv_evt); 923 924 UINT8 btsnd_hcic_ble_read_max_adv_len(void); 925 926 UINT8 btsnd_hcic_ble_read_num_support_adv_set(void); 927 928 UINT8 btsnd_hcic_ble_remove_adv_set(UINT8 adv_handle); 929 930 UINT8 btsnd_hcic_ble_clear_adv_set(void); 931 932 UINT8 btsnd_hcic_ble_set_periodic_adv_params(UINT8 adv_handle, 933 UINT16 interval_min, 934 UINT16 interval_max, 935 UINT8 propertics); 936 937 UINT8 btsnd_hcic_ble_set_periodic_adv_data(UINT8 adv_handle, 938 UINT8 operation, 939 UINT8 len, 940 UINT8 *p_data); 941 942 UINT8 btsnd_hcic_ble_periodic_adv_enable(UINT8 enable, UINT8 adv_handle); 943 944 UINT8 btsnd_hcic_ble_set_ext_scan_params(UINT8 own_addr_type, UINT8 filter_policy, 945 UINT8 phy_mask, UINT8 phy_count, 946 tHCI_EXT_SCAN_PARAMS *params); 947 948 UINT8 btsnd_hcic_ble_ext_scan_enable(UINT8 enable, UINT8 filter_dups, 949 UINT16 duration, UINT16 period); 950 951 952 BOOLEAN btsnd_hcic_ble_create_ext_conn(tHCI_CreatExtConn *p_conn); 953 954 BOOLEAN btsnd_hcic_ble_periodic_adv_create_sync(UINT8 filter_policy, UINT8 adv_sid, 955 UINT8 adv_addr_type, BD_ADDR adv_addr, 956 UINT16 sync_timeout, UINT8 unused); 957 958 UINT8 btsnd_hcic_ble_periodic_adv_create_sync_cancel(void); 959 960 961 UINT8 btsnd_hcic_ble_periodic_adv_term_sync(UINT16 sync_handle); 962 963 UINT8 btsnd_hcic_ble_add_dev_to_periodic_adv_list(UINT8 adv_addr_type, BD_ADDR adv_addr, 964 UINT8 adv_sid); 965 UINT8 btsnd_hcic_ble_rm_dev_from_periodic_adv_list(UINT8 adv_addr_type, BD_ADDR adv_addr, 966 UINT8 adv_sid); 967 968 UINT8 btsnd_hcic_ble_clear_periodic_adv_list(void); 969 970 UINT8 btsnd_hcic_ble_read_periodic_adv_list_size(void); 971 972 UINT8 btsnd_hcic_ble_read_trans_power(void); 973 974 UINT8 btsnd_hcic_ble_read_rf_path_compensation(void); 975 976 UINT8 btsnd_hcic_ble_write_rf_path_compensation(UINT16 rf_tx_path, UINT16 rf_rx_path); 977 #endif // #if (BLE_50_FEATURE_SUPPORT == TRUE) 978 #define HCIC_PARAM_SIZE_WRITE_AUTHENT_PAYLOAD_TOUT 4 979 980 #define HCI__WRITE_AUTHENT_PAYLOAD_TOUT_HANDLE_OFF 0 981 #define HCI__WRITE_AUTHENT_PAYLOAD_TOUT_TOUT_OFF 2 982 983 #endif 984