OSDN Git Service

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