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