OSDN Git Service

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