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