1 /****************************************************************************** 2 * 3 * Copyright (c) 2014 The Android Open Source Project 4 * Copyright (C) 1999-2012 Broadcom Corporation 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at: 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 * 18 ******************************************************************************/ 19 20 #ifndef BT_TARGET_H 21 #define BT_TARGET_H 22 23 #ifndef BUILDCFG 24 #define BUILDCFG 25 #endif 26 #include "data_types.h" 27 28 29 #ifndef BTIF_HSAG_SERVICE_NAME 30 #define BTIF_HSAG_SERVICE_NAME ("Headset Gateway") 31 #endif 32 33 #ifndef BTIF_HFAG_SERVICE_NAME 34 #define BTIF_HFAG_SERVICE_NAME ("Handsfree Gateway") 35 #endif 36 37 #ifndef BTIF_HF_CLIENT_SERVICE_NAME 38 #define BTIF_HF_CLIENT_SERVICE_NAME ("Handsfree") 39 #endif 40 41 #ifdef BUILDCFG 42 43 #if !defined(HAS_BDROID_BUILDCFG) && !defined(HAS_NO_BDROID_BUILDCFG) 44 #error "An Android.mk file did not include bdroid_CFLAGS and possibly not bdorid_C_INCLUDES" 45 #endif 46 47 #ifdef HAS_BDROID_BUILDCFG 48 #include "bdroid_buildcfg.h" 49 #endif 50 51 #endif 52 53 /* Include common GKI definitions used by this platform */ 54 #include "gki_target.h" 55 56 #include "bt_types.h" /* This must be defined AFTER buildcfg.h */ 57 #include "dyn_mem.h" /* defines static and/or dynamic memory for components */ 58 59 60 //------------------Added from bdroid_buildcfg.h--------------------- 61 #ifndef UNV_INCLUDED 62 #define UNV_INCLUDED FALSE 63 #endif 64 65 #ifndef GATT_PTS 66 #define GATT_PTS FALSE 67 #endif 68 69 #ifndef L2CAP_INCLUDED 70 #define L2CAP_INCLUDED TRUE 71 #endif 72 73 #ifndef L2CAP_EXTFEA_SUPPORTED_MASK 74 #define L2CAP_EXTFEA_SUPPORTED_MASK (L2CAP_EXTFEA_ENH_RETRANS | L2CAP_EXTFEA_STREAM_MODE | L2CAP_EXTFEA_NO_CRC | L2CAP_EXTFEA_FIXED_CHNLS) 75 #endif 76 77 #ifndef BTUI_OPS_FORMATS 78 #define BTUI_OPS_FORMATS (BTA_OP_VCARD21_MASK | BTA_OP_ANY_MASK) 79 #endif 80 81 #ifndef BTA_RFC_MTU_SIZE 82 #define BTA_RFC_MTU_SIZE (L2CAP_MTU_SIZE-L2CAP_MIN_OFFSET-RFCOMM_DATA_OVERHEAD) 83 #endif 84 85 #ifndef BTA_DUN_MTU 86 #define BTA_DUN_MTU BTA_RFC_MTU_SIZE 87 #endif 88 89 #ifndef BTA_SPP_MTU 90 #define BTA_SPP_MTU BTA_RFC_MTU_SIZE 91 #endif 92 93 #ifndef BTA_FAX_MTU 94 #define BTA_FAX_MTU BTA_RFC_MTU_SIZE 95 #endif 96 97 #ifndef SDP_RAW_PDU_INCLUDED 98 #define SDP_RAW_PDU_INCLUDED TRUE 99 #endif 100 101 #ifndef GATTS_APPU_USE_GATT_TRACE 102 #define GATTS_APPU_USE_GATT_TRACE FALSE 103 #endif 104 105 #ifndef SMP_HOST_ENCRYPT_INCLUDED 106 #define SMP_HOST_ENCRYPT_INCLUDED FALSE 107 #endif 108 109 #ifndef SBC_NO_PCM_CPY_OPTION 110 #define SBC_NO_PCM_CPY_OPTION FALSE 111 #endif 112 113 #ifndef BTA_INCLUDED 114 #define BTA_INCLUDED TRUE 115 #endif 116 117 #ifndef BTA_AG_INCLUDED 118 #define BTA_AG_INCLUDED TRUE 119 #endif 120 121 #ifndef BTA_DM_INCLUDED 122 #define BTA_DM_INCLUDED TRUE 123 #endif 124 125 126 #ifndef BTA_DI_INCLUDED 127 #define BTA_DI_INCLUDED FALSE 128 #endif 129 130 #ifndef BTA_BI_INCLUDED 131 #define BTA_BI_INCLUDED FALSE 132 #endif 133 134 #ifndef BTA_SC_INCLUDED 135 #define BTA_SC_INCLUDED FALSE 136 #endif 137 138 #ifndef BTA_PAN_INCLUDED 139 #define BTA_PAN_INCLUDED TRUE 140 #endif 141 142 #ifndef BTA_FS_INCLUDED 143 #define BTA_FS_INCLUDED TRUE 144 #endif 145 146 #ifndef BTA_HH_INCLUDED 147 #define BTA_HH_INCLUDED TRUE 148 #endif 149 150 #ifndef BTA_HH_ROLE 151 #define BTA_HH_ROLE BTA_MASTER_ROLE_PREF 152 #endif 153 154 #ifndef BTA_HH_LE_INCLUDED 155 #define BTA_HH_LE_INCLUDED TRUE 156 #endif 157 158 #ifndef BTA_AR_INCLUDED 159 #define BTA_AR_INCLUDED TRUE 160 #endif 161 162 #ifndef BTA_AV_INCLUDED 163 #define BTA_AV_INCLUDED TRUE 164 #endif 165 166 #ifndef BTA_GATT_INCLUDED 167 #define BTA_GATT_INCLUDED TRUE 168 #endif 169 170 #ifndef BTA_AV_SINK_INCLUDED 171 #define BTA_AV_SINK_INCLUDED FALSE 172 #endif 173 174 #ifndef BTA_DISABLE_DELAY 175 #define BTA_DISABLE_DELAY 200 /* in milliseconds */ 176 #endif 177 178 #ifndef RPC_TRACE_ONLY 179 #define RPC_TRACE_ONLY FALSE 180 #endif 181 182 #ifndef ANDROID_APP_INCLUDED 183 #define ANDROID_APP_INCLUDED TRUE 184 #endif 185 186 #ifndef ANDROID_USE_LOGCAT 187 #define ANDROID_USE_LOGCAT TRUE 188 #endif 189 190 #ifndef LINUX_GKI_INCLUDED 191 #define LINUX_GKI_INCLUDED TRUE 192 #endif 193 194 #ifndef BTA_SYS_TIMER_PERIOD 195 #define BTA_SYS_TIMER_PERIOD 100 196 #endif 197 198 #ifndef GKI_SHUTDOWN_EVT 199 #define GKI_SHUTDOWN_EVT APPL_EVT_7 200 #endif 201 202 #ifndef GKI_PTHREAD_JOINABLE 203 #define GKI_PTHREAD_JOINABLE TRUE 204 #endif 205 206 #ifndef LINUX_DRV_INCLUDED 207 #define LINUX_DRV_INCLUDED TRUE 208 #endif 209 210 #ifndef LINUX_OS 211 #define LINUX_OS TRUE 212 #endif 213 214 #ifndef BTM_APP_DEV_INIT 215 #define BTM_APP_DEV_INIT bte_main_post_reset_init 216 #endif 217 218 #ifndef SBC_FOR_EMBEDDED_LINUX 219 #define SBC_FOR_EMBEDDED_LINUX TRUE 220 #endif 221 222 #ifndef BTA_DM_REMOTE_DEVICE_NAME_LENGTH 223 #define BTA_DM_REMOTE_DEVICE_NAME_LENGTH 248 224 #endif 225 226 #ifndef AVDT_VERSION 227 #define AVDT_VERSION 0x0102 228 #endif 229 230 #ifndef BTA_AG_AT_MAX_LEN 231 #define BTA_AG_AT_MAX_LEN 512 232 #endif 233 234 #ifndef BTA_AVRCP_FF_RW_SUPPORT 235 #define BTA_AVRCP_FF_RW_SUPPORT TRUE 236 #endif 237 238 #ifndef BTA_AG_SCO_PKT_TYPES 239 #define BTA_AG_SCO_PKT_TYPES (BTM_SCO_LINK_ONLY_MASK | BTM_SCO_PKT_TYPES_MASK_EV3 | BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 | BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 | BTM_SCO_PKT_TYPES_MASK_NO_3_EV5) 240 #endif 241 242 #ifndef BTA_AV_RET_TOUT 243 #define BTA_AV_RET_TOUT 15 244 #endif 245 246 #ifndef PORCHE_PAIRING_CONFLICT 247 #define PORCHE_PAIRING_CONFLICT TRUE 248 #endif 249 250 #ifndef BTA_AV_CO_CP_SCMS_T 251 #define BTA_AV_CO_CP_SCMS_T FALSE 252 #endif 253 254 #ifndef AVDT_CONNECT_CP_ONLY 255 #define AVDT_CONNECT_CP_ONLY FALSE 256 #endif 257 258 /* This feature is used to eanble interleaved scan*/ 259 #ifndef BTA_HOST_INTERLEAVE_SEARCH 260 #define BTA_HOST_INTERLEAVE_SEARCH FALSE 261 #endif 262 263 #ifndef BT_TRACE_PROTOCOL 264 #define BT_TRACE_PROTOCOL TRUE 265 #endif 266 267 #ifndef BT_USE_TRACES 268 #define BT_USE_TRACES TRUE 269 #endif 270 271 #ifndef BT_TRACE_BTIF 272 #define BT_TRACE_BTIF TRUE 273 #endif 274 275 #ifndef BTTRC_INCLUDED 276 #define BTTRC_INCLUDED FALSE 277 #endif 278 279 #ifndef BT_TRACE_VERBOSE 280 #define BT_TRACE_VERBOSE FALSE 281 #endif 282 283 #ifndef BTTRC_PARSER_INCLUDED 284 #define BTTRC_PARSER_INCLUDED FALSE 285 #endif 286 287 #ifndef MAX_TRACE_RAM_SIZE 288 #define MAX_TRACE_RAM_SIZE 10000 289 #endif 290 291 #ifndef OBX_INITIAL_TRACE_LEVEL 292 #define OBX_INITIAL_TRACE_LEVEL BT_TRACE_LEVEL_ERROR 293 #endif 294 295 #ifndef PBAP_ZERO_VCARD_IN_DB 296 #define PBAP_ZERO_VCARD_IN_DB FALSE 297 #endif 298 299 #ifndef BTA_DM_SDP_DB_SIZE 300 #define BTA_DM_SDP_DB_SIZE 8000 301 #endif 302 303 #ifndef HL_INCLUDED 304 #define HL_INCLUDED TRUE 305 #endif 306 307 #ifndef AG_VOICE_SETTINGS 308 #define AG_VOICE_SETTINGS HCI_DEFAULT_VOICE_SETTINGS 309 #endif 310 311 #ifndef BTIF_DM_OOB_TEST 312 #define BTIF_DM_OOB_TEST TRUE 313 #endif 314 315 // How long to wait before activating sniff mode after entering the 316 // idle state for FTS, OPS connections 317 #ifndef BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS 318 #define BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS 7000 319 #endif 320 321 //------------------End added from bdroid_buildcfg.h--------------------- 322 323 324 325 /****************************************************************************** 326 ** 327 ** Platform-Specific 328 ** 329 ******************************************************************************/ 330 331 /* API macros for simulator */ 332 333 #define BTAPI 334 335 #ifndef BTE_BSE_WRAPPER 336 #ifdef BTE_SIM_APP 337 #undef BTAPI 338 #define BTAPI __declspec(dllexport) 339 #endif 340 #endif 341 342 #define BT_API BTAPI 343 #define BTU_API BTAPI 344 #define A2D_API BTAPI 345 #define VDP_API BTAPI 346 #define AVDT_API BTAPI 347 #define AVCT_API BTAPI 348 #define AVRC_API BTAPI 349 #define BIP_API BTAPI 350 #define BNEP_API BTAPI 351 #define BPP_API BTAPI 352 #define BTM_API BTAPI 353 #define CTP_API BTAPI 354 #define DUN_API BTAPI 355 #define FTP_API BTAPI 356 #define GAP_API BTAPI 357 #define GOEP_API BTAPI 358 #define HCI_API BTAPI 359 #define HCRP_API BTAPI 360 #define HID_API BTAPI 361 #define HFP_API BTAPI 362 #define HSP2_API BTAPI 363 #define ICP_API BTAPI 364 #define L2C_API BTAPI 365 #define OBX_API BTAPI 366 #define OPP_API BTAPI 367 #define PAN_API BTAPI 368 #define RFC_API BTAPI 369 #define RPC_API BTAPI 370 #define SDP_API BTAPI 371 #define SPP_API BTAPI 372 #define TCS_API BTAPI 373 #define XML_API BTAPI 374 #define BTA_API BTAPI 375 #define SBC_API BTAPI 376 #define MCE_API BTAPI 377 #define MCA_API BTAPI 378 #define GATT_API BTAPI 379 #define SMP_API BTAPI 380 381 382 /****************************************************************************** 383 ** 384 ** GKI Buffer Pools 385 ** 386 ******************************************************************************/ 387 388 /* Receives HCI events from the lower-layer. */ 389 #ifndef HCI_CMD_POOL_ID 390 #define HCI_CMD_POOL_ID GKI_POOL_ID_2 391 #endif 392 393 #ifndef HCI_CMD_POOL_BUF_SIZE 394 #define HCI_CMD_POOL_BUF_SIZE GKI_BUF2_SIZE 395 #endif 396 397 /* Receives ACL data packets from thelower-layer. */ 398 #ifndef HCI_ACL_POOL_ID 399 #define HCI_ACL_POOL_ID GKI_POOL_ID_3 400 #endif 401 402 #ifndef HCI_ACL_POOL_BUF_SIZE 403 #define HCI_ACL_POOL_BUF_SIZE GKI_BUF3_SIZE 404 #endif 405 406 /* Maximum number of buffers available for ACL receive data. */ 407 #ifndef HCI_ACL_BUF_MAX 408 #define HCI_ACL_BUF_MAX GKI_BUF3_MAX 409 #endif 410 411 /* Receives SCO data packets from the lower-layer. */ 412 #ifndef HCI_SCO_POOL_ID 413 #define HCI_SCO_POOL_ID GKI_POOL_ID_6 414 #endif 415 416 /* Not used. */ 417 #ifndef HCI_DATA_DESCR_POOL_ID 418 #define HCI_DATA_DESCR_POOL_ID GKI_POOL_ID_0 419 #endif 420 421 /* Sends SDP data packets. */ 422 #ifndef SDP_POOL_ID 423 #define SDP_POOL_ID 3 424 #endif 425 426 /* Sends RFCOMM command packets. */ 427 #ifndef RFCOMM_CMD_POOL_ID 428 #define RFCOMM_CMD_POOL_ID GKI_POOL_ID_2 429 #endif 430 431 #ifndef RFCOMM_CMD_POOL_BUF_SIZE 432 #define RFCOMM_CMD_POOL_BUF_SIZE GKI_BUF2_SIZE 433 #endif 434 435 /* Sends RFCOMM data packets. */ 436 #ifndef RFCOMM_DATA_POOL_ID 437 #define RFCOMM_DATA_POOL_ID GKI_POOL_ID_3 438 #endif 439 440 #ifndef RFCOMM_DATA_POOL_BUF_SIZE 441 #define RFCOMM_DATA_POOL_BUF_SIZE GKI_BUF3_SIZE 442 #endif 443 444 /* Sends L2CAP packets to the peer and HCI messages to the controller. */ 445 #ifndef L2CAP_CMD_POOL_ID 446 #define L2CAP_CMD_POOL_ID GKI_POOL_ID_2 447 #endif 448 449 /* Sends L2CAP segmented packets in ERTM mode */ 450 #ifndef L2CAP_FCR_TX_POOL_ID 451 #define L2CAP_FCR_TX_POOL_ID HCI_ACL_POOL_ID 452 #endif 453 454 /* Receives L2CAP segmented packets in ERTM mode */ 455 #ifndef L2CAP_FCR_RX_POOL_ID 456 #define L2CAP_FCR_RX_POOL_ID HCI_ACL_POOL_ID 457 #endif 458 459 /* Number of ACL buffers to assign to LE 460 if the HCI buffer pool is shared with BR/EDR */ 461 #ifndef L2C_DEF_NUM_BLE_BUF_SHARED 462 #define L2C_DEF_NUM_BLE_BUF_SHARED 1 463 #endif 464 465 /* Used by BTM when it sends HCI commands to the controller. */ 466 #ifndef BTM_CMD_POOL_ID 467 #define BTM_CMD_POOL_ID GKI_POOL_ID_2 468 #endif 469 470 #ifndef OBX_CMD_POOL_SIZE 471 #define OBX_CMD_POOL_SIZE GKI_BUF2_SIZE 472 #endif 473 474 #ifndef OBX_LRG_DATA_POOL_SIZE 475 #define OBX_LRG_DATA_POOL_SIZE GKI_BUF4_SIZE 476 #endif 477 478 #ifndef OBX_LRG_DATA_POOL_ID 479 #define OBX_LRG_DATA_POOL_ID GKI_POOL_ID_4 480 #endif 481 482 /* Used for CTP discovery database. */ 483 #ifndef CTP_SDP_DB_POOL_ID 484 #define CTP_SDP_DB_POOL_ID GKI_POOL_ID_3 485 #endif 486 487 /* Used to send data to L2CAP. */ 488 #ifndef GAP_DATA_POOL_ID 489 #define GAP_DATA_POOL_ID GKI_POOL_ID_3 490 #endif 491 492 /* Used for SPP inquiry and discovery databases. */ 493 #ifndef SPP_DB_POOL_ID 494 #define SPP_DB_POOL_ID GKI_POOL_ID_3 495 #endif 496 497 #ifndef SPP_DB_SIZE 498 #define SPP_DB_SIZE GKI_BUF3_SIZE 499 #endif 500 501 /* BNEP data and protocol messages. */ 502 #ifndef BNEP_POOL_ID 503 #define BNEP_POOL_ID GKI_POOL_ID_3 504 #endif 505 506 /* RPC pool for temporary trace message buffers. */ 507 #ifndef RPC_SCRATCH_POOL_ID 508 #define RPC_SCRATCH_POOL_ID GKI_POOL_ID_2 509 #endif 510 511 /* RPC scratch buffer size (not related to RPC_SCRATCH_POOL_ID) */ 512 #ifndef RPC_SCRATCH_BUF_SIZE 513 #define RPC_SCRATCH_BUF_SIZE GKI_BUF3_SIZE 514 #endif 515 516 /* RPC pool for protocol messages */ 517 #ifndef RPC_MSG_POOL_ID 518 #define RPC_MSG_POOL_ID GKI_POOL_ID_3 519 #endif 520 521 #ifndef RPC_MSG_POOL_SIZE 522 #define RPC_MSG_POOL_SIZE GKI_BUF3_SIZE 523 #endif 524 525 /* AVDTP pool for protocol messages */ 526 #ifndef AVDT_CMD_POOL_ID 527 #define AVDT_CMD_POOL_ID GKI_POOL_ID_2 528 #endif 529 530 /* AVDTP pool size for media packets in case of fragmentation */ 531 #ifndef AVDT_DATA_POOL_SIZE 532 #define AVDT_DATA_POOL_SIZE GKI_BUF3_SIZE 533 #endif 534 535 #ifndef PAN_POOL_ID 536 #define PAN_POOL_ID GKI_POOL_ID_3 537 /* Maximum amount of the shared buffer to allocate for PAN */ 538 #define PAN_POOL_MAX (GKI_BUF3_MAX / 4) 539 #endif 540 541 /* UNV pool for read/write serialization */ 542 #ifndef UNV_MSG_POOL_ID 543 #define UNV_MSG_POOL_ID GKI_POOL_ID_2 544 #endif 545 546 #ifndef UNV_MSG_POOL_SIZE 547 #define UNV_MSG_POOL_SIZE GKI_BUF2_SIZE 548 #endif 549 550 /* AVCTP pool for protocol messages */ 551 #ifndef AVCT_CMD_POOL_ID 552 #define AVCT_CMD_POOL_ID GKI_POOL_ID_1 553 #endif 554 555 #ifndef AVCT_META_CMD_POOL_ID 556 #define AVCT_META_CMD_POOL_ID GKI_POOL_ID_2 557 #endif 558 559 /* AVRCP pool for protocol messages */ 560 #ifndef AVRC_CMD_POOL_ID 561 #define AVRC_CMD_POOL_ID GKI_POOL_ID_1 562 #endif 563 564 /* AVRCP pool size for protocol messages */ 565 #ifndef AVRC_CMD_POOL_SIZE 566 #define AVRC_CMD_POOL_SIZE GKI_BUF1_SIZE 567 #endif 568 569 /* AVRCP Metadata pool for protocol messages */ 570 #ifndef AVRC_META_CMD_POOL_ID 571 #define AVRC_META_CMD_POOL_ID GKI_POOL_ID_2 572 #endif 573 574 /* AVRCP Metadata pool size for protocol messages */ 575 #ifndef AVRC_META_CMD_POOL_SIZE 576 #define AVRC_META_CMD_POOL_SIZE GKI_BUF2_SIZE 577 #endif 578 579 580 /* AVRCP buffer size for browsing channel messages */ 581 #ifndef AVRC_BROWSE_POOL_SIZE 582 #define AVRC_BROWSE_POOL_SIZE GKI_MAX_BUF_SIZE 583 #endif 584 585 /* HDP buffer size for the Pulse Oximeter */ 586 #ifndef BTA_HL_LRG_DATA_POOL_SIZE 587 #define BTA_HL_LRG_DATA_POOL_SIZE GKI_BUF7_SIZE 588 #endif 589 590 #ifndef BTA_HL_LRG_DATA_POOL_ID 591 #define BTA_HL_LRG_DATA_POOL_ID GKI_POOL_ID_7 592 #endif 593 594 /* GATT Server Database pool ID */ 595 #ifndef GATT_DB_POOL_ID 596 #define GATT_DB_POOL_ID GKI_POOL_ID_8 597 #endif 598 599 /* GATT Data sending buffer pool ID, use default ACL pool for fix channel data */ 600 #ifndef GATT_BUF_POOL_ID 601 #define GATT_BUF_POOL_ID HCI_ACL_POOL_ID 602 #endif 603 604 /****************************************************************************** 605 ** 606 ** Lower Layer Interface 607 ** 608 ******************************************************************************/ 609 610 /* Sends ACL data received over HCI to the upper stack. */ 611 #ifndef HCI_ACL_DATA_TO_UPPER 612 #define HCI_ACL_DATA_TO_UPPER(p) {((BT_HDR *)p)->event = BT_EVT_TO_BTU_HCI_ACL; GKI_send_msg (BTU_TASK, BTU_HCI_RCV_MBOX, p);} 613 #endif 614 615 /* Sends SCO data received over HCI to the upper stack. */ 616 #ifndef HCI_SCO_DATA_TO_UPPER 617 #define HCI_SCO_DATA_TO_UPPER(p) {((BT_HDR *)p)->event = BT_EVT_TO_BTU_HCI_SCO; GKI_send_msg (BTU_TASK, BTU_HCI_RCV_MBOX, p);} 618 #endif 619 620 /* Sends an HCI event received over HCI to theupper stack. */ 621 #ifndef HCI_EVT_TO_UPPER 622 #define HCI_EVT_TO_UPPER(p) {((BT_HDR *)p)->event = BT_EVT_TO_BTU_HCI_EVT; GKI_send_msg (BTU_TASK, BTU_HCI_RCV_MBOX, p);} 623 #endif 624 625 /* Macro for allocating buffer for HCI commands */ 626 #ifndef HCI_GET_CMD_BUF 627 #if (!defined(HCI_USE_VARIABLE_SIZE_CMD_BUF) || (HCI_USE_VARIABLE_SIZE_CMD_BUF == FALSE)) 628 /* Allocate fixed-size buffer from HCI_CMD_POOL (default case) */ 629 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getpoolbuf (HCI_CMD_POOL_ID)) 630 #else 631 /* Allocate smallest possible buffer (for platforms with limited RAM) */ 632 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getbuf ((UINT16)(BT_HDR_SIZE + HCIC_PREAMBLE_SIZE + (paramlen)))) 633 #endif 634 #endif /* HCI_GET_CMD_BUF */ 635 636 /****************************************************************************** 637 ** 638 ** HCI Services (H4) 639 ** 640 ******************************************************************************/ 641 #ifndef HCISU_H4_INCLUDED 642 #define HCISU_H4_INCLUDED TRUE 643 #endif 644 645 #ifdef __cplusplus 646 extern "C" { 647 #endif 648 649 BT_API extern void bte_main_hci_send (BT_HDR *p_msg, UINT16 event); 650 #if (HCISU_H4_INCLUDED == TRUE) 651 BT_API extern void bte_main_lpm_allow_bt_device_sleep(void); 652 #endif 653 654 #ifdef __cplusplus 655 } 656 #endif 657 658 /* Sends ACL data received from the upper stack to the BD/EDR HCI transport. */ 659 #ifndef HCI_ACL_DATA_TO_LOWER 660 #define HCI_ACL_DATA_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_ACL); 661 #endif 662 663 #ifndef HCI_BLE_ACL_DATA_TO_LOWER 664 #define HCI_BLE_ACL_DATA_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), (UINT16)(BT_EVT_TO_LM_HCI_ACL|LOCAL_BLE_CONTROLLER_ID)); 665 #endif 666 667 /* Sends SCO data received from the upper stack to the HCI transport. */ 668 #ifndef HCI_SCO_DATA_TO_LOWER 669 #define HCI_SCO_DATA_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_SCO); 670 #endif 671 672 /* Sends an HCI command received from the upper stack to the BD/EDR HCI transport. */ 673 #ifndef HCI_CMD_TO_LOWER 674 #define HCI_CMD_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_CMD); 675 #endif 676 677 /* Sends an LM Diagnosic command received from the upper stack to the HCI transport. */ 678 #ifndef HCI_LM_DIAG_TO_LOWER 679 #define HCI_LM_DIAG_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_DIAG); 680 #endif 681 682 /* Send HCISU a message to allow BT sleep */ 683 #ifndef HCI_LP_ALLOW_BT_DEVICE_SLEEP 684 #define HCI_LP_ALLOW_BT_DEVICE_SLEEP() bte_main_lpm_allow_bt_device_sleep() 685 #endif 686 687 /* If nonzero, the upper-layer sends at most this number of HCI commands to the lower-layer. */ 688 #ifndef HCI_MAX_SIMUL_CMDS 689 #define HCI_MAX_SIMUL_CMDS 0 690 #endif 691 692 /* Timeout for receiving response to HCI command */ 693 #ifndef BTU_CMD_CMPL_TIMEOUT 694 #define BTU_CMD_CMPL_TIMEOUT 8 695 #endif 696 697 /* If TRUE, BTU task will check HCISU again when HCI command timer expires */ 698 #ifndef BTU_CMD_CMPL_TOUT_DOUBLE_CHECK 699 #define BTU_CMD_CMPL_TOUT_DOUBLE_CHECK FALSE 700 #endif 701 702 /* Use 2 second for low-resolution systems, override to 1 for high-resolution systems */ 703 #ifndef BT_1SEC_TIMEOUT 704 #define BT_1SEC_TIMEOUT (2) 705 #endif 706 707 /* Quick Timer */ 708 /* if L2CAP_FCR_INCLUDED is TRUE then it should have 100 millisecond resolution */ 709 /* if none of them is included then QUICK_TIMER_TICKS_PER_SEC is set to 0 to exclude quick timer */ 710 #ifndef QUICK_TIMER_TICKS_PER_SEC 711 #define QUICK_TIMER_TICKS_PER_SEC 10 /* 10ms timer */ 712 #endif 713 714 /****************************************************************************** 715 ** 716 ** BTM 717 ** 718 ******************************************************************************/ 719 /* if set to TRUE, stack will automatically send an HCI reset at start-up. To be 720 set to FALSE for advanced start-up / shut-down procedures using USER_HW_ENABLE_API 721 and USER_HW_DISABLE_API macros */ 722 #ifndef BTM_AUTOMATIC_HCI_RESET 723 #define BTM_AUTOMATIC_HCI_RESET FALSE 724 #endif 725 726 /* Include BTM Discovery database and code. */ 727 #ifndef BTM_DISCOVERY_INCLUDED 728 #define BTM_DISCOVERY_INCLUDED TRUE 729 #endif 730 731 /* Include inquiry code. */ 732 #ifndef BTM_INQUIRY_INCLUDED 733 #define BTM_INQUIRY_INCLUDED TRUE 734 #endif 735 736 /* Cancel Inquiry on incoming SSP */ 737 #ifndef BTM_NO_SSP_ON_INQUIRY 738 #define BTM_NO_SSP_ON_INQUIRY FALSE 739 #endif 740 741 /* Include periodic inquiry code (used when BTM_INQUIRY_INCLUDED is TRUE). */ 742 #ifndef BTM_PERIODIC_INQ_INCLUDED 743 #define BTM_PERIODIC_INQ_INCLUDED TRUE 744 #endif 745 746 /* Include security authorization code */ 747 #ifndef BTM_AUTHORIZATION_INCLUDED 748 #define BTM_AUTHORIZATION_INCLUDED TRUE 749 #endif 750 751 /* Includes SCO if TRUE */ 752 #ifndef BTM_SCO_INCLUDED 753 #define BTM_SCO_INCLUDED TRUE /* TRUE includes SCO code */ 754 #endif 755 756 /* Includes SCO if TRUE */ 757 #ifndef BTM_SCO_HCI_INCLUDED 758 #define BTM_SCO_HCI_INCLUDED FALSE /* TRUE includes SCO over HCI code */ 759 #endif 760 761 /* Includes WBS if TRUE */ 762 #ifndef BTM_WBS_INCLUDED 763 #define BTM_WBS_INCLUDED FALSE /* TRUE includes WBS code */ 764 #endif 765 766 /* Includes PCM2 support if TRUE */ 767 #ifndef BTM_PCM2_INCLUDED 768 #define BTM_PCM2_INCLUDED FALSE 769 #endif 770 771 /* This is used to work around a controller bug that doesn't like Disconnect 772 ** issued while there is a role switch in progress 773 */ 774 #ifndef BTM_DISC_DURING_RS 775 #define BTM_DISC_DURING_RS TRUE 776 #endif 777 778 /************************** 779 ** Initial SCO TX credit 780 *************************/ 781 /* max TX SCO data packet size */ 782 #ifndef BTM_SCO_DATA_SIZE_MAX 783 #define BTM_SCO_DATA_SIZE_MAX 240 784 #endif 785 786 /* maximum BTM buffering capacity */ 787 #ifndef BTM_SCO_MAX_BUF_CAP 788 #define BTM_SCO_MAX_BUF_CAP (BTM_SCO_INIT_XMIT_CREDIT * 4) 789 #endif 790 791 /* The size in bytes of the BTM inquiry database. */ 792 #ifndef BTM_INQ_DB_SIZE 793 #define BTM_INQ_DB_SIZE 40 794 #endif 795 796 /* This is set to enable automatic periodic inquiry at startup. */ 797 #ifndef BTM_ENABLE_AUTO_INQUIRY 798 #define BTM_ENABLE_AUTO_INQUIRY FALSE 799 #endif 800 801 /* This is set to always try to acquire the remote device name. */ 802 #ifndef BTM_INQ_GET_REMOTE_NAME 803 #define BTM_INQ_GET_REMOTE_NAME FALSE 804 #endif 805 806 /* The inquiry duration in 1.28 second units when auto inquiry is enabled. */ 807 #ifndef BTM_DEFAULT_INQ_DUR 808 #define BTM_DEFAULT_INQ_DUR 5 809 #endif 810 811 /* The inquiry mode when auto inquiry is enabled. */ 812 #ifndef BTM_DEFAULT_INQ_MODE 813 #define BTM_DEFAULT_INQ_MODE BTM_GENERAL_INQUIRY 814 #endif 815 816 /* The default periodic inquiry maximum delay when auto inquiry is enabled, in 1.28 second units. */ 817 #ifndef BTM_DEFAULT_INQ_MAX_DELAY 818 #define BTM_DEFAULT_INQ_MAX_DELAY 30 819 #endif 820 821 /* The default periodic inquiry minimum delay when auto inquiry is enabled, in 1.28 second units. */ 822 #ifndef BTM_DEFAULT_INQ_MIN_DELAY 823 #define BTM_DEFAULT_INQ_MIN_DELAY 20 824 #endif 825 826 /* The maximum age of entries in inquiry database in seconds ('0' disables feature). */ 827 #ifndef BTM_INQ_MAX_AGE 828 #define BTM_INQ_MAX_AGE 0 829 #endif 830 831 /* The maximum age of entries in inquiry database based on inquiry response failure ('0' disables feature). */ 832 #ifndef BTM_INQ_AGE_BY_COUNT 833 #define BTM_INQ_AGE_BY_COUNT 0 834 #endif 835 836 /* TRUE if controller does not support inquiry event filtering. */ 837 #ifndef BTM_BYPASS_EVENT_FILTERING 838 #define BTM_BYPASS_EVENT_FILTERING FALSE 839 #endif 840 841 /* TRUE if inquiry filtering is desired from BTM. */ 842 #ifndef BTM_USE_INQ_RESULTS_FILTER 843 #define BTM_USE_INQ_RESULTS_FILTER TRUE 844 #endif 845 846 /* The default scan mode */ 847 #ifndef BTM_DEFAULT_SCAN_TYPE 848 #define BTM_DEFAULT_SCAN_TYPE BTM_SCAN_TYPE_INTERLACED 849 #endif 850 851 /* Should connections to unknown devices be allowed when not discoverable? */ 852 #ifndef BTM_ALLOW_CONN_IF_NONDISCOVER 853 #define BTM_ALLOW_CONN_IF_NONDISCOVER TRUE 854 #endif 855 856 /* When connectable mode is set to TRUE, the device will respond to paging. */ 857 #ifndef BTM_IS_CONNECTABLE 858 #define BTM_IS_CONNECTABLE FALSE 859 #endif 860 861 /* Sets the Page_Scan_Window: the length of time that the device is performing a page scan. */ 862 #ifndef BTM_DEFAULT_CONN_WINDOW 863 #define BTM_DEFAULT_CONN_WINDOW 0x0012 864 #endif 865 866 /* Sets the Page_Scan_Activity: the interval between the start of two consecutive page scans. */ 867 #ifndef BTM_DEFAULT_CONN_INTERVAL 868 #define BTM_DEFAULT_CONN_INTERVAL 0x0800 869 #endif 870 871 /* This is set to automatically perform inquiry scan on startup. */ 872 #ifndef BTM_IS_DISCOVERABLE 873 #define BTM_IS_DISCOVERABLE FALSE 874 #endif 875 876 /* When automatic inquiry scan is enabled, this sets the discovery mode. */ 877 #ifndef BTM_DEFAULT_DISC_MODE 878 #define BTM_DEFAULT_DISC_MODE BTM_GENERAL_DISCOVERABLE 879 #endif 880 881 /* When automatic inquiry scan is enabled, this sets the inquiry scan window. */ 882 #ifndef BTM_DEFAULT_DISC_WINDOW 883 #define BTM_DEFAULT_DISC_WINDOW 0x0012 884 #endif 885 886 /* When automatic inquiry scan is enabled, this sets the inquiry scan interval. */ 887 #ifndef BTM_DEFAULT_DISC_INTERVAL 888 #define BTM_DEFAULT_DISC_INTERVAL 0x0800 889 #endif 890 891 /* Sets the period, in seconds, to automatically perform service discovery. */ 892 #ifndef BTM_AUTO_DISCOVERY_PERIOD 893 #define BTM_AUTO_DISCOVERY_PERIOD 0 894 #endif 895 896 /* The size in bytes of the BTM discovery database (if discovery is included). */ 897 #ifndef BTM_DISCOVERY_DB_SIZE 898 #define BTM_DISCOVERY_DB_SIZE 4000 899 #endif 900 901 /* Number of milliseconds to delay BTU task startup upon device initialization. */ 902 #ifndef BTU_STARTUP_DELAY 903 #define BTU_STARTUP_DELAY 0 904 #endif 905 906 /* Whether BTA is included in BTU task. */ 907 #ifndef BTU_BTA_INCLUDED 908 #define BTU_BTA_INCLUDED TRUE 909 #endif 910 911 /* Number of seconds to wait to send an HCI Reset command upon device initialization. */ 912 #ifndef BTM_FIRST_RESET_DELAY 913 #define BTM_FIRST_RESET_DELAY 0 914 #endif 915 916 /* The number of seconds to wait for controller module to reset after issuing an HCI Reset command. */ 917 #ifndef BTM_AFTER_RESET_TIMEOUT 918 #define BTM_AFTER_RESET_TIMEOUT 0 919 #endif 920 921 /* Default class of device 922 * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS} 923 * 924 * SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony) 925 * MAJOR_CLASS:0x02 - PHONE 926 * MINOR_CLASS:0x0C - SMART_PHONE 927 * 928 */ 929 #ifndef BTA_DM_COD 930 #define BTA_DM_COD {0x5A, 0x02, 0x0C} 931 #endif 932 933 /* The number of SCO links. */ 934 #ifndef BTM_MAX_SCO_LINKS 935 #define BTM_MAX_SCO_LINKS 3 936 #endif 937 938 /* The preferred type of SCO links (2-eSCO, 0-SCO). */ 939 #ifndef BTM_DEFAULT_SCO_MODE 940 #define BTM_DEFAULT_SCO_MODE 2 941 #endif 942 943 /* The number of security records for peer devices. */ 944 #ifndef BTM_SEC_MAX_DEVICE_RECORDS 945 #define BTM_SEC_MAX_DEVICE_RECORDS 100 946 #endif 947 948 /* The number of security records for services. */ 949 #ifndef BTM_SEC_MAX_SERVICE_RECORDS 950 #define BTM_SEC_MAX_SERVICE_RECORDS 32 951 #endif 952 953 /* If True, force a retrieval of remote device name for each bond in case it's changed */ 954 #ifndef BTM_SEC_FORCE_RNR_FOR_DBOND 955 #define BTM_SEC_FORCE_RNR_FOR_DBOND FALSE 956 #endif 957 958 /* Maximum device name length used in btm database. */ 959 #ifndef BTM_MAX_REM_BD_NAME_LEN 960 #define BTM_MAX_REM_BD_NAME_LEN 248 961 #endif 962 963 /* Maximum local device name length stored btm database. 964 '0' disables storage of the local name in BTM */ 965 #ifndef BTM_MAX_LOC_BD_NAME_LEN 966 #define BTM_MAX_LOC_BD_NAME_LEN 248 967 #endif 968 969 /* Fixed Default String. When this is defined as null string, the device's 970 * product model name is used as the default local name. 971 */ 972 #ifndef BTM_DEF_LOCAL_NAME 973 #define BTM_DEF_LOCAL_NAME "" 974 #endif 975 976 /* Maximum service name stored with security authorization (0 if not needed) */ 977 #ifndef BTM_SEC_SERVICE_NAME_LEN 978 #define BTM_SEC_SERVICE_NAME_LEN BT_MAX_SERVICE_NAME_LEN 979 #endif 980 981 /* Maximum number of pending security callback */ 982 #ifndef BTM_SEC_MAX_CALLBACKS 983 #define BTM_SEC_MAX_CALLBACKS 7 984 #endif 985 986 /* Maximum length of the service name. */ 987 #ifndef BT_MAX_SERVICE_NAME_LEN 988 #define BT_MAX_SERVICE_NAME_LEN 21 989 #endif 990 991 /* ACL buffer size in HCI Host Buffer Size command. */ 992 #ifndef BTM_ACL_BUF_SIZE 993 #define BTM_ACL_BUF_SIZE 0 994 #endif 995 996 /* This is set to use the BTM power manager. */ 997 #ifndef BTM_PWR_MGR_INCLUDED 998 #define BTM_PWR_MGR_INCLUDED TRUE 999 #endif 1000 1001 /* The maximum number of clients that can register with the power manager. */ 1002 #ifndef BTM_MAX_PM_RECORDS 1003 #define BTM_MAX_PM_RECORDS 2 1004 #endif 1005 1006 /* This is set to show debug trace messages for the power manager. */ 1007 #ifndef BTM_PM_DEBUG 1008 #define BTM_PM_DEBUG FALSE 1009 #endif 1010 1011 /* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */ 1012 #ifndef BTM_SCO_WAKE_PARKED_LINK 1013 #define BTM_SCO_WAKE_PARKED_LINK TRUE 1014 #endif 1015 1016 /* May be set to the the name of a function used for vendor specific chip initialization */ 1017 #ifndef BTM_APP_DEV_INIT 1018 /* #define BTM_APP_DEV_INIT myInitFunction() */ 1019 #endif 1020 1021 /* This is set to TRUE if the busy level change event is desired. (replace ACL change event) */ 1022 #ifndef BTM_BUSY_LEVEL_CHANGE_INCLUDED 1023 #define BTM_BUSY_LEVEL_CHANGE_INCLUDED TRUE 1024 #endif 1025 1026 /* If the user does not respond to security process requests within this many seconds, 1027 * a negative response would be sent automatically. 1028 * It's recommended to use a value between 30 and OBX_TIMEOUT_VALUE 1029 * 30 is LMP response timeout value */ 1030 #ifndef BTM_SEC_TIMEOUT_VALUE 1031 #define BTM_SEC_TIMEOUT_VALUE 35 1032 #endif 1033 1034 /* Maximum number of callbacks that can be registered using BTM_RegisterForVSEvents */ 1035 #ifndef BTM_MAX_VSE_CALLBACKS 1036 #define BTM_MAX_VSE_CALLBACKS 3 1037 #endif 1038 1039 /****************************************** 1040 ** Lisbon Features 1041 *******************************************/ 1042 /* This is set to TRUE if the server Extended Inquiry Response feature is desired. */ 1043 /* server sends EIR to client */ 1044 #ifndef BTM_EIR_SERVER_INCLUDED 1045 #define BTM_EIR_SERVER_INCLUDED TRUE 1046 #endif 1047 1048 /* This is set to TRUE if the client Extended Inquiry Response feature is desired. */ 1049 /* client inquiry to server */ 1050 #ifndef BTM_EIR_CLIENT_INCLUDED 1051 #define BTM_EIR_CLIENT_INCLUDED TRUE 1052 #endif 1053 1054 /* This is set to TRUE if the FEC is required for EIR packet. */ 1055 #ifndef BTM_EIR_DEFAULT_FEC_REQUIRED 1056 #define BTM_EIR_DEFAULT_FEC_REQUIRED TRUE 1057 #endif 1058 1059 /* User defined UUID look up table */ 1060 #ifndef BTM_EIR_UUID_LKUP_TBL 1061 #endif 1062 1063 /* The IO capability of the local device (for Simple Pairing) */ 1064 #ifndef BTM_LOCAL_IO_CAPS 1065 #define BTM_LOCAL_IO_CAPS BTM_IO_CAP_IO 1066 #endif 1067 1068 /* The default MITM Protection Requirement (for Simple Pairing) 1069 * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */ 1070 #ifndef BTM_DEFAULT_AUTH_REQ 1071 #define BTM_DEFAULT_AUTH_REQ BTM_AUTH_SP_NO 1072 #endif 1073 1074 /* The default MITM Protection Requirement for dedicated bonding using Simple Pairing 1075 * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */ 1076 #ifndef BTM_DEFAULT_DD_AUTH_REQ 1077 #define BTM_DEFAULT_DD_AUTH_REQ BTM_AUTH_AP_YES 1078 #endif 1079 1080 /* Include Out-of-Band implementation for Simple Pairing */ 1081 #ifndef BTM_OOB_INCLUDED 1082 #define BTM_OOB_INCLUDED TRUE 1083 #endif 1084 1085 /* TRUE to include Sniff Subrating */ 1086 #ifndef BTM_SSR_INCLUDED 1087 #define BTM_SSR_INCLUDED TRUE 1088 #endif 1089 1090 /************************* 1091 ** End of Lisbon Features 1092 **************************/ 1093 1094 /* Used for conformance testing ONLY */ 1095 #ifndef BTM_BLE_CONFORMANCE_TESTING 1096 #define BTM_BLE_CONFORMANCE_TESTING FALSE 1097 #endif 1098 1099 /* Maximum number of consecutive HCI commands that can time out 1100 * before it gets treated as H/w error*/ 1101 #ifndef BTM_MAX_HCI_CMD_TOUT_BEFORE_RESTART 1102 #define BTM_MAX_HCI_CMD_TOUT_BEFORE_RESTART 2 1103 #endif 1104 1105 /****************************************************************************** 1106 ** 1107 ** L2CAP 1108 ** 1109 ******************************************************************************/ 1110 1111 /* Flow control and retransmission mode */ 1112 1113 #ifndef L2CAP_FCR_INCLUDED 1114 #define L2CAP_FCR_INCLUDED TRUE 1115 #endif 1116 1117 /* The maximum number of simultaneous links that L2CAP can support. */ 1118 #ifndef MAX_ACL_CONNECTIONS 1119 #define MAX_L2CAP_LINKS 7 1120 #else 1121 #define MAX_L2CAP_LINKS MAX_ACL_CONNECTIONS 1122 #endif 1123 1124 /* The maximum number of simultaneous channels that L2CAP can support. */ 1125 #ifndef MAX_L2CAP_CHANNELS 1126 #define MAX_L2CAP_CHANNELS 16 1127 #endif 1128 1129 /* The maximum number of simultaneous applications that can register with L2CAP. */ 1130 #ifndef MAX_L2CAP_CLIENTS 1131 #define MAX_L2CAP_CLIENTS 15 1132 #endif 1133 1134 /* The number of seconds of link inactivity before a link is disconnected. */ 1135 #ifndef L2CAP_LINK_INACTIVITY_TOUT 1136 #define L2CAP_LINK_INACTIVITY_TOUT 4 1137 #endif 1138 1139 /* The number of seconds of link inactivity after bonding before a link is disconnected. */ 1140 #ifndef L2CAP_BONDING_TIMEOUT 1141 #define L2CAP_BONDING_TIMEOUT 3 1142 #endif 1143 1144 /* The time from the HCI connection complete to disconnect if no channel is established. */ 1145 #ifndef L2CAP_LINK_STARTUP_TOUT 1146 #define L2CAP_LINK_STARTUP_TOUT 60 1147 #endif 1148 1149 /* The L2CAP MTU; must be in accord with the HCI ACL pool size. */ 1150 #ifndef L2CAP_MTU_SIZE 1151 #define L2CAP_MTU_SIZE 1691 1152 #endif 1153 1154 /* The L2CAP MPS over Bluetooth; must be in accord with the FCR tx pool size and ACL down buffer size. */ 1155 #ifndef L2CAP_MPS_OVER_BR_EDR 1156 #define L2CAP_MPS_OVER_BR_EDR 1010 1157 #endif 1158 1159 /* This is set to enable host flow control. */ 1160 #ifndef L2CAP_HOST_FLOW_CTRL 1161 #define L2CAP_HOST_FLOW_CTRL FALSE 1162 #endif 1163 1164 /* If host flow control enabled, this is the number of buffers the controller can have unacknowledged. */ 1165 #ifndef L2CAP_HOST_FC_ACL_BUFS 1166 #define L2CAP_HOST_FC_ACL_BUFS 20 1167 #endif 1168 1169 /* The percentage of the queue size allowed before a congestion event is sent to the L2CAP client (typically 120%). */ 1170 #ifndef L2CAP_FWD_CONG_THRESH 1171 #define L2CAP_FWD_CONG_THRESH 120 1172 #endif 1173 1174 /* This is set to enable L2CAP to take the ACL link out of park mode when ACL data is to be sent. */ 1175 #ifndef L2CAP_WAKE_PARKED_LINK 1176 #define L2CAP_WAKE_PARKED_LINK TRUE 1177 #endif 1178 1179 /* Whether link wants to be the master or the slave. */ 1180 #ifndef L2CAP_DESIRED_LINK_ROLE 1181 #define L2CAP_DESIRED_LINK_ROLE HCI_ROLE_SLAVE 1182 #endif 1183 1184 /* Include Non-Flushable Packet Boundary Flag feature of Lisbon */ 1185 #ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED 1186 #define L2CAP_NON_FLUSHABLE_PB_INCLUDED TRUE 1187 #endif 1188 1189 /* Minimum number of ACL credit for high priority link */ 1190 #ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 1191 #define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 5 1192 #endif 1193 1194 /* used for monitoring HCI ACL credit management */ 1195 #ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG 1196 #define L2CAP_HCI_FLOW_CONTROL_DEBUG TRUE 1197 #endif 1198 1199 /* Used for calculating transmit buffers off of */ 1200 #ifndef L2CAP_NUM_XMIT_BUFFS 1201 #define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX 1202 #endif 1203 1204 /* Unicast Connectionless Data */ 1205 #ifndef L2CAP_UCD_INCLUDED 1206 #define L2CAP_UCD_INCLUDED FALSE 1207 #endif 1208 1209 /* Unicast Connectionless Data MTU */ 1210 #ifndef L2CAP_UCD_MTU 1211 #define L2CAP_UCD_MTU L2CAP_MTU_SIZE 1212 #endif 1213 1214 /* Unicast Connectionless Data Idle Timeout */ 1215 #ifndef L2CAP_UCD_IDLE_TIMEOUT 1216 #define L2CAP_UCD_IDLE_TIMEOUT 2 1217 #endif 1218 1219 /* Unicast Connectionless Data Idle Timeout */ 1220 #ifndef L2CAP_UCD_CH_PRIORITY 1221 #define L2CAP_UCD_CH_PRIORITY L2CAP_CHNL_PRIORITY_MEDIUM 1222 #endif 1223 1224 /* Max clients on Unicast Connectionless Data */ 1225 #ifndef L2CAP_MAX_UCD_CLIENTS 1226 #define L2CAP_MAX_UCD_CLIENTS 5 1227 #endif 1228 1229 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */ 1230 /* Excluding L2CAP signaling channel and UCD */ 1231 #ifndef L2CAP_NUM_FIXED_CHNLS 1232 #define L2CAP_NUM_FIXED_CHNLS 4 1233 #endif 1234 1235 /* First fixed channel supported */ 1236 #ifndef L2CAP_FIRST_FIXED_CHNL 1237 #define L2CAP_FIRST_FIXED_CHNL 3 1238 #endif 1239 1240 #ifndef L2CAP_LAST_FIXED_CHNL 1241 #define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1) 1242 #endif 1243 1244 /* Round Robin service channels in link */ 1245 #ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE 1246 #define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE TRUE 1247 #endif 1248 1249 /* Used for calculating transmit buffers off of */ 1250 #ifndef L2CAP_NUM_XMIT_BUFFS 1251 #define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX 1252 #endif 1253 1254 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */ 1255 #ifndef L2CAP_NUM_FIXED_CHNLS 1256 #define L2CAP_NUM_FIXED_CHNLS 1 1257 #endif 1258 1259 /* First fixed channel supported */ 1260 #ifndef L2CAP_FIRST_FIXED_CHNL 1261 #define L2CAP_FIRST_FIXED_CHNL 3 1262 #endif 1263 1264 #ifndef L2CAP_LAST_FIXED_CHNL 1265 #define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1) 1266 #endif 1267 1268 /* used for monitoring eL2CAP data flow */ 1269 #ifndef L2CAP_ERTM_STATS 1270 #define L2CAP_ERTM_STATS FALSE 1271 #endif 1272 1273 /* USED FOR FCR TEST ONLY: When TRUE generates bad tx and rx packets */ 1274 #ifndef L2CAP_CORRUPT_ERTM_PKTS 1275 #define L2CAP_CORRUPT_ERTM_PKTS FALSE 1276 #endif 1277 1278 /* Used for conformance testing ONLY: When TRUE lets scriptwrapper overwrite info response */ 1279 #ifndef L2CAP_CONFORMANCE_TESTING 1280 #define L2CAP_CONFORMANCE_TESTING FALSE 1281 #endif 1282 1283 1284 #ifndef TIMER_PARAM_TYPE 1285 #ifdef WIN2000 1286 #define TIMER_PARAM_TYPE void * 1287 #else 1288 #define TIMER_PARAM_TYPE UINT32 1289 #endif 1290 #endif 1291 1292 /****************************************************************************** 1293 ** 1294 ** BLE 1295 ** 1296 ******************************************************************************/ 1297 1298 #ifndef BLE_INCLUDED 1299 #define BLE_INCLUDED TRUE 1300 #endif 1301 1302 #ifndef BLE_ANDROID_CONTROLLER_SCAN_FILTER 1303 #define BLE_ANDROID_CONTROLLER_SCAN_FILTER TRUE 1304 #endif 1305 1306 #ifndef LOCAL_BLE_CONTROLLER_ID 1307 #define LOCAL_BLE_CONTROLLER_ID (1) 1308 #endif 1309 1310 #ifndef BLE_PRIVACY_SPT 1311 #define BLE_PRIVACY_SPT TRUE 1312 #endif 1313 1314 #ifndef BLE_VND_INCLUDED 1315 #define BLE_VND_INCLUDED FALSE 1316 #endif 1317 1318 #ifndef BTM_BLE_ADV_TX_POWER 1319 #define BTM_BLE_ADV_TX_POWER {-21, -15, -7, 1, 9} 1320 #endif 1321 1322 1323 #ifndef BLE_BATCH_SCAN_INCLUDED 1324 #define BLE_BATCH_SCAN_INCLUDED TRUE 1325 #endif 1326 1327 /****************************************************************************** 1328 ** 1329 ** ATT/GATT Protocol/Profile Settings 1330 ** 1331 ******************************************************************************/ 1332 #ifndef BTA_GATT_INCLUDED 1333 #if BLE_INCLUDED == TRUE 1334 #define BTA_GATT_INCLUDED TRUE 1335 #else 1336 #define BTA_GATT_INCLUDED FALSE 1337 #endif 1338 #endif 1339 1340 #if BTA_GATT_INCLUDED == TRUE && BLE_INCLUDED == FALSE 1341 #error "can't have GATT without BLE" 1342 #endif 1343 1344 #ifndef BLE_LLT_INCLUDED 1345 #define BLE_LLT_INCLUDED TRUE 1346 #endif 1347 #ifndef BTM_DUMO_ADDR_CENTRAL_ENABLED 1348 #define BTM_DUMO_ADDR_CENTRAL_ENABLED FALSE 1349 #endif 1350 #ifndef ATT_INCLUDED 1351 #define ATT_INCLUDED TRUE 1352 #endif 1353 1354 #ifndef ATT_DEBUG 1355 #define ATT_DEBUG TRUE 1356 #endif 1357 1358 #ifndef GATT_SERVER_ENABLED 1359 #define GATT_SERVER_ENABLED TRUE 1360 #endif 1361 1362 #ifndef GATT_CLIENT_ENABLED 1363 #define GATT_CLIENT_ENABLED TRUE 1364 #endif 1365 1366 #ifndef BLE_PERIPHERAL_MODE_SUPPORT 1367 #define BLE_PERIPHERAL_MODE_SUPPORT TRUE 1368 #endif 1369 1370 #ifndef BLE_PERIPHERAL_ADV_NAME 1371 #define BLE_PERIPHERAL_ADV_NAME FALSE 1372 #endif 1373 1374 #ifndef BLE_DELAY_REQUEST_ENC 1375 /* This flag is to work around IPHONE problem, We need to wait for iPhone ready 1376 before send encryption request to iPhone */ 1377 #define BLE_DELAY_REQUEST_ENC FALSE 1378 #endif 1379 1380 #ifndef GAP_TRANSPORT_SUPPORTED 1381 #define GAP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR 1382 #endif 1383 1384 #ifndef GATTP_TRANSPORT_SUPPORTED 1385 #define GATTP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR 1386 #endif 1387 1388 #ifndef GATT_MAX_SR_PROFILES 1389 #define GATT_MAX_SR_PROFILES 32 /* max is 32 */ 1390 #endif 1391 1392 #ifndef GATT_MAX_APPS 1393 #define GATT_MAX_APPS 32 /* note: 2 apps used internally GATT and GAP */ 1394 #endif 1395 1396 #ifndef GATT_MAX_CL_PROFILES 1397 #define GATT_MAX_CL_PROFILES 4 1398 #endif 1399 1400 #ifndef GATT_MAX_PHY_CHANNEL 1401 #define GATT_MAX_PHY_CHANNEL 7 1402 #endif 1403 1404 /* Used for conformance testing ONLY */ 1405 #ifndef GATT_CONFORMANCE_TESTING 1406 #define GATT_CONFORMANCE_TESTING FALSE 1407 #endif 1408 1409 /* number of background connection device allowence, ideally to be the same as WL size 1410 */ 1411 #ifndef GATT_MAX_BG_CONN_DEV 1412 #define GATT_MAX_BG_CONN_DEV 32 1413 #endif 1414 1415 /****************************************************************************** 1416 ** 1417 ** SMP 1418 ** 1419 ******************************************************************************/ 1420 #ifndef SMP_INCLUDED 1421 #if BLE_INCLUDED == TRUE 1422 #define SMP_INCLUDED TRUE 1423 #else 1424 #define SMP_INCLUDED FALSE 1425 #endif 1426 #endif 1427 1428 #if SMP_INCLUDED == TRUE && BLE_INCLUDED == FALSE 1429 #error "can't have SMP without BLE" 1430 #endif 1431 1432 #ifndef SMP_DEBUG 1433 #define SMP_DEBUG TRUE 1434 #endif 1435 1436 #ifndef SMP_DEFAULT_AUTH_REQ 1437 #define SMP_DEFAULT_AUTH_REQ SMP_AUTH_NB_ENC_ONLY 1438 #endif 1439 1440 #ifndef SMP_MAX_ENC_KEY_SIZE 1441 #define SMP_MAX_ENC_KEY_SIZE 16 1442 #endif 1443 1444 #ifndef SMP_MIN_ENC_KEY_SIZE 1445 #define SMP_MIN_ENC_KEY_SIZE 7 1446 #endif 1447 1448 /* Used for conformance testing ONLY */ 1449 #ifndef SMP_CONFORMANCE_TESTING 1450 #define SMP_CONFORMANCE_TESTING FALSE 1451 #endif 1452 1453 /****************************************************************************** 1454 ** 1455 ** SDP 1456 ** 1457 ******************************************************************************/ 1458 1459 /* This is set to enable SDP server functionality. */ 1460 #ifndef SDP_SERVER_ENABLED 1461 #define SDP_SERVER_ENABLED TRUE 1462 #endif 1463 1464 /* The maximum number of SDP records the server can support. */ 1465 #ifndef SDP_MAX_RECORDS 1466 #define SDP_MAX_RECORDS 20 1467 #endif 1468 1469 /* The maximum number of attributes in each record. */ 1470 #ifndef SDP_MAX_REC_ATTR 1471 //#if defined(HID_DEV_INCLUDED) && (HID_DEV_INCLUDED==TRUE) 1472 #define SDP_MAX_REC_ATTR 25 1473 //#else 1474 //#define SDP_MAX_REC_ATTR 13 1475 //#endif 1476 #endif 1477 1478 #ifndef SDP_MAX_PAD_LEN 1479 #define SDP_MAX_PAD_LEN 600 1480 #endif 1481 1482 /* The maximum length, in bytes, of an attribute. */ 1483 #ifndef SDP_MAX_ATTR_LEN 1484 //#if defined(HID_DEV_INCLUDED) && (HID_DEV_INCLUDED==TRUE) 1485 //#define SDP_MAX_ATTR_LEN 80 1486 //#else 1487 //#define SDP_MAX_ATTR_LEN 100 1488 //#endif 1489 #define SDP_MAX_ATTR_LEN 400 1490 #endif 1491 1492 /* The maximum number of attribute filters supported by SDP databases. */ 1493 #ifndef SDP_MAX_ATTR_FILTERS 1494 #define SDP_MAX_ATTR_FILTERS 15 1495 #endif 1496 1497 /* The maximum number of UUID filters supported by SDP databases. */ 1498 #ifndef SDP_MAX_UUID_FILTERS 1499 #define SDP_MAX_UUID_FILTERS 3 1500 #endif 1501 1502 /* This is set to enable SDP client functionality. */ 1503 #ifndef SDP_CLIENT_ENABLED 1504 #define SDP_CLIENT_ENABLED TRUE 1505 #endif 1506 1507 /* The maximum number of record handles retrieved in a search. */ 1508 #ifndef SDP_MAX_DISC_SERVER_RECS 1509 #define SDP_MAX_DISC_SERVER_RECS 21 1510 #endif 1511 1512 /* The size of a scratchpad buffer, in bytes, for storing the response to an attribute request. */ 1513 #ifndef SDP_MAX_LIST_BYTE_COUNT 1514 #define SDP_MAX_LIST_BYTE_COUNT 4096 1515 #endif 1516 1517 /* The maximum number of parameters in an SDP protocol element. */ 1518 #ifndef SDP_MAX_PROTOCOL_PARAMS 1519 #define SDP_MAX_PROTOCOL_PARAMS 2 1520 #endif 1521 1522 /* The maximum number of simultaneous client and server connections. */ 1523 #ifndef SDP_MAX_CONNECTIONS 1524 #define SDP_MAX_CONNECTIONS 4 1525 #endif 1526 1527 /* The MTU size for the L2CAP configuration. */ 1528 #ifndef SDP_MTU_SIZE 1529 #define SDP_MTU_SIZE 672 1530 #endif 1531 1532 /* The flush timeout for the L2CAP configuration. */ 1533 #ifndef SDP_FLUSH_TO 1534 #define SDP_FLUSH_TO 0xFFFF 1535 #endif 1536 1537 /* The name for security authorization. */ 1538 #ifndef SDP_SERVICE_NAME 1539 #define SDP_SERVICE_NAME "Service Discovery" 1540 #endif 1541 1542 /* The security level for BTM. */ 1543 #ifndef SDP_SECURITY_LEVEL 1544 #define SDP_SECURITY_LEVEL BTM_SEC_NONE 1545 #endif 1546 1547 /* Device identification feature. */ 1548 #ifndef SDP_DI_INCLUDED 1549 #define SDP_DI_INCLUDED TRUE 1550 #endif 1551 1552 /****************************************************************************** 1553 ** 1554 ** RFCOMM 1555 ** 1556 ******************************************************************************/ 1557 1558 #ifndef RFCOMM_INCLUDED 1559 #define RFCOMM_INCLUDED TRUE 1560 #endif 1561 1562 /* The maximum number of ports supported. */ 1563 #ifndef MAX_RFC_PORTS 1564 #define MAX_RFC_PORTS 30 1565 #endif 1566 1567 /* The maximum simultaneous links to different devices. */ 1568 #ifndef MAX_ACL_CONNECTIONS 1569 #define MAX_BD_CONNECTIONS 7 1570 #else 1571 #define MAX_BD_CONNECTIONS MAX_ACL_CONNECTIONS 1572 #endif 1573 1574 /* The port receive queue low watermark level, in bytes. */ 1575 #ifndef PORT_RX_LOW_WM 1576 #define PORT_RX_LOW_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM) 1577 #endif 1578 1579 /* The port receive queue high watermark level, in bytes. */ 1580 #ifndef PORT_RX_HIGH_WM 1581 #define PORT_RX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM) 1582 #endif 1583 1584 /* The port receive queue critical watermark level, in bytes. */ 1585 #ifndef PORT_RX_CRITICAL_WM 1586 #define PORT_RX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM) 1587 #endif 1588 1589 /* The port receive queue low watermark level, in number of buffers. */ 1590 #ifndef PORT_RX_BUF_LOW_WM 1591 #define PORT_RX_BUF_LOW_WM 4 1592 #endif 1593 1594 /* The port receive queue high watermark level, in number of buffers. */ 1595 #ifndef PORT_RX_BUF_HIGH_WM 1596 #define PORT_RX_BUF_HIGH_WM 10 1597 #endif 1598 1599 /* The port receive queue critical watermark level, in number of buffers. */ 1600 #ifndef PORT_RX_BUF_CRITICAL_WM 1601 #define PORT_RX_BUF_CRITICAL_WM 15 1602 #endif 1603 1604 /* The port transmit queue high watermark level, in bytes. */ 1605 #ifndef PORT_TX_HIGH_WM 1606 #define PORT_TX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM) 1607 #endif 1608 1609 /* The port transmit queue critical watermark level, in bytes. */ 1610 #ifndef PORT_TX_CRITICAL_WM 1611 #define PORT_TX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM) 1612 #endif 1613 1614 /* The port transmit queue high watermark level, in number of buffers. */ 1615 #ifndef PORT_TX_BUF_HIGH_WM 1616 #define PORT_TX_BUF_HIGH_WM 10 1617 #endif 1618 1619 /* The port transmit queue high watermark level, in number of buffers. */ 1620 #ifndef PORT_TX_BUF_CRITICAL_WM 1621 #define PORT_TX_BUF_CRITICAL_WM 15 1622 #endif 1623 1624 /* The RFCOMM multiplexer preferred flow control mechanism. */ 1625 #ifndef PORT_FC_DEFAULT 1626 #define PORT_FC_DEFAULT PORT_FC_CREDIT 1627 #endif 1628 1629 /* The maximum number of credits receiver sends to peer when using credit-based flow control. */ 1630 #ifndef PORT_CREDIT_RX_MAX 1631 #define PORT_CREDIT_RX_MAX 16 1632 #endif 1633 1634 /* The credit low watermark level. */ 1635 #ifndef PORT_CREDIT_RX_LOW 1636 #define PORT_CREDIT_RX_LOW 8 1637 #endif 1638 1639 /* Test code allowing l2cap FEC on RFCOMM.*/ 1640 #ifndef PORT_ENABLE_L2CAP_FCR_TEST 1641 #define PORT_ENABLE_L2CAP_FCR_TEST FALSE 1642 #endif 1643 1644 /* if application like BTA, Java or script test engine is running on other than BTU thread, */ 1645 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_lock() or GKI_disable() */ 1646 #ifndef PORT_SCHEDULE_LOCK 1647 #define PORT_SCHEDULE_LOCK GKI_disable() 1648 #endif 1649 1650 /* if application like BTA, Java or script test engine is running on other than BTU thread, */ 1651 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_unlock() or GKI_enable() */ 1652 #ifndef PORT_SCHEDULE_UNLOCK 1653 #define PORT_SCHEDULE_UNLOCK GKI_enable() 1654 #endif 1655 1656 /****************************************************************************** 1657 ** 1658 ** TCS 1659 ** 1660 ******************************************************************************/ 1661 1662 #ifndef TCS_INCLUDED 1663 #define TCS_INCLUDED FALSE 1664 #endif 1665 1666 /* If set to TRUE, gives lean TCS state machine configuration. */ 1667 #ifndef TCS_LEAN 1668 #define TCS_LEAN FALSE 1669 #endif 1670 1671 /* To include/exclude point-to-multipoint broadcast SETUP configuration. */ 1672 #ifndef TCS_BCST_SETUP_INCLUDED 1673 #define TCS_BCST_SETUP_INCLUDED TRUE 1674 #endif 1675 1676 /* To include/exclude supplementary services. */ 1677 #ifndef TCS_SUPP_SVCS_INCLUDED 1678 #define TCS_SUPP_SVCS_INCLUDED TRUE 1679 #endif 1680 1681 /* To include/exclude WUG master role. */ 1682 #ifndef TCS_WUG_MASTER_INCLUDED 1683 #define TCS_WUG_MASTER_INCLUDED TRUE 1684 #endif 1685 1686 /* To include/exclude WUG member role. */ 1687 #ifndef TCS_WUG_MEMBER_INCLUDED 1688 #define TCS_WUG_MEMBER_INCLUDED TRUE 1689 #endif 1690 1691 /* Maximum number of WUG members. */ 1692 #ifndef TCS_MAX_WUG_MEMBERS 1693 #define TCS_MAX_WUG_MEMBERS 7 1694 #endif 1695 1696 /* Broadcom specific acknowledgement message to ensure fast and robust operation of WUG FIMA procedure. */ 1697 #ifndef TCS_WUG_LISTEN_ACPT_ACK_INCLUDED 1698 #define TCS_WUG_LISTEN_ACPT_ACK_INCLUDED TRUE 1699 #endif 1700 1701 /* The number of simultaneous calls supported. */ 1702 #ifndef TCS_MAX_NUM_SIMUL_CALLS 1703 #define TCS_MAX_NUM_SIMUL_CALLS 3 1704 #endif 1705 1706 /* The number of devices the device can connect to. */ 1707 #ifndef TCS_MAX_NUM_ACL_CONNS 1708 #define TCS_MAX_NUM_ACL_CONNS 7 1709 #endif 1710 1711 /* The maximum length, in bytes, of the company specific information element. */ 1712 #ifndef TCS_MAX_CO_SPEC_LEN 1713 #define TCS_MAX_CO_SPEC_LEN 40 1714 #endif 1715 1716 /* The maximum length, in bytes, of the audio control information element . */ 1717 #ifndef TCS_MAX_AUDIO_CTL_LEN 1718 #define TCS_MAX_AUDIO_CTL_LEN 40 1719 #endif 1720 1721 /* (Dis)allow EDR ESCO */ 1722 #ifndef TCS_AUDIO_USE_ESCO_EDR 1723 #define TCS_AUDIO_USE_ESCO_EDR FALSE 1724 #endif 1725 1726 /****************************************************************************** 1727 ** 1728 ** OBX 1729 ** 1730 ******************************************************************************/ 1731 #ifndef OBX_INCLUDED 1732 #define OBX_INCLUDED FALSE 1733 #endif 1734 1735 #ifndef OBX_CLIENT_INCLUDED 1736 #define OBX_CLIENT_INCLUDED TRUE 1737 #endif 1738 1739 #ifndef OBX_SERVER_INCLUDED 1740 #define OBX_SERVER_INCLUDED TRUE 1741 #endif 1742 1743 /* TRUE to include OBEX authentication/MD5 code */ 1744 #ifndef OBX_MD5_INCLUDED 1745 #define OBX_MD5_INCLUDED TRUE 1746 #endif 1747 1748 /* TRUE to include OBEX authentication/MD5 test code */ 1749 #ifndef OBX_MD5_TEST_INCLUDED 1750 #define OBX_MD5_TEST_INCLUDED FALSE 1751 #endif 1752 1753 /* TRUE to include OBEX 1.4 enhancement (including Obex Over L2CAP) */ 1754 #ifndef OBX_14_INCLUDED 1755 #define OBX_14_INCLUDED FALSE 1756 #endif 1757 /* MD5 code is required to use OBEX 1.4 features (Reliable session) */ 1758 #if (OBX_MD5_INCLUDED == FALSE) 1759 #undef OBX_14_INCLUDED 1760 #define OBX_14_INCLUDED FALSE 1761 #endif 1762 1763 /* L2CAP FCR/eRTM mode is required to use OBEX Over L2CAP */ 1764 #if (L2CAP_FCR_INCLUDED == FALSE) 1765 #undef OBX_14_INCLUDED 1766 #define OBX_14_INCLUDED FALSE 1767 #endif 1768 1769 /* The timeout value (in seconds) for reliable sessions to remain in suspend. 0xFFFFFFFF for no timeout event. */ 1770 #ifndef OBX_SESS_TIMEOUT_VALUE 1771 #define OBX_SESS_TIMEOUT_VALUE 600 1772 #endif 1773 1774 /* The idle timeout value. 0 for no timeout event. */ 1775 #ifndef OBX_TIMEOUT_VALUE 1776 #define OBX_TIMEOUT_VALUE 60 1777 #endif 1778 1779 /* Timeout value used for disconnect */ 1780 #ifndef OBX_DISC_TOUT_VALUE 1781 #define OBX_DISC_TOUT_VALUE 5 1782 #endif 1783 1784 /* The maximum number of registered servers. */ 1785 #ifndef OBX_NUM_SERVERS 1786 #define OBX_NUM_SERVERS 12 1787 #endif 1788 1789 /* The maximum number of sessions per registered server. */ 1790 #ifndef OBX_MAX_SR_SESSION 1791 #define OBX_MAX_SR_SESSION 4 1792 #endif 1793 1794 /* The maximum number of sessions for all registered servers. 1795 * (must be equal or bigger than OBX_NUM_SERVERS) */ 1796 #ifndef OBX_NUM_SR_SESSIONS 1797 #define OBX_NUM_SR_SESSIONS 26 1798 #endif 1799 1800 /* The maximum number of sessions per registered server. 1801 * must be less than MAX_BD_CONNECTIONS */ 1802 #ifndef OBX_MAX_SR_SESSION 1803 #define OBX_MAX_SR_SESSION 4 1804 #endif 1805 1806 /* The maximum number of suspended sessions per registered servers. */ 1807 #ifndef OBX_MAX_SUSPEND_SESSIONS 1808 #define OBX_MAX_SUSPEND_SESSIONS 4 1809 #endif 1810 1811 /* The maximum number of active clients. */ 1812 #ifndef OBX_NUM_CLIENTS 1813 #define OBX_NUM_CLIENTS 8 1814 #endif 1815 1816 /* The maximum length of OBEX target header.*/ 1817 #ifndef OBX_MAX_TARGET_LEN 1818 #define OBX_MAX_TARGET_LEN 16 1819 #endif 1820 1821 /* The maximum length of authentication challenge realm.*/ 1822 #ifndef OBX_MAX_REALM_LEN 1823 #define OBX_MAX_REALM_LEN 30 1824 #endif 1825 1826 /* The maximum of GKI buffer queued at OBX before flow control L2CAP */ 1827 #ifndef OBX_MAX_RX_QUEUE_COUNT 1828 #define OBX_MAX_RX_QUEUE_COUNT 3 1829 #endif 1830 1831 /* This option is application when OBX_14_INCLUDED=TRUE 1832 Pool ID where to reassemble the SDU. 1833 This Pool will allow buffers to be used that are larger than 1834 the L2CAP_MAX_MTU. */ 1835 #ifndef OBX_USER_RX_POOL_ID 1836 #define OBX_USER_RX_POOL_ID OBX_LRG_DATA_POOL_ID 1837 #endif 1838 1839 /* This option is application when OBX_14_INCLUDED=TRUE 1840 Pool ID where to hold the SDU. 1841 This Pool will allow buffers to be used that are larger than 1842 the L2CAP_MAX_MTU. */ 1843 #ifndef OBX_USER_TX_POOL_ID 1844 #define OBX_USER_TX_POOL_ID OBX_LRG_DATA_POOL_ID 1845 #endif 1846 1847 /* This option is application when OBX_14_INCLUDED=TRUE 1848 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly 1849 */ 1850 #ifndef OBX_FCR_RX_POOL_ID 1851 #define OBX_FCR_RX_POOL_ID HCI_ACL_POOL_ID 1852 #endif 1853 1854 /* This option is application when OBX_14_INCLUDED=TRUE 1855 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions. 1856 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool. 1857 Note: This pool needs to have enough buffers to hold two times the window size negotiated 1858 in the L2CA_SetFCROptions (2 * tx_win_size) to allow for retransmissions. 1859 The size of each buffer must be able to hold the maximum MPS segment size passed in 1860 L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec). 1861 */ 1862 #ifndef OBX_FCR_TX_POOL_ID 1863 #define OBX_FCR_TX_POOL_ID HCI_ACL_POOL_ID 1864 #endif 1865 1866 /* This option is application when OBX_14_INCLUDED=TRUE 1867 Size of the transmission window when using enhanced retransmission mode. Not used 1868 in basic and streaming modes. Range: 1 - 63 1869 */ 1870 #ifndef OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR 1871 #define OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR 20 1872 #endif 1873 1874 /* This option is application when OBX_14_INCLUDED=TRUE 1875 Number of transmission attempts for a single I-Frame before taking 1876 Down the connection. Used In ERTM mode only. Value is Ignored in basic and 1877 Streaming modes. 1878 Range: 0, 1-0xFF 1879 0 - infinite retransmissions 1880 1 - single transmission 1881 */ 1882 #ifndef OBX_FCR_OPT_MAX_TX_B4_DISCNT 1883 #define OBX_FCR_OPT_MAX_TX_B4_DISCNT 20 1884 #endif 1885 1886 /* This option is application when OBX_14_INCLUDED=TRUE 1887 Retransmission Timeout 1888 Range: Minimum 2000 (2 secs) on BR/EDR when supporting PBF. 1889 */ 1890 #ifndef OBX_FCR_OPT_RETX_TOUT 1891 #define OBX_FCR_OPT_RETX_TOUT 2000 1892 #endif 1893 1894 /* This option is application when OBX_14_INCLUDED=TRUE 1895 Monitor Timeout 1896 Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF. 1897 */ 1898 #ifndef OBX_FCR_OPT_MONITOR_TOUT 1899 #define OBX_FCR_OPT_MONITOR_TOUT 12000 1900 #endif 1901 1902 /****************************************************************************** 1903 ** 1904 ** BNEP 1905 ** 1906 ******************************************************************************/ 1907 1908 #ifndef BNEP_INCLUDED 1909 #define BNEP_INCLUDED TRUE 1910 #endif 1911 1912 /* Protocol filtering is an optional feature. Bydefault it will be turned on */ 1913 #ifndef BNEP_SUPPORTS_PROT_FILTERS 1914 #define BNEP_SUPPORTS_PROT_FILTERS TRUE 1915 #endif 1916 1917 /* Multicast filtering is an optional feature. Bydefault it will be turned on */ 1918 #ifndef BNEP_SUPPORTS_MULTI_FILTERS 1919 #define BNEP_SUPPORTS_MULTI_FILTERS TRUE 1920 #endif 1921 1922 /* BNEP status API call is used mainly to get the L2CAP handle */ 1923 #ifndef BNEP_SUPPORTS_STATUS_API 1924 #define BNEP_SUPPORTS_STATUS_API TRUE 1925 #endif 1926 1927 /* This is just a debug function */ 1928 #ifndef BNEP_SUPPORTS_DEBUG_DUMP 1929 #define BNEP_SUPPORTS_DEBUG_DUMP TRUE 1930 #endif 1931 1932 #ifndef BNEP_SUPPORTS_ALL_UUID_LENGTHS 1933 #define BNEP_SUPPORTS_ALL_UUID_LENGTHS TRUE /* Otherwise it will support only 16bit UUIDs */ 1934 #endif 1935 1936 /* 1937 ** When BNEP connection changes roles after the connection is established 1938 ** we will do an authentication check again on the new role 1939 */ 1940 #ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH 1941 #define BNEP_DO_AUTH_FOR_ROLE_SWITCH TRUE 1942 #endif 1943 1944 1945 /* Maximum number of protocol filters supported. */ 1946 #ifndef BNEP_MAX_PROT_FILTERS 1947 #define BNEP_MAX_PROT_FILTERS 5 1948 #endif 1949 1950 /* Maximum number of multicast filters supported. */ 1951 #ifndef BNEP_MAX_MULTI_FILTERS 1952 #define BNEP_MAX_MULTI_FILTERS 5 1953 #endif 1954 1955 /* Minimum MTU size. */ 1956 #ifndef BNEP_MIN_MTU_SIZE 1957 #define BNEP_MIN_MTU_SIZE L2CAP_MTU_SIZE 1958 #endif 1959 1960 /* Preferred MTU size. */ 1961 #ifndef BNEP_MTU_SIZE 1962 #define BNEP_MTU_SIZE BNEP_MIN_MTU_SIZE 1963 #endif 1964 1965 /* Maximum size of user data, in bytes. */ 1966 #ifndef BNEP_MAX_USER_DATA_SIZE 1967 #define BNEP_MAX_USER_DATA_SIZE 1500 1968 #endif 1969 1970 /* Maximum number of buffers allowed in transmit data queue. */ 1971 #ifndef BNEP_MAX_XMITQ_DEPTH 1972 #define BNEP_MAX_XMITQ_DEPTH 20 1973 #endif 1974 1975 /* Maximum number BNEP of connections supported. */ 1976 #ifndef BNEP_MAX_CONNECTIONS 1977 #define BNEP_MAX_CONNECTIONS 7 1978 #endif 1979 1980 1981 /****************************************************************************** 1982 ** 1983 ** AVDTP 1984 ** 1985 ******************************************************************************/ 1986 1987 #ifndef AVDT_INCLUDED 1988 #define AVDT_INCLUDED TRUE 1989 #endif 1990 1991 /* Include reporting capability in AVDTP */ 1992 #ifndef AVDT_REPORTING 1993 #define AVDT_REPORTING TRUE 1994 #endif 1995 1996 /* Include multiplexing capability in AVDTP */ 1997 #ifndef AVDT_MULTIPLEXING 1998 #define AVDT_MULTIPLEXING TRUE 1999 #endif 2000 2001 /* Number of simultaneous links to different peer devices. */ 2002 #ifndef AVDT_NUM_LINKS 2003 #define AVDT_NUM_LINKS 2 2004 #endif 2005 2006 /* Number of simultaneous stream endpoints. */ 2007 #ifndef AVDT_NUM_SEPS 2008 #define AVDT_NUM_SEPS 3 2009 #endif 2010 2011 /* Number of transport channels setup per media stream(audio or video) */ 2012 #ifndef AVDT_NUM_CHANNELS 2013 2014 #if AVDT_REPORTING == TRUE 2015 /* signaling, media and reporting channels */ 2016 #define AVDT_NUM_CHANNELS 3 2017 #else 2018 /* signaling and media channels */ 2019 #define AVDT_NUM_CHANNELS 2 2020 #endif 2021 2022 #endif 2023 2024 /* Number of transport channels setup by AVDT for all media streams 2025 * AVDT_NUM_CHANNELS * Number of simultaneous streams. 2026 */ 2027 #ifndef AVDT_NUM_TC_TBL 2028 #define AVDT_NUM_TC_TBL 6 2029 #endif 2030 2031 2032 /* Maximum size in bytes of the codec capabilities information element. */ 2033 #ifndef AVDT_CODEC_SIZE 2034 #define AVDT_CODEC_SIZE 10 2035 #endif 2036 2037 /* Maximum size in bytes of the content protection information element. */ 2038 #ifndef AVDT_PROTECT_SIZE 2039 #define AVDT_PROTECT_SIZE 90 2040 #endif 2041 2042 /* Maximum number of GKI buffers in the fragment queue (for video frames). 2043 * Must be less than the number of buffers in the buffer pool of size AVDT_DATA_POOL_SIZE */ 2044 #ifndef AVDT_MAX_FRAG_COUNT 2045 #define AVDT_MAX_FRAG_COUNT 15 2046 #endif 2047 2048 /****************************************************************************** 2049 ** 2050 ** PAN 2051 ** 2052 ******************************************************************************/ 2053 2054 #ifndef PAN_INCLUDED 2055 #define PAN_INCLUDED TRUE 2056 #endif 2057 2058 /* This will enable the PANU role */ 2059 #ifndef PAN_SUPPORTS_ROLE_PANU 2060 #define PAN_SUPPORTS_ROLE_PANU TRUE 2061 #endif 2062 2063 /* This will enable the GN role */ 2064 #ifndef PAN_SUPPORTS_ROLE_GN 2065 #define PAN_SUPPORTS_ROLE_GN TRUE 2066 #endif 2067 2068 /* This will enable the NAP role */ 2069 #ifndef PAN_SUPPORTS_ROLE_NAP 2070 #define PAN_SUPPORTS_ROLE_NAP TRUE 2071 #endif 2072 2073 /* This is just for debugging purposes */ 2074 #ifndef PAN_SUPPORTS_DEBUG_DUMP 2075 #define PAN_SUPPORTS_DEBUG_DUMP TRUE 2076 #endif 2077 2078 2079 /* Maximum number of PAN connections allowed */ 2080 #ifndef MAX_PAN_CONNS 2081 #define MAX_PAN_CONNS 7 2082 #endif 2083 2084 /* Default service name for NAP role */ 2085 #ifndef PAN_NAP_DEFAULT_SERVICE_NAME 2086 #define PAN_NAP_DEFAULT_SERVICE_NAME "Network Access Point Service" 2087 #endif 2088 2089 /* Default service name for GN role */ 2090 #ifndef PAN_GN_DEFAULT_SERVICE_NAME 2091 #define PAN_GN_DEFAULT_SERVICE_NAME "Group Network Service" 2092 #endif 2093 2094 /* Default service name for PANU role */ 2095 #ifndef PAN_PANU_DEFAULT_SERVICE_NAME 2096 #define PAN_PANU_DEFAULT_SERVICE_NAME "PAN User Service" 2097 #endif 2098 2099 /* Default description for NAP role service */ 2100 #ifndef PAN_NAP_DEFAULT_DESCRIPTION 2101 #define PAN_NAP_DEFAULT_DESCRIPTION "NAP" 2102 #endif 2103 2104 /* Default description for GN role service */ 2105 #ifndef PAN_GN_DEFAULT_DESCRIPTION 2106 #define PAN_GN_DEFAULT_DESCRIPTION "GN" 2107 #endif 2108 2109 /* Default description for PANU role service */ 2110 #ifndef PAN_PANU_DEFAULT_DESCRIPTION 2111 #define PAN_PANU_DEFAULT_DESCRIPTION "PANU" 2112 #endif 2113 2114 /* Default Security level for PANU role. */ 2115 #ifndef PAN_PANU_SECURITY_LEVEL 2116 #define PAN_PANU_SECURITY_LEVEL 0 2117 #endif 2118 2119 /* Default Security level for GN role. */ 2120 #ifndef PAN_GN_SECURITY_LEVEL 2121 #define PAN_GN_SECURITY_LEVEL 0 2122 #endif 2123 2124 /* Default Security level for NAP role. */ 2125 #ifndef PAN_NAP_SECURITY_LEVEL 2126 #define PAN_NAP_SECURITY_LEVEL 0 2127 #endif 2128 2129 2130 2131 2132 /****************************************************************************** 2133 ** 2134 ** GAP 2135 ** 2136 ******************************************************************************/ 2137 2138 #ifndef GAP_INCLUDED 2139 #define GAP_INCLUDED TRUE 2140 #endif 2141 2142 /* This is set to enable use of GAP L2CAP connections. */ 2143 #ifndef GAP_CONN_INCLUDED 2144 #define GAP_CONN_INCLUDED TRUE 2145 #endif 2146 2147 /* This is set to enable posting event for data write */ 2148 #ifndef GAP_CONN_POST_EVT_INCLUDED 2149 #define GAP_CONN_POST_EVT_INCLUDED FALSE 2150 #endif 2151 2152 /* The maximum number of simultaneous GAP L2CAP connections. */ 2153 #ifndef GAP_MAX_CONNECTIONS 2154 #define GAP_MAX_CONNECTIONS 8 2155 #endif 2156 2157 /****************************************************************************** 2158 ** 2159 ** CTP 2160 ** 2161 ******************************************************************************/ 2162 2163 #ifndef CTP_INCLUDED 2164 #define CTP_INCLUDED FALSE 2165 #endif 2166 2167 /* To include CTP gateway functionality or not. */ 2168 #ifndef CTP_GW_INCLUDED 2169 #define CTP_GW_INCLUDED TRUE 2170 #endif 2171 2172 /* The number of terminals supported. */ 2173 #ifndef CTP_MAX_NUM_TLS 2174 #define CTP_MAX_NUM_TLS 7 2175 #endif 2176 2177 /* If the controller can not support sniff mode when the SCO is up, set this to FALSE. */ 2178 #ifndef CTP_USE_SNIFF_ON_SCO 2179 #define CTP_USE_SNIFF_ON_SCO FALSE 2180 #endif 2181 2182 /* When ACL link between TL and GW is idle for more than this amount of seconds, the ACL may be put to low power mode. */ 2183 #ifndef CTP_TL_IDLE_TIMEOUT 2184 #define CTP_TL_IDLE_TIMEOUT 90 2185 #endif 2186 2187 /* To include CTP terminal functionality or not. */ 2188 #ifndef CTP_TL_INCLUDED 2189 #define CTP_TL_INCLUDED TRUE 2190 #endif 2191 2192 /* To include CTP device discovery functionality or not. */ 2193 #ifndef CTP_DISCOVERY_INCLUDED 2194 #define CTP_DISCOVERY_INCLUDED TRUE 2195 #endif 2196 2197 /* set to TRUE for controllers that do not support multi-point */ 2198 #ifndef CTP_TL_WAIT_DISC 2199 #define CTP_TL_WAIT_DISC TRUE 2200 #endif 2201 2202 /* The CTP inquiry database size. */ 2203 #ifndef CTP_INQ_DB_SIZE 2204 #define CTP_INQ_DB_SIZE CTP_DISC_REC_SIZE 2205 #endif 2206 2207 /* The CTP discovery record size. */ 2208 #ifndef CTP_DISC_REC_SIZE 2209 #define CTP_DISC_REC_SIZE 60 2210 #endif 2211 2212 /* CTP TL would try to re-establish L2CAP channel after channel is disconnected for this amount of seconds. */ 2213 #ifndef CTP_GUARD_LINK_LOST 2214 #define CTP_GUARD_LINK_LOST 1 2215 #endif 2216 2217 /* The link policy bitmap. */ 2218 #ifndef CTP_DEFAULT_LINK_POLICY 2219 #define CTP_DEFAULT_LINK_POLICY 0x000F 2220 #endif 2221 2222 /* The minimum period interval used for the sniff and park modes. */ 2223 #ifndef CTP_DEF_LOWPWR_MIN_PERIOD 2224 #define CTP_DEF_LOWPWR_MIN_PERIOD 0x100 2225 #endif 2226 2227 /* The maximum period interval used for the sniff and park modes. */ 2228 #ifndef CTP_DEF_LOWPWR_MAX_PERIOD 2229 #define CTP_DEF_LOWPWR_MAX_PERIOD 0x1E0 2230 #endif 2231 2232 /* The number of baseband receive slot sniff attempts. */ 2233 #ifndef CTP_DEF_LOWPWR_ATTEMPT 2234 #define CTP_DEF_LOWPWR_ATTEMPT 0x200 2235 #endif 2236 2237 /* The number of baseband receive slots for sniff timeout. */ 2238 #ifndef CTP_DEF_LOWPWR_TIMEOUT 2239 #define CTP_DEF_LOWPWR_TIMEOUT 0x200 2240 #endif 2241 2242 /* This is set if CTP is to use park mode. */ 2243 #ifndef CTP_PARK_INCLUDED 2244 #define CTP_PARK_INCLUDED TRUE 2245 #endif 2246 2247 /* This is set if CTP is to use sniff mode. */ 2248 #ifndef CTP_SNIFF_INCLUDED 2249 #define CTP_SNIFF_INCLUDED TRUE 2250 #endif 2251 2252 /* To include CTP data exchange functionality or not. */ 2253 #ifndef CTP_DATA_EXCHG_FEATURE 2254 #define CTP_DATA_EXCHG_FEATURE FALSE 2255 #endif 2256 2257 /* To include CTP GW intercom functionality or not. */ 2258 #ifndef CTP_GW_INTERCOM_FEATURE 2259 #define CTP_GW_INTERCOM_FEATURE FALSE 2260 #endif 2261 2262 /* The MTU size for L2CAP channel. */ 2263 #ifndef CTP_MTU_SIZE 2264 #define CTP_MTU_SIZE 200 2265 #endif 2266 2267 /* The L2CAP PSM for the data exchange feature. */ 2268 #ifndef CTP_DATA_EXCHG_PSM 2269 #define CTP_DATA_EXCHG_PSM 13 2270 #endif 2271 2272 /* The flush timeout for L2CAP channels. */ 2273 #ifndef CTP_FLUSH_TO 2274 #define CTP_FLUSH_TO 0xFFFF 2275 #endif 2276 2277 /* The default service name for CTP. */ 2278 #ifndef CTP_DEFAULT_SERVICE_NAME 2279 #define CTP_DEFAULT_SERVICE_NAME "Cordless Telephony" 2280 #endif 2281 2282 /* The CTP security level. */ 2283 #ifndef CTP_SECURITY_LEVEL 2284 #define CTP_SECURITY_LEVEL (BTM_SEC_IN_AUTHORIZE | BTM_SEC_IN_AUTHENTICATE | BTM_SEC_IN_ENCRYPT) 2285 #endif 2286 2287 /* The number of lines to the external network. */ 2288 #ifndef CTP_MAX_LINES 2289 #define CTP_MAX_LINES 1 2290 #endif 2291 2292 /* Test if the number of resources in TCS is consistent with CTP setting. */ 2293 #ifndef CTP_TEST_FULL_TCS 2294 #define CTP_TEST_FULL_TCS TRUE 2295 #endif 2296 2297 /* The default inquiry mode. */ 2298 #ifndef CTP_DEFAULT_INQUIRY_MODE 2299 #define CTP_DEFAULT_INQUIRY_MODE BTM_GENERAL_INQUIRY 2300 #endif 2301 2302 /* The default inquiry duration. */ 2303 #ifndef CTP_DEFAULT_INQ_DURATION 2304 #define CTP_DEFAULT_INQ_DURATION 4 2305 #endif 2306 2307 /* The maximum number of inquiry responses. */ 2308 #ifndef CTP_DEFAULT_INQ_MAX_RESP 2309 #define CTP_DEFAULT_INQ_MAX_RESP 3 2310 #endif 2311 2312 /* When TL does not create another L2CAP channel within this period of time GW declares that it's "Connected Limited". */ 2313 #ifndef CTP_TL_CONN_TIMEOUT 2314 #define CTP_TL_CONN_TIMEOUT 5 2315 #endif 2316 2317 /* The delay for ACL to completely disconnect (for intercom) before sending the connect request to GW. */ 2318 #ifndef CTP_RECONNECT_DELAY 2319 #define CTP_RECONNECT_DELAY 5 2320 #endif 2321 2322 /* How many times to retry connection when it has failed. */ 2323 #ifndef CTP_RETRY_ON_CONN_ERR 2324 #define CTP_RETRY_ON_CONN_ERR 5 2325 #endif 2326 2327 /****************************************************************************** 2328 ** 2329 ** ICP 2330 ** 2331 ******************************************************************************/ 2332 2333 #ifndef ICP_INCLUDED 2334 #define ICP_INCLUDED FALSE 2335 #endif 2336 2337 /* The ICP default MTU. */ 2338 #ifndef ICP_MTU_SIZE 2339 #define ICP_MTU_SIZE 100 2340 #endif 2341 2342 /* The ICP security level. */ 2343 #ifndef ICP_SECURITY_LEVEL 2344 #define ICP_SECURITY_LEVEL BTM_SEC_NONE 2345 #endif 2346 2347 /* The default service name for ICP. */ 2348 #ifndef ICP_DEFAULT_SERVICE_NAME 2349 #define ICP_DEFAULT_SERVICE_NAME "Intercom" 2350 #endif 2351 2352 /* The flush timeout for L2CAP channels. */ 2353 #ifndef ICP_FLUSH_TO 2354 #define ICP_FLUSH_TO 0xFFFF 2355 #endif 2356 2357 /****************************************************************************** 2358 ** 2359 ** SPP 2360 ** 2361 ******************************************************************************/ 2362 2363 #ifndef SPP_INCLUDED 2364 #define SPP_INCLUDED FALSE 2365 #endif 2366 2367 /* The SPP default MTU. */ 2368 #ifndef SPP_DEFAULT_MTU 2369 #define SPP_DEFAULT_MTU 127 2370 #endif 2371 2372 /* The interval, in seconds, that a client tries to reconnect to a service. */ 2373 #ifndef SPP_RETRY_CONN_INTERVAL 2374 #define SPP_RETRY_CONN_INTERVAL 1 2375 #endif 2376 2377 /* The SPP discoverable mode: limited or general. */ 2378 #ifndef SPP_DISCOVERABLE_MODE 2379 #define SPP_DISCOVERABLE_MODE BTM_GENERAL_DISCOVERABLE 2380 #endif 2381 2382 /* The maximum number of inquiry results returned in by inquiry procedure. */ 2383 #ifndef SPP_DEF_INQ_MAX_RESP 2384 #define SPP_DEF_INQ_MAX_RESP 10 2385 #endif 2386 2387 /* The SPP discovery record size. */ 2388 #ifndef SPP_DISC_REC_SIZE 2389 #define SPP_DISC_REC_SIZE 60 2390 #endif 2391 2392 #ifndef SPP_MAX_RECS_PER_DEVICE 2393 #define SPP_MAX_RECS_PER_DEVICE (SPP_DB_SIZE / SPP_DISC_REC_SIZE) 2394 #endif 2395 2396 /* Inquiry duration in 1.28 second units. */ 2397 #ifndef SPP_DEF_INQ_DURATION 2398 #define SPP_DEF_INQ_DURATION 9 2399 #endif 2400 2401 /* keep the raw data received from SDP server in database. */ 2402 #ifndef SDP_RAW_DATA_INCLUDED 2403 #define SDP_RAW_DATA_INCLUDED TRUE 2404 #endif 2405 2406 /* TRUE, to allow JV to create L2CAP connection on SDP PSM. */ 2407 #ifndef SDP_FOR_JV_INCLUDED 2408 #define SDP_FOR_JV_INCLUDED FALSE 2409 #endif 2410 2411 /* Inquiry duration in 1.28 second units. */ 2412 #ifndef SDP_DEBUG 2413 #define SDP_DEBUG TRUE 2414 #endif 2415 2416 /****************************************************************************** 2417 ** 2418 ** HSP2, HFP 2419 ** 2420 ******************************************************************************/ 2421 2422 #ifndef HSP2_INCLUDED 2423 #define HSP2_INCLUDED FALSE 2424 #endif 2425 2426 /* Include the ability to perform inquiry for peer devices. */ 2427 #ifndef HSP2_INQUIRY_INCLUDED 2428 #define HSP2_INQUIRY_INCLUDED TRUE 2429 #endif 2430 2431 /* Include Audio Gateway specific code. */ 2432 #ifndef HSP2_AG_INCLUDED 2433 #define HSP2_AG_INCLUDED TRUE 2434 #endif 2435 2436 /* Include Headset Specific Code. */ 2437 #ifndef HSP2_HS_INCLUDED 2438 #define HSP2_HS_INCLUDED TRUE 2439 #endif 2440 2441 /* Include the ability to open an SCO connection for In-Band Ringing. */ 2442 #ifndef HSP2_IB_RING_INCLUDED 2443 #define HSP2_IB_RING_INCLUDED TRUE 2444 #endif 2445 2446 /* Include the ability to repeat a ring. */ 2447 #ifndef HSP2_AG_REPEAT_RING 2448 #define HSP2_AG_REPEAT_RING TRUE 2449 #endif 2450 2451 #ifndef HSP2_APP_CLOSES_ON_CKPD 2452 #define HSP2_APP_CLOSES_ON_CKPD FALSE 2453 #endif 2454 2455 2456 /* Include the ability to park a connection. */ 2457 #ifndef HSP2_PARK_INCLUDED 2458 #define HSP2_PARK_INCLUDED TRUE 2459 #endif 2460 2461 /* Include HSP State Machine debug trace messages. */ 2462 #ifndef HSP2_FSM_DEBUG 2463 #define HSP2_FSM_DEBUG TRUE 2464 #endif 2465 2466 /* The Module's Inquiry Scan Window. */ 2467 #ifndef HSP2_INQ_SCAN_WINDOW 2468 #define HSP2_INQ_SCAN_WINDOW 0 2469 #endif 2470 2471 /* The Module's Inquiry Scan Interval. */ 2472 #ifndef HSP2_INQ_SCAN_INTERVAL 2473 #define HSP2_INQ_SCAN_INTERVAL 0 2474 #endif 2475 2476 /* The Module's Page Scan Interval. */ 2477 #ifndef HSP2_PAGE_SCAN_INTERVAL 2478 #define HSP2_PAGE_SCAN_INTERVAL 0 2479 #endif 2480 2481 /* The Module's Page Scan Window. */ 2482 #ifndef HSP2_PAGE_SCAN_WINDOW 2483 #define HSP2_PAGE_SCAN_WINDOW 0 2484 #endif 2485 2486 /* The Park Mode's Minimum Beacon Period. */ 2487 #ifndef HSP2_BEACON_MIN_PERIOD 2488 #define HSP2_BEACON_MIN_PERIOD 450 2489 #endif 2490 2491 /* The Park Mode's Maximum Beacon Period. */ 2492 #ifndef HSP2_BEACON_MAX_PERIOD 2493 #define HSP2_BEACON_MAX_PERIOD 500 2494 #endif 2495 2496 /* The duration of the inquiry in seconds. */ 2497 #ifndef HSP2_INQ_DURATION 2498 #define HSP2_INQ_DURATION 4 2499 #endif 2500 2501 /* Maximum number of peer responses during an inquiry. */ 2502 #ifndef HSP2_INQ_MAX_NUM_RESPS 2503 #define HSP2_INQ_MAX_NUM_RESPS 3 2504 #endif 2505 2506 /* Maximum number of times to retry an inquiry prior to failure. */ 2507 #ifndef HSP2_MAX_INQ_RETRY 2508 #define HSP2_MAX_INQ_RETRY 6 2509 #endif 2510 2511 /* Maximum number of times to retry an RFCOMM connection prior to failure. */ 2512 #ifndef HSP2_MAX_CONN_RETRY 2513 #define HSP2_MAX_CONN_RETRY 3 2514 #endif 2515 2516 /* If the connect request failed for authentication reasons, do not retry */ 2517 #ifndef HSP2_NO_RETRY_ON_AUTH_FAIL 2518 #define HSP2_NO_RETRY_ON_AUTH_FAIL TRUE 2519 #endif 2520 2521 /* Maximum number of characters in an HSP2 device name. */ 2522 #ifndef HSP2_MAX_NAME_LEN 2523 #define HSP2_MAX_NAME_LEN 32 2524 #endif 2525 2526 /* The minimum speaker and/or microphone gain setting. */ 2527 #ifndef HSP2_MIN_GAIN 2528 #define HSP2_MIN_GAIN 0 2529 #endif 2530 2531 /* The maximum speaker and/or microphone setting. */ 2532 #ifndef HSP2_MAX_GAIN 2533 #define HSP2_MAX_GAIN 15 2534 #endif 2535 2536 /* The default value to send on an AT+CKPD. */ 2537 #ifndef HSP2_KEYPRESS_DEFAULT 2538 #define HSP2_KEYPRESS_DEFAULT 200 2539 #endif 2540 2541 /* Maximum amount a data that can be received per RFCOMM frame. */ 2542 #ifndef HSP2_MAX_RFC_READ_LEN 2543 #define HSP2_MAX_RFC_READ_LEN 128 2544 #endif 2545 2546 /* The time in seconds to wait for completion of a partial AT command or response from the peer. */ 2547 #ifndef HSP2_AT_TO_INTERVAL 2548 #define HSP2_AT_TO_INTERVAL 30 2549 #endif 2550 2551 /* The time to wait before repeating a ring to a peer Headset. */ 2552 #ifndef HSP2_REPEAT_RING_TO 2553 #define HSP2_REPEAT_RING_TO 4 2554 #endif 2555 2556 /* Time to wait for a response for an AT command */ 2557 #ifndef HSP2_AT_RSP_TO 2558 #define HSP2_AT_RSP_TO 20 2559 #endif 2560 2561 /* SCO packet type(s) to use (bitmask: see spec), 0 - device default (recommended) */ 2562 #ifndef HSP2_SCO_PKT_TYPES 2563 #define HSP2_SCO_PKT_TYPES ((UINT16)0x0000) 2564 #endif 2565 2566 /* The default settings of the SCO voice link. */ 2567 #ifndef HSP2_DEFAULT_VOICE_SETTINGS 2568 #define HSP2_DEFAULT_VOICE_SETTINGS (HCI_INP_CODING_LINEAR | HCI_INP_DATA_FMT_2S_COMPLEMENT | HCI_INP_SAMPLE_SIZE_16BIT | HCI_AIR_CODING_FORMAT_CVSD) 2569 #endif 2570 2571 #ifndef HSP2_MAX_AT_CMD_LENGTH 2572 #define HSP2_MAX_AT_CMD_LENGTH 16 2573 #endif 2574 2575 #ifndef HSP2_MAX_AT_VAL_LENGTH 2576 #if (defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE) 2577 #define HSP2_MAX_AT_VAL_LENGTH 310 2578 #else 2579 #define HSP2_MAX_AT_VAL_LENGTH 5 2580 #endif 2581 #endif 2582 2583 2584 #ifndef HSP2_SDP_DB_SIZE 2585 #define HSP2_SDP_DB_SIZE 300 2586 #endif 2587 2588 2589 /****************************************************************************** 2590 ** 2591 ** HFP 2592 ** 2593 ******************************************************************************/ 2594 2595 #ifndef HFP_INCLUDED 2596 #define HFP_INCLUDED FALSE 2597 #endif 2598 2599 /* Include Audio Gateway specific code. */ 2600 #ifndef HFP_AG_INCLUDED 2601 #define HFP_AG_INCLUDED TRUE 2602 #endif 2603 2604 /* Include Hand Free Specific Code. */ 2605 #ifndef HFP_HF_INCLUDED 2606 #define HFP_HF_INCLUDED TRUE 2607 #endif 2608 2609 /* Use AT interface instead of full blown API */ 2610 #ifndef AT_INTERFACE 2611 #define AT_INTERFACE FALSE 2612 #endif 2613 2614 /* HFP Manages SCO establishement for various procedures */ 2615 #ifndef HFP_SCO_MGMT_INCLUDED 2616 #define HFP_SCO_MGMT_INCLUDED TRUE 2617 #endif 2618 2619 /* CCAP compliant features and behavior desired */ 2620 #ifndef CCAP_COMPLIANCE 2621 #define CCAP_COMPLIANCE TRUE 2622 #endif 2623 2624 /* Caller ID string, part of +CLIP result code */ 2625 #ifndef HFP_MAX_CLIP_INFO 2626 #define HFP_MAX_CLIP_INFO 45 2627 #endif 2628 2629 #ifndef HFP_RPT_PEER_INFO_INCLUDED 2630 #define HFP_RPT_PEER_INFO_INCLUDED TRUE /* Reporting of peer features enabled */ 2631 #endif 2632 2633 /****************************************************************************** 2634 ** 2635 ** HID 2636 ** 2637 ******************************************************************************/ 2638 2639 /* HID Device Role Included */ 2640 #ifndef HID_DEV_INCLUDED 2641 #define HID_DEV_INCLUDED FALSE 2642 #endif 2643 2644 #ifndef HID_DEV_PM_INCLUDED 2645 #define HID_DEV_PM_INCLUDED TRUE 2646 #endif 2647 2648 /* The HID Device is a virtual cable */ 2649 #ifndef HID_DEV_VIRTUAL_CABLE 2650 #define HID_DEV_VIRTUAL_CABLE TRUE 2651 #endif 2652 2653 /* The HID device initiates the reconnections */ 2654 #ifndef HID_DEV_RECONN_INITIATE 2655 #define HID_DEV_RECONN_INITIATE TRUE 2656 #endif 2657 2658 /* THe HID device is normally connectable */ 2659 #ifndef HID_DEV_NORMALLY_CONN 2660 #define HID_DEV_NORMALLY_CONN FALSE 2661 #endif 2662 2663 /* The device is battery powered */ 2664 #ifndef HID_DEV_BATTERY_POW 2665 #define HID_DEV_BATTERY_POW TRUE 2666 #endif 2667 2668 /* Device is capable of waking up the host */ 2669 #ifndef HID_DEV_REMOTE_WAKE 2670 #define HID_DEV_REMOTE_WAKE TRUE 2671 #endif 2672 2673 /* Device needs host to close SDP channel after SDP is over */ 2674 #ifndef HID_DEV_SDP_DISABLE 2675 #define HID_DEV_SDP_DISABLE TRUE 2676 #endif 2677 2678 #ifndef HID_DEV_MTU_SIZE 2679 #define HID_DEV_MTU_SIZE 64 2680 #endif 2681 2682 #ifndef HID_DEV_FLUSH_TO 2683 #define HID_DEV_FLUSH_TO 0xffff 2684 #endif 2685 2686 #ifndef HID_DEV_PAGE_SCAN_WIN 2687 #define HID_DEV_PAGE_SCAN_WIN (0) 2688 #endif 2689 2690 #ifndef HID_DEV_PAGE_SCAN_INT 2691 #define HID_DEV_PAGE_SCAN_INT (0) 2692 #endif 2693 2694 #ifndef HID_DEV_MAX_CONN_RETRY 2695 #define HID_DEV_MAX_CONN_RETRY (15) 2696 #endif 2697 2698 #ifndef HID_DEV_REPAGE_WIN 2699 #define HID_DEV_REPAGE_WIN (1) 2700 #endif 2701 2702 #ifndef HID_DEV_SVC_NAME 2703 #define HID_DEV_SVC_NAME "HID" 2704 #endif 2705 2706 #ifndef HID_DEV_SVC_DESCR 2707 #define HID_DEV_SVC_DESCR "3-button mouse and keyboard" 2708 #endif 2709 2710 #ifndef HID_DEV_PROVIDER_NAME 2711 #define HID_DEV_PROVIDER_NAME "Widcomm" 2712 #endif 2713 2714 #ifndef HID_DEV_REL_NUM 2715 #define HID_DEV_REL_NUM 0x0100 2716 #endif 2717 2718 #ifndef HID_DEV_PARSER_VER 2719 #define HID_DEV_PARSER_VER 0x0111 2720 #endif 2721 2722 #ifndef HID_DEV_SUBCLASS 2723 #define HID_DEV_SUBCLASS COD_MINOR_POINTING 2724 #endif 2725 2726 #ifndef HID_DEV_COUNTRY_CODE 2727 #define HID_DEV_COUNTRY_CODE 0x33 2728 #endif 2729 2730 #ifndef HID_DEV_SUP_TOUT 2731 #define HID_DEV_SUP_TOUT 0x8000 2732 #endif 2733 2734 #ifndef HID_DEV_NUM_LANGS 2735 #define HID_DEV_NUM_LANGS 1 2736 #endif 2737 2738 #ifndef HID_DEV_INACT_TIMEOUT 2739 #define HID_DEV_INACT_TIMEOUT 60 2740 #endif 2741 2742 #ifndef HID_DEV_BUSY_MODE_PARAMS 2743 #define HID_DEV_BUSY_MODE_PARAMS { 320, 160, 10, 20, HCI_MODE_ACTIVE } 2744 #endif 2745 2746 #ifndef HID_DEV_IDLE_MODE_PARAMS 2747 #define HID_DEV_IDLE_MODE_PARAMS { 320, 160, 10, 20, HCI_MODE_SNIFF } 2748 #endif 2749 2750 #ifndef HID_DEV_SUSP_MODE_PARAMS 2751 #define HID_DEV_SUSP_MODE_PARAMS { 640, 320, 0, 0, HCI_MODE_PARK } 2752 #endif 2753 2754 #ifndef HID_DEV_MAX_DESCRIPTOR_SIZE 2755 #define HID_DEV_MAX_DESCRIPTOR_SIZE 128 /* Max descriptor size */ 2756 #endif 2757 2758 #ifndef HID_DEV_LANGUAGELIST 2759 #define HID_DEV_LANGUAGELIST {0x35, 0x06, 0x09, 0x04, 0x09, 0x09, 0x01, 0x00} 2760 #endif 2761 2762 #ifndef HID_DEV_LINK_SUPERVISION_TO 2763 #define HID_DEV_LINK_SUPERVISION_TO 0x8000 2764 #endif 2765 2766 #ifndef HID_CONTROL_POOL_ID 2767 #define HID_CONTROL_POOL_ID 2 2768 #endif 2769 2770 #ifndef HID_INTERRUPT_POOL_ID 2771 #define HID_INTERRUPT_POOL_ID 2 2772 #endif 2773 2774 /************************************************************************* 2775 ** Definitions for Both HID-Host & Device 2776 */ 2777 #ifndef HID_MAX_SVC_NAME_LEN 2778 #define HID_MAX_SVC_NAME_LEN 32 2779 #endif 2780 2781 #ifndef HID_MAX_SVC_DESCR_LEN 2782 #define HID_MAX_SVC_DESCR_LEN 32 2783 #endif 2784 2785 #ifndef HID_MAX_PROV_NAME_LEN 2786 #define HID_MAX_PROV_NAME_LEN 32 2787 #endif 2788 2789 /************************************************************************* 2790 ** Definitions for HID-Host 2791 */ 2792 #ifndef HID_HOST_INCLUDED 2793 #define HID_HOST_INCLUDED TRUE 2794 #endif 2795 2796 #ifndef HID_HOST_MAX_DEVICES 2797 #define HID_HOST_MAX_DEVICES 7 2798 #endif 2799 2800 #ifndef HID_HOST_MTU 2801 #define HID_HOST_MTU 640 2802 #endif 2803 2804 #ifndef HID_HOST_FLUSH_TO 2805 #define HID_HOST_FLUSH_TO 0xffff 2806 #endif 2807 2808 #ifndef HID_HOST_MAX_CONN_RETRY 2809 #define HID_HOST_MAX_CONN_RETRY (3) 2810 #endif 2811 2812 #ifndef HID_HOST_REPAGE_WIN 2813 #define HID_HOST_REPAGE_WIN (2) 2814 #endif 2815 2816 2817 /****************************************************************************** 2818 ** 2819 ** DUN and FAX 2820 ** 2821 ******************************************************************************/ 2822 2823 #ifndef DUN_INCLUDED 2824 #define DUN_INCLUDED FALSE 2825 #endif 2826 2827 2828 /****************************************************************************** 2829 ** 2830 ** GOEP 2831 ** 2832 ******************************************************************************/ 2833 2834 #ifndef GOEP_INCLUDED 2835 #define GOEP_INCLUDED FALSE 2836 #endif 2837 2838 /* This is set to enable GOEP non-blocking file system access functions. */ 2839 #ifndef GOEP_FS_INCLUDED 2840 #define GOEP_FS_INCLUDED FALSE 2841 #endif 2842 2843 /* GOEP authentication key size. */ 2844 #ifndef GOEP_MAX_AUTH_KEY_SIZE 2845 #define GOEP_MAX_AUTH_KEY_SIZE 16 2846 #endif 2847 2848 /* Maximum size of the realm authentication string. */ 2849 #ifndef GOEP_MAX_AUTH_REALM_SIZE 2850 #define GOEP_MAX_AUTH_REALM_SIZE 16 2851 #endif 2852 2853 /* Realm Character Set */ 2854 #ifndef GOEP_REALM_CHARSET 2855 #define GOEP_REALM_CHARSET 0 /* ASCII */ 2856 #endif 2857 2858 /* This is set to the maximum length of path name allowed in the system (_MAX_PATH). */ 2859 #ifndef GOEP_MAX_PATH_SIZE 2860 #define GOEP_MAX_PATH_SIZE 255 2861 #endif 2862 2863 /* Specifies whether or not client's user id is required during obex authentication */ 2864 #ifndef GOEP_SERVER_USERID_REQUIRED 2865 #define GOEP_SERVER_USERID_REQUIRED FALSE 2866 #endif 2867 2868 /* This is set to the maximum length of file name allowed in the system (_MAX_FNAME). */ 2869 #ifndef GOEP_MAX_FILE_SIZE 2870 #define GOEP_MAX_FILE_SIZE 128 2871 #endif 2872 2873 /* Character used as path separator */ 2874 #ifndef GOEP_PATH_SEPARATOR 2875 #define GOEP_PATH_SEPARATOR ((char) 0x5c) /* 0x2f ('/'), or 0x5c ('\') */ 2876 #endif 2877 2878 /****************************************************************************** 2879 ** 2880 ** OPP 2881 ** 2882 ******************************************************************************/ 2883 2884 #ifndef OPP_INCLUDED 2885 #define OPP_INCLUDED FALSE 2886 #endif 2887 2888 /* This is set to enable OPP client capabilities. */ 2889 #ifndef OPP_CLIENT_INCLUDED 2890 #define OPP_CLIENT_INCLUDED FALSE 2891 #endif 2892 2893 /* This is set to enable OPP server capabilities. */ 2894 #ifndef OPP_SERVER_INCLUDED 2895 #define OPP_SERVER_INCLUDED FALSE 2896 #endif 2897 2898 /* if the optional formating functions are to be included or not */ 2899 #ifndef OPP_FORMAT_INCLUDED 2900 #define OPP_FORMAT_INCLUDED FALSE 2901 #endif 2902 2903 /* Maximum number of client sessions allowed by server */ 2904 #ifndef OPP_MAX_SRVR_SESS 2905 #define OPP_MAX_SRVR_SESS 3 2906 #endif 2907 2908 /****************************************************************************** 2909 ** 2910 ** FTP 2911 ** 2912 ******************************************************************************/ 2913 2914 #ifndef FTP_INCLUDED 2915 #define FTP_INCLUDED FALSE 2916 #endif 2917 2918 /* This is set to enable FTP client capabilities. */ 2919 #ifndef FTP_CLIENT_INCLUDED 2920 #define FTP_CLIENT_INCLUDED TRUE 2921 #endif 2922 2923 /* This is set to enable FTP server capabilities. */ 2924 #ifndef FTP_SERVER_INCLUDED 2925 #define FTP_SERVER_INCLUDED TRUE 2926 #endif 2927 2928 /****************************************************************************** 2929 ** 2930 ** XML Parser 2931 ** 2932 ******************************************************************************/ 2933 2934 #ifndef XML_STACK_SIZE 2935 #define XML_STACK_SIZE 7 2936 #endif 2937 2938 /****************************************************************************** 2939 ** 2940 ** BPP Printer 2941 ** 2942 ******************************************************************************/ 2943 #ifndef BPP_DEBUG 2944 #define BPP_DEBUG FALSE 2945 #endif 2946 2947 #ifndef BPP_INCLUDED 2948 #define BPP_INCLUDED FALSE 2949 #endif 2950 2951 #ifndef BPP_SND_INCLUDED 2952 #define BPP_SND_INCLUDED FALSE 2953 #endif 2954 2955 /* Maximum number of senders allowed to connect simultaneously 2956 ** The maximum is 6 or (OBX_NUM_SERVERS / 2), whichever is smaller 2957 */ 2958 #ifndef BPP_PR_MAX_CON 2959 #define BPP_PR_MAX_CON 3 2960 #endif 2961 2962 /* Service Name. maximum length: 248 2963 #ifndef BPP_SERVICE_NAME 2964 #define BPP_SERVICE_NAME "Basic Printing" 2965 #endif 2966 */ 2967 /* Document Format Supported. ASCII comma-delimited list of MIME type:version string 2968 #ifndef BPP_DOC_FORMAT_SUPPORTED 2969 #define BPP_DOC_FORMAT_SUPPORTED "application/vnd.pwg-xhtml-print:1.0,application/vnd.hp-PCL:5E,application/PDF" 2970 #endif 2971 2972 #ifndef BPP_DOC_FORMAT_SUPPORTED_LEN 2973 #define BPP_DOC_FORMAT_SUPPORTED_LEN 77 2974 #endif 2975 */ 2976 /* Character repertoires. 2977 #ifndef BPP_CHARACTER_REPERTOIRES 2978 #define BPP_CHARACTER_REPERTOIRES {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01} 2979 #endif 2980 */ 2981 /* XHTML formats. 2982 #ifndef BPP_XHTML_PRINT_FORMATS 2983 #define BPP_XHTML_PRINT_FORMATS "image/gif:89A,image/jpeg" 2984 #endif 2985 2986 #ifndef BPP_XHTML_PRINT_FORMATS_LEN 2987 #define BPP_XHTML_PRINT_FORMATS_LEN 24 2988 #endif 2989 */ 2990 /* Color supported. 2991 #ifndef BPP_COLOR_SUPORTED 2992 #define BPP_COLOR_SUPORTED FALSE 2993 #endif 2994 */ 2995 /* 1284 ID string. First 2 bytes are the length. 2996 #ifndef BPP_1284ID 2997 #define BPP_1284ID "\x00\x48MANUFACTURER:ACME Manufacturing;COMMAND SET:PCL,MPL;MODEL:LaserBeam \?;" 2998 #endif 2999 3000 #ifndef BPP_1284ID_LEN 3001 #define BPP_1284ID_LEN 72 3002 #endif 3003 */ 3004 /* Printer name. 3005 #ifndef BPP_PRINTER_NAME 3006 #define BPP_PRINTER_NAME "My Printer" 3007 #endif 3008 3009 #ifndef BPP_PRINTER_NAME_LEN 3010 #define BPP_PRINTER_NAME_LEN 10 3011 #endif 3012 */ 3013 3014 /* Printer location. 3015 #ifndef BPP_PRINTER_LOCATION 3016 #define BPP_PRINTER_LOCATION "Hotel Lobby" 3017 #endif 3018 3019 #ifndef BPP_PRINTER_LOCATION_LEN 3020 #define BPP_PRINTER_LOCATION_LEN 11 3021 #endif 3022 */ 3023 /* Duplex printing supported. 3024 #ifndef BPP_DUPLEX_SUPPORTED 3025 #define BPP_DUPLEX_SUPPORTED TRUE 3026 #endif 3027 */ 3028 3029 /* Media types supported. 3030 #ifndef BPP_MEDIA_TYPES_SUPPORTED 3031 #define BPP_MEDIA_TYPES_SUPPORTED "stationary,continuous-long,photographic-high-gloss,cardstock" 3032 #endif 3033 3034 #ifndef BPP_MEDIA_TYPES_SUPPORTED_LEN 3035 #define BPP_MEDIA_TYPES_SUPPORTED_LEN 60 3036 #endif 3037 */ 3038 /* Maximum media with supported. 3039 #ifndef BPP_MAX_MEDIA_WIDTH 3040 #define BPP_MAX_MEDIA_WIDTH 205 3041 #endif 3042 */ 3043 /* Maximum media length supported. 3044 #ifndef BPP_MAX_MEDIA_LENGTH 3045 #define BPP_MAX_MEDIA_LENGTH 285 3046 #endif 3047 */ 3048 /* the maximum string len for the media size of medium loaded */ 3049 #ifndef BPP_MEDIA_SIZE_LEN 3050 #define BPP_MEDIA_SIZE_LEN 33 3051 #endif 3052 3053 /* Debug Trace the SOAP object, if TRUE */ 3054 #ifndef BPP_TRACE_XML 3055 #define BPP_TRACE_XML TRUE 3056 #endif 3057 3058 /* in case that the SOAP object does not all come in one OBEX packet, 3059 * this size of data may be kept in the BPP control block for continuing parsing. 3060 * The maximum is the size of the biggest GKI buffer (GKI_MAX_BUF_SIZE) */ 3061 #ifndef BPP_SOAP_KEEP_SIZE 3062 #define BPP_SOAP_KEEP_SIZE 200 3063 #endif 3064 3065 3066 /****************************************************************************** 3067 ** 3068 ** BIP 3069 ** 3070 ******************************************************************************/ 3071 #ifndef BIP_INCLUDED 3072 #define BIP_INCLUDED FALSE 3073 #endif 3074 3075 /* TRUE to include imaging initiator */ 3076 #ifndef BIP_INITR_INCLUDED 3077 #define BIP_INITR_INCLUDED FALSE 3078 #endif 3079 3080 /* TRUE to include imaging responder */ 3081 #ifndef BIP_RSPDR_INCLUDED 3082 #define BIP_RSPDR_INCLUDED FALSE 3083 #endif 3084 3085 /* TRUE to include image push feature */ 3086 #ifndef BIP_PUSH_INCLUDED 3087 #define BIP_PUSH_INCLUDED TRUE 3088 #endif 3089 3090 /* TRUE to include image pull feature */ 3091 #ifndef BIP_PULL_INCLUDED 3092 #define BIP_PULL_INCLUDED TRUE 3093 #endif 3094 3095 /* TRUE to include advanced image printing feature */ 3096 #ifndef BIP_PRINTING_INCLUDED 3097 #define BIP_PRINTING_INCLUDED TRUE 3098 #endif 3099 3100 /* TRUE to include automatic archive feature */ 3101 #ifndef BIP_ARCHIVE_INCLUDED 3102 #define BIP_ARCHIVE_INCLUDED TRUE 3103 #endif 3104 3105 /* TRUE to include remote camera feature */ 3106 #ifndef BIP_CAMERA_INCLUDED 3107 #define BIP_CAMERA_INCLUDED TRUE 3108 #endif 3109 3110 /* TRUE to include remote display feature */ 3111 #ifndef BIP_DISPLAY_INCLUDED 3112 #define BIP_DISPLAY_INCLUDED TRUE 3113 #endif 3114 3115 /* TRUE to include sanity check code for API functions */ 3116 #ifndef BIP_SANITY_CHECKS 3117 #define BIP_SANITY_CHECKS TRUE 3118 #endif 3119 3120 /* TRUE to show the received XML object in trace for conformance tests */ 3121 #ifndef BIP_TRACE_XML 3122 #define BIP_TRACE_XML TRUE 3123 #endif 3124 3125 /* in case that the received XML object is not complete, the XML parser state machine needs 3126 * to keep a copy of the data from the last '<' 3127 * This macro specifies the maximun amount of data for this purpose */ 3128 #ifndef BIP_XML_CARRY_OVER_LEN 3129 #define BIP_XML_CARRY_OVER_LEN 100 3130 #endif 3131 3132 /* minimum 4, maximum is 255. The value should be set to the maximum size of encoding string + 1. JPEG2000. 3133 * If vendor specific format is supported, it might be bigger than 9 */ 3134 #ifndef BIP_IMG_ENCODE_SIZE 3135 #define BIP_IMG_ENCODE_SIZE 9 3136 #endif 3137 3138 /* MIME type: text/plain */ 3139 #ifndef BIP_TYPE_SIZE 3140 #define BIP_TYPE_SIZE 20 3141 #endif 3142 3143 /* example: iso-8895-1 */ 3144 #ifndef BIP_CHARSET_SIZE 3145 #define BIP_CHARSET_SIZE 10 3146 #endif 3147 3148 /* friendly name */ 3149 #ifndef BIP_FNAME_SIZE 3150 #define BIP_FNAME_SIZE 20 3151 #endif 3152 3153 /* service name */ 3154 #ifndef BIP_SNAME_SIZE 3155 #define BIP_SNAME_SIZE 60 3156 #endif 3157 3158 /* temporary storage file name(for file system access, may include path) */ 3159 #ifndef BIP_TEMP_NAME_SIZE 3160 #define BIP_TEMP_NAME_SIZE 200 3161 #endif 3162 3163 /* image file name */ 3164 #ifndef BIP_IMG_NAME_SIZE 3165 #define BIP_IMG_NAME_SIZE 200 3166 #endif 3167 3168 /* attachment file name */ 3169 #ifndef BIP_ATT_NAME_SIZE 3170 #define BIP_ATT_NAME_SIZE 200 3171 #endif 3172 3173 /* object (image, attachment, thumbnail) file name (may be used for file system) */ 3174 #ifndef BIP_OBJ_NAME_SIZE 3175 #define BIP_OBJ_NAME_SIZE 200 3176 #endif 3177 3178 3179 3180 /****************************************************************************** 3181 ** 3182 ** HCRP 3183 ** 3184 ******************************************************************************/ 3185 3186 #ifndef HCRP_INCLUDED 3187 #define HCRP_INCLUDED FALSE 3188 #endif 3189 3190 /* This is set to enable server. */ 3191 #ifndef HCRP_SERVER_INCLUDED 3192 #define HCRP_SERVER_INCLUDED FALSE 3193 #endif 3194 3195 /* This is set to enable client. */ 3196 #ifndef HCRP_CLIENT_INCLUDED 3197 #define HCRP_CLIENT_INCLUDED FALSE 3198 #endif 3199 3200 /* TRUE enables the notification option of the profile. */ 3201 #ifndef HCRP_NOTIFICATION_INCLUDED 3202 #define HCRP_NOTIFICATION_INCLUDED TRUE 3203 #endif 3204 3205 /* TRUE enables the vendor specific option of the profile. */ 3206 #ifndef HCRP_VENDOR_SPEC_INCLUDED 3207 #define HCRP_VENDOR_SPEC_INCLUDED TRUE 3208 #endif 3209 3210 /* TRUE enables state machine traces. */ 3211 #ifndef HCRP_FSM_DEBUG 3212 #define HCRP_FSM_DEBUG FALSE 3213 #endif 3214 3215 /* TRUE enables protocol message traces. */ 3216 #ifndef HCRP_PROTO_DEBUG 3217 #define HCRP_PROTO_DEBUG FALSE 3218 #endif 3219 3220 /* Maximum length used to store the service name (Minimum 1). */ 3221 #ifndef HCRP_MAX_SERVICE_NAME_LEN 3222 #define HCRP_MAX_SERVICE_NAME_LEN 32 3223 #endif 3224 3225 /* Maximum length used to store the device name (Minimum 1). */ 3226 #ifndef HCRP_MAX_DEVICE_NAME_LEN 3227 #define HCRP_MAX_DEVICE_NAME_LEN 32 3228 #endif 3229 3230 /* Maximum length of device location (Minimum 1) */ 3231 #ifndef HCRP_MAX_DEVICE_LOC_LEN 3232 #define HCRP_MAX_DEVICE_LOC_LEN 32 3233 #endif 3234 3235 /* Maximum length used to store the friendly name (Minimum 1). */ 3236 #ifndef HCRP_MAX_FRIENDLY_NAME_LEN 3237 #define HCRP_MAX_FRIENDLY_NAME_LEN 32 3238 #endif 3239 3240 /* Maximum length used to store the 1284 id string (Minimum 2 byte length field). */ 3241 #ifndef HCRP_MAX_SDP_1284_ID_LEN 3242 #define HCRP_MAX_SDP_1284_ID_LEN 128 3243 #endif 3244 3245 /* Maximum length for parameters to be processed for vendor specific commands. */ 3246 #ifndef HCRP_MAX_VEND_SPEC_LEN 3247 #define HCRP_MAX_VEND_SPEC_LEN 4 3248 #endif 3249 3250 /* Number of seconds to wait for 2nd GAP to open. */ 3251 #ifndef HCRP_OPEN_CHAN_TOUT 3252 #define HCRP_OPEN_CHAN_TOUT 5 3253 #endif 3254 3255 /* Number of seconds to wait for 2nd GAP to close. */ 3256 #ifndef HCRP_CLOSE_CHAN_TOUT 3257 #define HCRP_CLOSE_CHAN_TOUT 3 3258 #endif 3259 3260 /* Number of seconds to wait for the application to respond to a protocol request. */ 3261 #ifndef HCRP_APPL_RSP_TOUT 3262 #define HCRP_APPL_RSP_TOUT 5 3263 #endif 3264 3265 /* Number of seconds to wait for the peer device to respond to a protocol request. */ 3266 #ifndef HCRP_CMD_RSP_TOUT 3267 #define HCRP_CMD_RSP_TOUT 7 3268 #endif 3269 3270 /* Number of seconds between subsequent credit requests to the server when the send watermark has been exceeded. */ 3271 #ifndef HCRP_CREDIT_REQ_UPDATES 3272 #define HCRP_CREDIT_REQ_UPDATES 1 3273 #endif 3274 3275 /* Maximum number of results to return in a HCRP_FindServices search. */ 3276 #ifndef HCRP_MAX_SEARCH_RESULTS 3277 #define HCRP_MAX_SEARCH_RESULTS 1 3278 #endif 3279 3280 /* Maximum number of bytes to be reserved for searching for the client's notification record. */ 3281 #ifndef HCRP_MAX_NOTIF_DISC_BUF 3282 #define HCRP_MAX_NOTIF_DISC_BUF 300 3283 #endif 3284 3285 /* Maximum number of clients the server will allow to be registered for notifications. */ 3286 #ifndef HCRP_MAX_NOTIF_CLIENTS 3287 #define HCRP_MAX_NOTIF_CLIENTS 3 3288 #endif 3289 3290 /* Spec says minimum of two notification retries. */ 3291 #ifndef HCRP_NOTIF_NUM_RETRIES 3292 #define HCRP_NOTIF_NUM_RETRIES 4 3293 #endif 3294 3295 /************************************************************************* 3296 ** Definitions for Multi-Client Server HCRP 3297 ** Note: Many of the above HCRP definitions are also used 3298 ** Maximum number of clients allowed to connect simultaneously 3299 ** Must be less than ((GAP_MAX_CONNECTIONS - 1) / 2) 3300 */ 3301 #ifndef HCRPM_MAX_CLIENTS 3302 #define HCRPM_MAX_CLIENTS 3 3303 #endif 3304 3305 3306 /****************************************************************************** 3307 ** 3308 ** PAN 3309 ** 3310 ******************************************************************************/ 3311 3312 #ifndef PAN_INCLUDED 3313 #define PAN_INCLUDED FALSE 3314 #endif 3315 3316 3317 /****************************************************************************** 3318 ** 3319 ** SAP 3320 ** 3321 ******************************************************************************/ 3322 3323 #ifndef SAP_SERVER_INCLUDED 3324 #define SAP_SERVER_INCLUDED FALSE 3325 #endif 3326 3327 /************************************************************************* 3328 * A2DP Definitions 3329 */ 3330 #ifndef A2D_INCLUDED 3331 #define A2D_INCLUDED TRUE 3332 #endif 3333 3334 /* TRUE to include SBC utility functions */ 3335 #ifndef A2D_SBC_INCLUDED 3336 #define A2D_SBC_INCLUDED A2D_INCLUDED 3337 #endif 3338 3339 /* TRUE to include MPEG-1,2 (mp3) utility functions */ 3340 #ifndef A2D_M12_INCLUDED 3341 #define A2D_M12_INCLUDED A2D_INCLUDED 3342 #endif 3343 3344 /* TRUE to include MPEG-2,4 (aac) utility functions */ 3345 #ifndef A2D_M24_INCLUDED 3346 #define A2D_M24_INCLUDED A2D_INCLUDED 3347 #endif 3348 3349 /****************************************************************************** 3350 ** 3351 ** AVCTP 3352 ** 3353 ******************************************************************************/ 3354 3355 #ifndef AVCT_INCLUDED 3356 #define AVCT_INCLUDED TRUE 3357 #endif 3358 3359 /* Number of simultaneous ACL links to different peer devices. */ 3360 #ifndef AVCT_NUM_LINKS 3361 #define AVCT_NUM_LINKS 2 3362 #endif 3363 3364 /* Number of simultaneous AVCTP connections. */ 3365 #ifndef AVCT_NUM_CONN 3366 #define AVCT_NUM_CONN 3 3367 #endif 3368 3369 /* Pool ID where to reassemble the SDU. 3370 This Pool allows buffers to be used that are larger than 3371 the L2CAP_MAX_MTU. */ 3372 #ifndef AVCT_BR_USER_RX_POOL_ID 3373 #define AVCT_BR_USER_RX_POOL_ID HCI_ACL_POOL_ID 3374 #endif 3375 3376 /* Pool ID where to hold the SDU. 3377 This Pool allows buffers to be used that are larger than 3378 the L2CAP_MAX_MTU. */ 3379 #ifndef AVCT_BR_USER_TX_POOL_ID 3380 #define AVCT_BR_USER_TX_POOL_ID HCI_ACL_POOL_ID 3381 #endif 3382 3383 /* 3384 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly 3385 */ 3386 #ifndef AVCT_BR_FCR_RX_POOL_ID 3387 #define AVCT_BR_FCR_RX_POOL_ID HCI_ACL_POOL_ID 3388 #endif 3389 3390 /* 3391 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions. 3392 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool. 3393 Note: This pool needs to have enough buffers to hold two times the window size negotiated 3394 in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions. 3395 The size of each buffer must be able to hold the maximum MPS segment size passed in 3396 tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec). 3397 */ 3398 #ifndef AVCT_BR_FCR_TX_POOL_ID 3399 #define AVCT_BR_FCR_TX_POOL_ID HCI_ACL_POOL_ID 3400 #endif 3401 3402 /* AVCTP Browsing channel FCR Option: 3403 Size of the transmission window when using enhanced retransmission mode. Not used 3404 in basic and streaming modes. Range: 1 - 63 3405 */ 3406 #ifndef AVCT_BR_FCR_OPT_TX_WINDOW_SIZE 3407 #define AVCT_BR_FCR_OPT_TX_WINDOW_SIZE 10 3408 #endif 3409 3410 /* AVCTP Browsing channel FCR Option: 3411 Number of transmission attempts for a single I-Frame before taking 3412 Down the connection. Used In ERTM mode only. Value is Ignored in basic and 3413 Streaming modes. 3414 Range: 0, 1-0xFF 3415 0 - infinite retransmissions 3416 1 - single transmission 3417 */ 3418 #ifndef AVCT_BR_FCR_OPT_MAX_TX_B4_DISCNT 3419 #define AVCT_BR_FCR_OPT_MAX_TX_B4_DISCNT 20 3420 #endif 3421 3422 /* AVCTP Browsing channel FCR Option: Retransmission Timeout 3423 The AVRCP specification set a value in the range of 300 - 2000 ms 3424 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode. 3425 Range: Minimum 2000 (2 secs) when supporting PBF. 3426 */ 3427 #ifndef AVCT_BR_FCR_OPT_RETX_TOUT 3428 #define AVCT_BR_FCR_OPT_RETX_TOUT 2000 3429 #endif 3430 3431 /* AVCTP Browsing channel FCR Option: Monitor Timeout 3432 The AVRCP specification set a value in the range of 300 - 2000 ms 3433 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode. 3434 Range: Minimum 12000 (12 secs) when supporting PBF. 3435 */ 3436 #ifndef AVCT_BR_FCR_OPT_MONITOR_TOUT 3437 #define AVCT_BR_FCR_OPT_MONITOR_TOUT 12000 3438 #endif 3439 3440 /****************************************************************************** 3441 ** 3442 ** AVRCP 3443 ** 3444 ******************************************************************************/ 3445 3446 #ifndef AVRC_INCLUDED 3447 #define AVRC_INCLUDED TRUE 3448 #endif 3449 3450 #ifndef AVRC_METADATA_INCLUDED 3451 #define AVRC_METADATA_INCLUDED TRUE 3452 #endif 3453 3454 #ifndef AVRC_ADV_CTRL_INCLUDED 3455 #define AVRC_ADV_CTRL_INCLUDED TRUE 3456 #endif 3457 3458 #ifndef AVRC_CTLR_INCLUDED 3459 #define AVRC_CTLR_INCLUDED TRUE 3460 #endif 3461 3462 /****************************************************************************** 3463 ** 3464 ** MCAP 3465 ** 3466 ******************************************************************************/ 3467 #ifndef MCA_INCLUDED 3468 #define MCA_INCLUDED FALSE 3469 #endif 3470 3471 /* TRUE to support Clock Synchronization OpCodes */ 3472 #ifndef MCA_SYNC_INCLUDED 3473 #define MCA_SYNC_INCLUDED FALSE 3474 #endif 3475 3476 /* The MTU size for the L2CAP configuration on control channel. 48 is the minimal */ 3477 #ifndef MCA_CTRL_MTU 3478 #define MCA_CTRL_MTU 60 3479 #endif 3480 3481 /* The maximum number of registered MCAP instances. */ 3482 #ifndef MCA_NUM_REGS 3483 #define MCA_NUM_REGS 12 3484 #endif 3485 3486 /* The maximum number of control channels (to difference devices) per registered MCAP instances. */ 3487 #ifndef MCA_NUM_LINKS 3488 #define MCA_NUM_LINKS 3 3489 #endif 3490 3491 /* The maximum number of MDEP (including HDP echo) per registered MCAP instances. */ 3492 #ifndef MCA_NUM_DEPS 3493 #define MCA_NUM_DEPS 13 3494 #endif 3495 3496 /* The maximum number of MDL link per control channel. */ 3497 #ifndef MCA_NUM_MDLS 3498 #define MCA_NUM_MDLS 4 3499 #endif 3500 3501 /* Pool ID where to reassemble the SDU. */ 3502 #ifndef MCA_USER_RX_POOL_ID 3503 #define MCA_USER_RX_POOL_ID HCI_ACL_POOL_ID 3504 #endif 3505 3506 /* Pool ID where to hold the SDU. */ 3507 #ifndef MCA_USER_TX_POOL_ID 3508 #define MCA_USER_TX_POOL_ID HCI_ACL_POOL_ID 3509 #endif 3510 3511 /* 3512 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly 3513 */ 3514 #ifndef MCA_FCR_RX_POOL_ID 3515 #define MCA_FCR_RX_POOL_ID HCI_ACL_POOL_ID 3516 #endif 3517 3518 /* 3519 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions. 3520 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool. 3521 Note: This pool needs to have enough buffers to hold two times the window size negotiated 3522 in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions. 3523 The size of each buffer must be able to hold the maximum MPS segment size passed in 3524 tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec). 3525 */ 3526 #ifndef MCA_FCR_TX_POOL_ID 3527 #define MCA_FCR_TX_POOL_ID HCI_ACL_POOL_ID 3528 #endif 3529 3530 /* MCAP control channel FCR Option: 3531 Size of the transmission window when using enhanced retransmission mode. 3532 1 is defined by HDP specification for control channel. 3533 */ 3534 #ifndef MCA_FCR_OPT_TX_WINDOW_SIZE 3535 #define MCA_FCR_OPT_TX_WINDOW_SIZE 1 3536 #endif 3537 3538 /* MCAP control channel FCR Option: 3539 Number of transmission attempts for a single I-Frame before taking 3540 Down the connection. Used In ERTM mode only. Value is Ignored in basic and 3541 Streaming modes. 3542 Range: 0, 1-0xFF 3543 0 - infinite retransmissions 3544 1 - single transmission 3545 */ 3546 #ifndef MCA_FCR_OPT_MAX_TX_B4_DISCNT 3547 #define MCA_FCR_OPT_MAX_TX_B4_DISCNT 20 3548 #endif 3549 3550 /* MCAP control channel FCR Option: Retransmission Timeout 3551 The AVRCP specification set a value in the range of 300 - 2000 ms 3552 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode. 3553 Range: Minimum 2000 (2 secs) when supporting PBF. 3554 */ 3555 #ifndef MCA_FCR_OPT_RETX_TOUT 3556 #define MCA_FCR_OPT_RETX_TOUT 2000 3557 #endif 3558 3559 /* MCAP control channel FCR Option: Monitor Timeout 3560 The AVRCP specification set a value in the range of 300 - 2000 ms 3561 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode. 3562 Range: Minimum 12000 (12 secs) when supporting PBF. 3563 */ 3564 #ifndef MCA_FCR_OPT_MONITOR_TOUT 3565 #define MCA_FCR_OPT_MONITOR_TOUT 12000 3566 #endif 3567 3568 /* MCAP control channel FCR Option: Maximum PDU payload size. 3569 The maximum number of payload octets that the local device can receive in a single PDU. 3570 */ 3571 #ifndef MCA_FCR_OPT_MPS_SIZE 3572 #define MCA_FCR_OPT_MPS_SIZE 1000 3573 #endif 3574 3575 /* Shared transport */ 3576 #ifndef NFC_SHARED_TRANSPORT_ENABLED 3577 #define NFC_SHARED_TRANSPORT_ENABLED FALSE 3578 #endif 3579 3580 /****************************************************************************** 3581 ** 3582 ** SER 3583 ** 3584 ******************************************************************************/ 3585 3586 #ifndef SER_INCLUDED 3587 #define SER_INCLUDED FALSE 3588 #endif 3589 3590 /* Task which runs the serial application. */ 3591 #ifndef SER_TASK 3592 #define SER_TASK BTE_APPL_TASK 3593 #endif 3594 3595 /* Mailbox used by serial application. */ 3596 #ifndef SER_MBOX 3597 #define SER_MBOX TASK_MBOX_1 3598 #endif 3599 3600 /* Mailbox mask. */ 3601 #ifndef SER_MBOX_MASK 3602 #define SER_MBOX_MASK TASK_MBOX_1_EVT_MASK 3603 #endif 3604 3605 /* TX path application event. */ 3606 #ifndef SER_TX_PATH_APPL_EVT 3607 #define SER_TX_PATH_APPL_EVT EVENT_MASK(APPL_EVT_3) 3608 #endif 3609 3610 /* RX path application event. */ 3611 #ifndef SER_RX_PATH_APPL_EVT 3612 #define SER_RX_PATH_APPL_EVT EVENT_MASK(APPL_EVT_4) 3613 #endif 3614 3615 /****************************************************************************** 3616 ** 3617 ** Sleep Mode (Low Power Mode) 3618 ** 3619 ******************************************************************************/ 3620 3621 #ifndef HCILP_INCLUDED 3622 #define HCILP_INCLUDED TRUE 3623 #endif 3624 3625 /****************************************************************************** 3626 ** 3627 ** RPC 3628 ** 3629 ******************************************************************************/ 3630 3631 #ifndef RPC_INCLUDED 3632 #define RPC_INCLUDED FALSE 3633 #endif 3634 3635 /* RPCT task mailbox ID for messages coming from rpcgen code. */ 3636 #ifndef RPCT_MBOX 3637 #define RPCT_MBOX TASK_MBOX_0 3638 #endif 3639 3640 /* RPCT task event for mailbox. */ 3641 #ifndef RPCT_RPC_MBOX_EVT 3642 #define RPCT_RPC_MBOX_EVT TASK_MBOX_0_EVT_MASK 3643 #endif 3644 3645 /* RPCT task event from driver indicating RX data is ready. */ 3646 #ifndef RPCT_RX_READY_EVT 3647 #define RPCT_RX_READY_EVT APPL_EVT_0 3648 #endif 3649 3650 /* RPCT task event from driver indicating data TX is done. */ 3651 #ifndef RPCT_TX_DONE_EVT 3652 #define RPCT_TX_DONE_EVT APPL_EVT_1 3653 #endif 3654 3655 /* RPCT task event indicating data is in the circular buffer. */ 3656 #ifndef RPCT_UCBUF_EVT 3657 #define RPCT_UCBUF_EVT APPL_EVT_2 3658 #endif 3659 3660 /* Task ID of RPCGEN task. */ 3661 #ifndef RPCGEN_TASK 3662 #define RPCGEN_TASK BTU_TASK 3663 #endif 3664 3665 /* RPCGEN task event for messages coming from RPCT. */ 3666 #ifndef RPCGEN_MSG_EVT 3667 #define RPCGEN_MSG_EVT TASK_MBOX_1_EVT_MASK 3668 #endif 3669 3670 #ifndef RPCGEN_MSG_MBOX 3671 #define RPCGEN_MSG_MBOX TASK_MBOX_1 3672 #endif 3673 3674 /* Size of circular buffer used to store diagnostic messages. */ 3675 #ifndef RPCT_UCBUF_SIZE 3676 #define RPCT_UCBUF_SIZE 2000 3677 #endif 3678 3679 /****************************************************************************** 3680 ** 3681 ** SAP - Sample applications 3682 ** 3683 ******************************************************************************/ 3684 3685 #ifndef MMI_INCLUDED 3686 #define MMI_INCLUDED FALSE 3687 #endif 3688 3689 /****************************************************************************** 3690 ** 3691 ** APPL - Application Task 3692 ** 3693 ******************************************************************************/ 3694 /* When TRUE indicates that an application task is to be run */ 3695 #ifndef APPL_INCLUDED 3696 #define APPL_INCLUDED TRUE 3697 #endif 3698 3699 /* When TRUE remote terminal code included (RPC MUST be included) */ 3700 #ifndef RSI_INCLUDED 3701 #define RSI_INCLUDED TRUE 3702 #endif 3703 3704 3705 3706 #define L2CAP_FEATURE_REQ_ID 73 3707 #define L2CAP_FEATURE_RSP_ID 173 3708 3709 3710 /****************************************************************************** 3711 ** 3712 ** BTA 3713 ** 3714 ******************************************************************************/ 3715 /* BTA EIR canned UUID list (default is dynamic) */ 3716 #ifndef BTA_EIR_CANNED_UUID_LIST 3717 #define BTA_EIR_CANNED_UUID_LIST FALSE 3718 #endif 3719 3720 /* Number of supported customer UUID in EIR */ 3721 #ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID 3722 #define BTA_EIR_SERVER_NUM_CUSTOM_UUID 8 3723 #endif 3724 3725 /* CHLD override for bluedroid */ 3726 #ifndef BTA_AG_CHLD_VAL_ECC 3727 #define BTA_AG_CHLD_VAL_ECC "(0,1,1x,2,2x,3)" 3728 #endif 3729 3730 #ifndef BTA_AG_CHLD_VAL 3731 #define BTA_AG_CHLD_VAL "(0,1,2,3)" 3732 #endif 3733 3734 /* Set the CIND to match HFP 1.5 */ 3735 #ifndef BTA_AG_CIND_INFO 3736 #define BTA_AG_CIND_INFO "(\"call\",(0,1)),(\"callsetup\",(0-3)),(\"service\",(0-1)),(\"signal\",(0-5)),(\"roam\",(0,1)),(\"battchg\",(0-5)),(\"callheld\",(0-2))" 3737 #endif 3738 3739 #ifndef BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY 3740 #define BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY TRUE 3741 #endif 3742 3743 /****************************************************************************** 3744 ** 3745 ** BTE 3746 ** 3747 ******************************************************************************/ 3748 #ifndef BTE_PLATFORM_IDLE 3749 #define BTE_PLATFORM_IDLE 3750 #endif 3751 3752 #ifndef BTE_IDLE_TASK_INCLUDED 3753 #define BTE_IDLE_TASK_INCLUDED FALSE 3754 #endif 3755 3756 #ifndef BTE_PLATFORM_INITHW 3757 #define BTE_PLATFORM_INITHW 3758 #endif 3759 3760 #ifndef BTE_BTA_CODE_INCLUDED 3761 #define BTE_BTA_CODE_INCLUDED FALSE 3762 #endif 3763 3764 /****************************************************************************** 3765 ** 3766 ** BTTRC 3767 ** 3768 ******************************************************************************/ 3769 /* Whether to parse and display traces-> Platform specific implementation */ 3770 #ifndef BTTRC_DISP 3771 #define BTTRC_DISP BTTRC_DispOnInsight 3772 #endif 3773 3774 /****************************************************************************** 3775 ** 3776 ** Tracing: Include trace header file here. 3777 ** 3778 ******************************************************************************/ 3779 3780 #include "bt_trace.h" 3781 3782 #endif /* BT_TARGET_H */ 3783