OSDN Git Service

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