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