1 /******************************************************************************
3 * Copyright (c) 2014 The Android Open Source Project
4 * Copyright (C) 1999-2012 Broadcom Corporation
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:
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 ******************************************************************************/
26 #include "data_types.h"
29 #ifndef BTIF_HSAG_SERVICE_NAME
30 #define BTIF_HSAG_SERVICE_NAME ("Headset Gateway")
33 #ifndef BTIF_HFAG_SERVICE_NAME
34 #define BTIF_HFAG_SERVICE_NAME ("Handsfree Gateway")
37 #ifndef BTIF_HF_CLIENT_SERVICE_NAME
38 #define BTIF_HF_CLIENT_SERVICE_NAME ("Handsfree")
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"
47 #ifdef HAS_BDROID_BUILDCFG
48 #include "bdroid_buildcfg.h"
53 /* Include common GKI definitions used by this platform */
54 #include "gki_target.h"
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 */
60 //------------------Added from bdroid_buildcfg.h---------------------
62 #define UNV_INCLUDED FALSE
66 #define GATT_PTS FALSE
69 #ifndef L2CAP_INCLUDED
70 #define L2CAP_INCLUDED TRUE
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)
77 #ifndef BTUI_OPS_FORMATS
78 #define BTUI_OPS_FORMATS (BTA_OP_VCARD21_MASK | BTA_OP_ANY_MASK)
81 #ifndef BTA_RFC_MTU_SIZE
82 #define BTA_RFC_MTU_SIZE (L2CAP_MTU_SIZE-L2CAP_MIN_OFFSET-RFCOMM_DATA_OVERHEAD)
86 #define BTA_DUN_MTU BTA_RFC_MTU_SIZE
90 #define BTA_SPP_MTU BTA_RFC_MTU_SIZE
94 #define BTA_FAX_MTU BTA_RFC_MTU_SIZE
97 #ifndef SDP_RAW_PDU_INCLUDED
98 #define SDP_RAW_PDU_INCLUDED TRUE
101 #ifndef GATTS_APPU_USE_GATT_TRACE
102 #define GATTS_APPU_USE_GATT_TRACE FALSE
105 #ifndef SMP_HOST_ENCRYPT_INCLUDED
106 #define SMP_HOST_ENCRYPT_INCLUDED FALSE
109 #ifndef SBC_NO_PCM_CPY_OPTION
110 #define SBC_NO_PCM_CPY_OPTION FALSE
114 #define BTA_INCLUDED TRUE
117 #ifndef BTA_AG_INCLUDED
118 #define BTA_AG_INCLUDED TRUE
121 #ifndef BTA_DM_INCLUDED
122 #define BTA_DM_INCLUDED TRUE
126 #ifndef BTA_DI_INCLUDED
127 #define BTA_DI_INCLUDED FALSE
130 #ifndef BTA_BI_INCLUDED
131 #define BTA_BI_INCLUDED FALSE
134 #ifndef BTA_SC_INCLUDED
135 #define BTA_SC_INCLUDED FALSE
138 #ifndef BTA_PAN_INCLUDED
139 #define BTA_PAN_INCLUDED TRUE
142 #ifndef BTA_FS_INCLUDED
143 #define BTA_FS_INCLUDED TRUE
146 #ifndef BTA_HH_INCLUDED
147 #define BTA_HH_INCLUDED TRUE
151 #define BTA_HH_ROLE BTA_MASTER_ROLE_PREF
154 #ifndef BTA_HH_LE_INCLUDED
155 #define BTA_HH_LE_INCLUDED TRUE
158 #ifndef BTA_AR_INCLUDED
159 #define BTA_AR_INCLUDED TRUE
162 #ifndef BTA_AV_INCLUDED
163 #define BTA_AV_INCLUDED TRUE
166 #ifndef BTA_GATT_INCLUDED
167 #define BTA_GATT_INCLUDED TRUE
170 #ifndef BTA_AV_SINK_INCLUDED
171 #define BTA_AV_SINK_INCLUDED FALSE
174 #ifndef BTA_DISABLE_DELAY
175 #define BTA_DISABLE_DELAY 200 /* in milliseconds */
178 #ifndef RPC_TRACE_ONLY
179 #define RPC_TRACE_ONLY FALSE
182 #ifndef ANDROID_APP_INCLUDED
183 #define ANDROID_APP_INCLUDED TRUE
186 #ifndef ANDROID_USE_LOGCAT
187 #define ANDROID_USE_LOGCAT TRUE
190 #ifndef LINUX_GKI_INCLUDED
191 #define LINUX_GKI_INCLUDED TRUE
194 // If the next wakeup time is less than this threshold, we should acquire
195 // a wakelock instead of setting a wake alarm so we're not bouncing in
196 // and out of suspend frequently.
198 #ifndef GKI_TIMER_INTERVAL_FOR_WAKELOCK
199 #define GKI_TIMER_INTERVAL_FOR_WAKELOCK 3000
202 #ifndef BTA_SYS_TIMER_PERIOD
203 #define BTA_SYS_TIMER_PERIOD 100
206 #ifndef GKI_SHUTDOWN_EVT
207 #define GKI_SHUTDOWN_EVT APPL_EVT_7
210 #ifndef GKI_PTHREAD_JOINABLE
211 #define GKI_PTHREAD_JOINABLE TRUE
214 #ifndef LINUX_DRV_INCLUDED
215 #define LINUX_DRV_INCLUDED TRUE
219 #define LINUX_OS TRUE
222 #ifndef SBC_FOR_EMBEDDED_LINUX
223 #define SBC_FOR_EMBEDDED_LINUX TRUE
226 #ifndef BTA_DM_REMOTE_DEVICE_NAME_LENGTH
227 #define BTA_DM_REMOTE_DEVICE_NAME_LENGTH 248
231 #define AVDT_VERSION 0x0102
234 #ifndef BTA_AG_AT_MAX_LEN
235 #define BTA_AG_AT_MAX_LEN 512
238 #ifndef BTA_AVRCP_FF_RW_SUPPORT
239 #define BTA_AVRCP_FF_RW_SUPPORT TRUE
242 #ifndef BTA_AG_SCO_PKT_TYPES
243 #define BTA_AG_SCO_PKT_TYPES (BTM_SCO_LINK_ONLY_MASK | BTM_SCO_PKT_TYPES_MASK_EV3 | BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 | BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 | BTM_SCO_PKT_TYPES_MASK_NO_3_EV5)
246 #ifndef BTA_AV_RET_TOUT
247 #define BTA_AV_RET_TOUT 15
250 #ifndef PORCHE_PAIRING_CONFLICT
251 #define PORCHE_PAIRING_CONFLICT TRUE
254 #ifndef BTA_AV_CO_CP_SCMS_T
255 #define BTA_AV_CO_CP_SCMS_T FALSE
258 #ifndef AVDT_CONNECT_CP_ONLY
259 #define AVDT_CONNECT_CP_ONLY FALSE
262 /* This feature is used to eanble interleaved scan*/
263 #ifndef BTA_HOST_INTERLEAVE_SEARCH
264 #define BTA_HOST_INTERLEAVE_SEARCH FALSE
267 #ifndef BT_TRACE_PROTOCOL
268 #define BT_TRACE_PROTOCOL TRUE
271 #ifndef BT_USE_TRACES
272 #define BT_USE_TRACES TRUE
275 #ifndef BT_TRACE_BTIF
276 #define BT_TRACE_BTIF TRUE
279 #ifndef BTTRC_INCLUDED
280 #define BTTRC_INCLUDED FALSE
283 #ifndef BT_TRACE_VERBOSE
284 #define BT_TRACE_VERBOSE FALSE
287 #ifndef BTTRC_PARSER_INCLUDED
288 #define BTTRC_PARSER_INCLUDED FALSE
291 #ifndef MAX_TRACE_RAM_SIZE
292 #define MAX_TRACE_RAM_SIZE 10000
295 #ifndef OBX_INITIAL_TRACE_LEVEL
296 #define OBX_INITIAL_TRACE_LEVEL BT_TRACE_LEVEL_ERROR
299 #ifndef PBAP_ZERO_VCARD_IN_DB
300 #define PBAP_ZERO_VCARD_IN_DB FALSE
303 #ifndef BTA_DM_SDP_DB_SIZE
304 #define BTA_DM_SDP_DB_SIZE 8000
308 #define HL_INCLUDED TRUE
311 #ifndef AG_VOICE_SETTINGS
312 #define AG_VOICE_SETTINGS HCI_DEFAULT_VOICE_SETTINGS
315 #ifndef BTIF_DM_OOB_TEST
316 #define BTIF_DM_OOB_TEST TRUE
319 // How long to wait before activating sniff mode after entering the
320 // idle state for FTS, OPS connections
321 #ifndef BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS
322 #define BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS 7000
325 //------------------End added from bdroid_buildcfg.h---------------------
329 /******************************************************************************
333 ******************************************************************************/
335 /* API macros for simulator */
339 #ifndef BTE_BSE_WRAPPER
342 #define BTAPI __declspec(dllexport)
347 #define BTU_API BTAPI
348 #define A2D_API BTAPI
349 #define VDP_API BTAPI
350 #define AVDT_API BTAPI
351 #define AVCT_API BTAPI
352 #define AVRC_API BTAPI
353 #define BIP_API BTAPI
354 #define BNEP_API BTAPI
355 #define BPP_API BTAPI
356 #define BTM_API BTAPI
357 #define CTP_API BTAPI
358 #define DUN_API BTAPI
359 #define FTP_API BTAPI
360 #define GAP_API BTAPI
361 #define GOEP_API BTAPI
362 #define HCI_API BTAPI
363 #define HCRP_API BTAPI
364 #define HID_API BTAPI
365 #define HFP_API BTAPI
366 #define HSP2_API BTAPI
367 #define ICP_API BTAPI
368 #define L2C_API BTAPI
369 #define OBX_API BTAPI
370 #define OPP_API BTAPI
371 #define PAN_API BTAPI
372 #define RFC_API BTAPI
373 #define RPC_API BTAPI
374 #define SDP_API BTAPI
375 #define SPP_API BTAPI
376 #define TCS_API BTAPI
377 #define XML_API BTAPI
378 #define BTA_API BTAPI
379 #define SBC_API BTAPI
380 #define MCE_API BTAPI
381 #define MCA_API BTAPI
382 #define GATT_API BTAPI
383 #define SMP_API BTAPI
386 /******************************************************************************
390 ******************************************************************************/
392 /* Receives HCI events from the lower-layer. */
393 #ifndef HCI_CMD_POOL_ID
394 #define HCI_CMD_POOL_ID GKI_POOL_ID_2
397 #ifndef HCI_CMD_POOL_BUF_SIZE
398 #define HCI_CMD_POOL_BUF_SIZE GKI_BUF2_SIZE
401 /* Receives ACL data packets from thelower-layer. */
402 #ifndef HCI_ACL_POOL_ID
403 #define HCI_ACL_POOL_ID GKI_POOL_ID_3
406 #ifndef HCI_ACL_POOL_BUF_SIZE
407 #define HCI_ACL_POOL_BUF_SIZE GKI_BUF3_SIZE
410 /* Maximum number of buffers available for ACL receive data. */
411 #ifndef HCI_ACL_BUF_MAX
412 #define HCI_ACL_BUF_MAX GKI_BUF3_MAX
415 /* Receives SCO data packets from the lower-layer. */
416 #ifndef HCI_SCO_POOL_ID
417 #define HCI_SCO_POOL_ID GKI_POOL_ID_6
421 #ifndef HCI_DATA_DESCR_POOL_ID
422 #define HCI_DATA_DESCR_POOL_ID GKI_POOL_ID_0
425 /* Sends SDP data packets. */
427 #define SDP_POOL_ID 3
430 /* Sends RFCOMM command packets. */
431 #ifndef RFCOMM_CMD_POOL_ID
432 #define RFCOMM_CMD_POOL_ID GKI_POOL_ID_2
435 #ifndef RFCOMM_CMD_POOL_BUF_SIZE
436 #define RFCOMM_CMD_POOL_BUF_SIZE GKI_BUF2_SIZE
439 /* Sends RFCOMM data packets. */
440 #ifndef RFCOMM_DATA_POOL_ID
441 #define RFCOMM_DATA_POOL_ID GKI_POOL_ID_3
444 #ifndef RFCOMM_DATA_POOL_BUF_SIZE
445 #define RFCOMM_DATA_POOL_BUF_SIZE GKI_BUF3_SIZE
448 /* Sends L2CAP packets to the peer and HCI messages to the controller. */
449 #ifndef L2CAP_CMD_POOL_ID
450 #define L2CAP_CMD_POOL_ID GKI_POOL_ID_2
453 /* Sends L2CAP segmented packets in ERTM mode */
454 #ifndef L2CAP_FCR_TX_POOL_ID
455 #define L2CAP_FCR_TX_POOL_ID HCI_ACL_POOL_ID
458 /* Receives L2CAP segmented packets in ERTM mode */
459 #ifndef L2CAP_FCR_RX_POOL_ID
460 #define L2CAP_FCR_RX_POOL_ID HCI_ACL_POOL_ID
463 /* Number of ACL buffers to assign to LE
464 if the HCI buffer pool is shared with BR/EDR */
465 #ifndef L2C_DEF_NUM_BLE_BUF_SHARED
466 #define L2C_DEF_NUM_BLE_BUF_SHARED 1
469 /* Used by BTM when it sends HCI commands to the controller. */
470 #ifndef BTM_CMD_POOL_ID
471 #define BTM_CMD_POOL_ID GKI_POOL_ID_2
474 #ifndef OBX_CMD_POOL_SIZE
475 #define OBX_CMD_POOL_SIZE GKI_BUF2_SIZE
478 #ifndef OBX_LRG_DATA_POOL_SIZE
479 #define OBX_LRG_DATA_POOL_SIZE GKI_BUF4_SIZE
482 #ifndef OBX_LRG_DATA_POOL_ID
483 #define OBX_LRG_DATA_POOL_ID GKI_POOL_ID_4
486 /* Used for CTP discovery database. */
487 #ifndef CTP_SDP_DB_POOL_ID
488 #define CTP_SDP_DB_POOL_ID GKI_POOL_ID_3
491 /* Used to send data to L2CAP. */
492 #ifndef GAP_DATA_POOL_ID
493 #define GAP_DATA_POOL_ID GKI_POOL_ID_3
496 /* Used for SPP inquiry and discovery databases. */
497 #ifndef SPP_DB_POOL_ID
498 #define SPP_DB_POOL_ID GKI_POOL_ID_3
502 #define SPP_DB_SIZE GKI_BUF3_SIZE
505 /* BNEP data and protocol messages. */
507 #define BNEP_POOL_ID GKI_POOL_ID_3
510 /* RPC pool for temporary trace message buffers. */
511 #ifndef RPC_SCRATCH_POOL_ID
512 #define RPC_SCRATCH_POOL_ID GKI_POOL_ID_2
515 /* RPC scratch buffer size (not related to RPC_SCRATCH_POOL_ID) */
516 #ifndef RPC_SCRATCH_BUF_SIZE
517 #define RPC_SCRATCH_BUF_SIZE GKI_BUF3_SIZE
520 /* RPC pool for protocol messages */
521 #ifndef RPC_MSG_POOL_ID
522 #define RPC_MSG_POOL_ID GKI_POOL_ID_3
525 #ifndef RPC_MSG_POOL_SIZE
526 #define RPC_MSG_POOL_SIZE GKI_BUF3_SIZE
529 /* AVDTP pool for protocol messages */
530 #ifndef AVDT_CMD_POOL_ID
531 #define AVDT_CMD_POOL_ID GKI_POOL_ID_2
534 /* AVDTP pool size for media packets in case of fragmentation */
535 #ifndef AVDT_DATA_POOL_SIZE
536 #define AVDT_DATA_POOL_SIZE GKI_BUF3_SIZE
540 #define PAN_POOL_ID GKI_POOL_ID_3
541 /* Maximum amount of the shared buffer to allocate for PAN */
542 #define PAN_POOL_MAX (GKI_BUF3_MAX / 4)
545 /* UNV pool for read/write serialization */
546 #ifndef UNV_MSG_POOL_ID
547 #define UNV_MSG_POOL_ID GKI_POOL_ID_2
550 #ifndef UNV_MSG_POOL_SIZE
551 #define UNV_MSG_POOL_SIZE GKI_BUF2_SIZE
554 /* AVCTP pool for protocol messages */
555 #ifndef AVCT_CMD_POOL_ID
556 #define AVCT_CMD_POOL_ID GKI_POOL_ID_1
559 #ifndef AVCT_META_CMD_POOL_ID
560 #define AVCT_META_CMD_POOL_ID GKI_POOL_ID_2
563 /* AVRCP pool for protocol messages */
564 #ifndef AVRC_CMD_POOL_ID
565 #define AVRC_CMD_POOL_ID GKI_POOL_ID_1
568 /* AVRCP pool size for protocol messages */
569 #ifndef AVRC_CMD_POOL_SIZE
570 #define AVRC_CMD_POOL_SIZE GKI_BUF1_SIZE
573 /* AVRCP Metadata pool for protocol messages */
574 #ifndef AVRC_META_CMD_POOL_ID
575 #define AVRC_META_CMD_POOL_ID GKI_POOL_ID_2
578 /* AVRCP Metadata pool size for protocol messages */
579 #ifndef AVRC_META_CMD_POOL_SIZE
580 #define AVRC_META_CMD_POOL_SIZE GKI_BUF2_SIZE
584 /* AVRCP buffer size for browsing channel messages */
585 #ifndef AVRC_BROWSE_POOL_SIZE
586 #define AVRC_BROWSE_POOL_SIZE GKI_MAX_BUF_SIZE
589 /* HDP buffer size for the Pulse Oximeter */
590 #ifndef BTA_HL_LRG_DATA_POOL_SIZE
591 #define BTA_HL_LRG_DATA_POOL_SIZE GKI_BUF7_SIZE
594 #ifndef BTA_HL_LRG_DATA_POOL_ID
595 #define BTA_HL_LRG_DATA_POOL_ID GKI_POOL_ID_7
598 /* GATT Server Database pool ID */
599 #ifndef GATT_DB_POOL_ID
600 #define GATT_DB_POOL_ID GKI_POOL_ID_8
603 /* GATT Data sending buffer pool ID, use default ACL pool for fix channel data */
604 #ifndef GATT_BUF_POOL_ID
605 #define GATT_BUF_POOL_ID HCI_ACL_POOL_ID
608 /******************************************************************************
610 ** Lower Layer Interface
612 ******************************************************************************/
614 /* Sends ACL data received over HCI to the upper stack. */
615 #ifndef HCI_ACL_DATA_TO_UPPER
616 #define HCI_ACL_DATA_TO_UPPER(p) {((BT_HDR *)p)->event = BT_EVT_TO_BTU_HCI_ACL; GKI_send_msg (BTU_TASK, BTU_HCI_RCV_MBOX, p);}
619 /* Sends SCO data received over HCI to the upper stack. */
620 #ifndef HCI_SCO_DATA_TO_UPPER
621 #define HCI_SCO_DATA_TO_UPPER(p) {((BT_HDR *)p)->event = BT_EVT_TO_BTU_HCI_SCO; GKI_send_msg (BTU_TASK, BTU_HCI_RCV_MBOX, p);}
624 /* Sends an HCI event received over HCI to theupper stack. */
625 #ifndef HCI_EVT_TO_UPPER
626 #define HCI_EVT_TO_UPPER(p) {((BT_HDR *)p)->event = BT_EVT_TO_BTU_HCI_EVT; GKI_send_msg (BTU_TASK, BTU_HCI_RCV_MBOX, p);}
629 /* Macro for allocating buffer for HCI commands */
630 #ifndef HCI_GET_CMD_BUF
631 #if (!defined(HCI_USE_VARIABLE_SIZE_CMD_BUF) || (HCI_USE_VARIABLE_SIZE_CMD_BUF == FALSE))
632 /* Allocate fixed-size buffer from HCI_CMD_POOL (default case) */
633 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getpoolbuf (HCI_CMD_POOL_ID))
635 /* Allocate smallest possible buffer (for platforms with limited RAM) */
636 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getbuf ((UINT16)(BT_HDR_SIZE + HCIC_PREAMBLE_SIZE + (paramlen))))
638 #endif /* HCI_GET_CMD_BUF */
640 /******************************************************************************
644 ******************************************************************************/
649 BT_API extern void bte_main_hci_send (BT_HDR *p_msg, UINT16 event);
650 BT_API extern void bte_main_lpm_allow_bt_device_sleep(void);
656 /* Sends ACL data received from the upper stack to the BD/EDR HCI transport. */
657 #ifndef HCI_ACL_DATA_TO_LOWER
658 #define HCI_ACL_DATA_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_ACL);
661 #ifndef HCI_BLE_ACL_DATA_TO_LOWER
662 #define HCI_BLE_ACL_DATA_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), (UINT16)(BT_EVT_TO_LM_HCI_ACL|LOCAL_BLE_CONTROLLER_ID));
665 /* Sends SCO data received from the upper stack to the HCI transport. */
666 #ifndef HCI_SCO_DATA_TO_LOWER
667 #define HCI_SCO_DATA_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_SCO);
670 /* Sends an HCI command received from the upper stack to the BD/EDR HCI transport. */
671 #ifndef HCI_CMD_TO_LOWER
672 #define HCI_CMD_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_CMD);
675 /* Sends an LM Diagnosic command received from the upper stack to the HCI transport. */
676 #ifndef HCI_LM_DIAG_TO_LOWER
677 #define HCI_LM_DIAG_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_DIAG);
680 /* Send HCISU a message to allow BT sleep */
681 #ifndef HCI_LP_ALLOW_BT_DEVICE_SLEEP
682 #define HCI_LP_ALLOW_BT_DEVICE_SLEEP() bte_main_lpm_allow_bt_device_sleep()
685 /* If nonzero, the upper-layer sends at most this number of HCI commands to the lower-layer. */
686 #ifndef HCI_MAX_SIMUL_CMDS
687 #define HCI_MAX_SIMUL_CMDS 0
690 /* Timeout for receiving response to HCI command */
691 #ifndef BTU_CMD_CMPL_TIMEOUT
692 #define BTU_CMD_CMPL_TIMEOUT 8
695 /* If TRUE, BTU task will check HCISU again when HCI command timer expires */
696 #ifndef BTU_CMD_CMPL_TOUT_DOUBLE_CHECK
697 #define BTU_CMD_CMPL_TOUT_DOUBLE_CHECK FALSE
700 /* Use 2 second for low-resolution systems, override to 1 for high-resolution systems */
701 #ifndef BT_1SEC_TIMEOUT
702 #define BT_1SEC_TIMEOUT (2)
706 /* if L2CAP_FCR_INCLUDED is TRUE then it should have 100 millisecond resolution */
707 /* if none of them is included then QUICK_TIMER_TICKS_PER_SEC is set to 0 to exclude quick timer */
708 #ifndef QUICK_TIMER_TICKS_PER_SEC
709 #define QUICK_TIMER_TICKS_PER_SEC 10 /* 10ms timer */
712 /******************************************************************************
716 ******************************************************************************/
717 /* if set to TRUE, stack will automatically send an HCI reset at start-up. To be
718 set to FALSE for advanced start-up / shut-down procedures using USER_HW_ENABLE_API
719 and USER_HW_DISABLE_API macros */
720 #ifndef BTM_AUTOMATIC_HCI_RESET
721 #define BTM_AUTOMATIC_HCI_RESET FALSE
724 /* Include BTM Discovery database and code. */
725 #ifndef BTM_DISCOVERY_INCLUDED
726 #define BTM_DISCOVERY_INCLUDED TRUE
729 /* Include inquiry code. */
730 #ifndef BTM_INQUIRY_INCLUDED
731 #define BTM_INQUIRY_INCLUDED TRUE
734 /* Cancel Inquiry on incoming SSP */
735 #ifndef BTM_NO_SSP_ON_INQUIRY
736 #define BTM_NO_SSP_ON_INQUIRY FALSE
739 /* Include periodic inquiry code (used when BTM_INQUIRY_INCLUDED is TRUE). */
740 #ifndef BTM_PERIODIC_INQ_INCLUDED
741 #define BTM_PERIODIC_INQ_INCLUDED TRUE
744 /* Include security authorization code */
745 #ifndef BTM_AUTHORIZATION_INCLUDED
746 #define BTM_AUTHORIZATION_INCLUDED TRUE
749 /* Includes SCO if TRUE */
750 #ifndef BTM_SCO_INCLUDED
751 #define BTM_SCO_INCLUDED TRUE /* TRUE includes SCO code */
754 /* Includes SCO if TRUE */
755 #ifndef BTM_SCO_HCI_INCLUDED
756 #define BTM_SCO_HCI_INCLUDED FALSE /* TRUE includes SCO over HCI code */
759 /* Includes WBS if TRUE */
760 #ifndef BTM_WBS_INCLUDED
761 #define BTM_WBS_INCLUDED FALSE /* TRUE includes WBS code */
764 /* Includes PCM2 support if TRUE */
765 #ifndef BTM_PCM2_INCLUDED
766 #define BTM_PCM2_INCLUDED FALSE
769 /* This is used to work around a controller bug that doesn't like Disconnect
770 ** issued while there is a role switch in progress
772 #ifndef BTM_DISC_DURING_RS
773 #define BTM_DISC_DURING_RS TRUE
776 /**************************
777 ** Initial SCO TX credit
778 *************************/
779 /* max TX SCO data packet size */
780 #ifndef BTM_SCO_DATA_SIZE_MAX
781 #define BTM_SCO_DATA_SIZE_MAX 240
784 /* maximum BTM buffering capacity */
785 #ifndef BTM_SCO_MAX_BUF_CAP
786 #define BTM_SCO_MAX_BUF_CAP (BTM_SCO_INIT_XMIT_CREDIT * 4)
789 /* The size in bytes of the BTM inquiry database. */
790 #ifndef BTM_INQ_DB_SIZE
791 #define BTM_INQ_DB_SIZE 40
794 /* This is set to enable automatic periodic inquiry at startup. */
795 #ifndef BTM_ENABLE_AUTO_INQUIRY
796 #define BTM_ENABLE_AUTO_INQUIRY FALSE
799 /* This is set to always try to acquire the remote device name. */
800 #ifndef BTM_INQ_GET_REMOTE_NAME
801 #define BTM_INQ_GET_REMOTE_NAME FALSE
804 /* The inquiry duration in 1.28 second units when auto inquiry is enabled. */
805 #ifndef BTM_DEFAULT_INQ_DUR
806 #define BTM_DEFAULT_INQ_DUR 5
809 /* The inquiry mode when auto inquiry is enabled. */
810 #ifndef BTM_DEFAULT_INQ_MODE
811 #define BTM_DEFAULT_INQ_MODE BTM_GENERAL_INQUIRY
814 /* The default periodic inquiry maximum delay when auto inquiry is enabled, in 1.28 second units. */
815 #ifndef BTM_DEFAULT_INQ_MAX_DELAY
816 #define BTM_DEFAULT_INQ_MAX_DELAY 30
819 /* The default periodic inquiry minimum delay when auto inquiry is enabled, in 1.28 second units. */
820 #ifndef BTM_DEFAULT_INQ_MIN_DELAY
821 #define BTM_DEFAULT_INQ_MIN_DELAY 20
824 /* The maximum age of entries in inquiry database in seconds ('0' disables feature). */
825 #ifndef BTM_INQ_MAX_AGE
826 #define BTM_INQ_MAX_AGE 0
829 /* The maximum age of entries in inquiry database based on inquiry response failure ('0' disables feature). */
830 #ifndef BTM_INQ_AGE_BY_COUNT
831 #define BTM_INQ_AGE_BY_COUNT 0
834 /* TRUE if controller does not support inquiry event filtering. */
835 #ifndef BTM_BYPASS_EVENT_FILTERING
836 #define BTM_BYPASS_EVENT_FILTERING FALSE
839 /* TRUE if inquiry filtering is desired from BTM. */
840 #ifndef BTM_USE_INQ_RESULTS_FILTER
841 #define BTM_USE_INQ_RESULTS_FILTER TRUE
844 /* The default scan mode */
845 #ifndef BTM_DEFAULT_SCAN_TYPE
846 #define BTM_DEFAULT_SCAN_TYPE BTM_SCAN_TYPE_INTERLACED
849 /* Should connections to unknown devices be allowed when not discoverable? */
850 #ifndef BTM_ALLOW_CONN_IF_NONDISCOVER
851 #define BTM_ALLOW_CONN_IF_NONDISCOVER TRUE
854 /* When connectable mode is set to TRUE, the device will respond to paging. */
855 #ifndef BTM_IS_CONNECTABLE
856 #define BTM_IS_CONNECTABLE FALSE
859 /* Sets the Page_Scan_Window: the length of time that the device is performing a page scan. */
860 #ifndef BTM_DEFAULT_CONN_WINDOW
861 #define BTM_DEFAULT_CONN_WINDOW 0x0012
864 /* Sets the Page_Scan_Activity: the interval between the start of two consecutive page scans. */
865 #ifndef BTM_DEFAULT_CONN_INTERVAL
866 #define BTM_DEFAULT_CONN_INTERVAL 0x0800
869 /* This is set to automatically perform inquiry scan on startup. */
870 #ifndef BTM_IS_DISCOVERABLE
871 #define BTM_IS_DISCOVERABLE FALSE
874 /* When automatic inquiry scan is enabled, this sets the discovery mode. */
875 #ifndef BTM_DEFAULT_DISC_MODE
876 #define BTM_DEFAULT_DISC_MODE BTM_GENERAL_DISCOVERABLE
879 /* When automatic inquiry scan is enabled, this sets the inquiry scan window. */
880 #ifndef BTM_DEFAULT_DISC_WINDOW
881 #define BTM_DEFAULT_DISC_WINDOW 0x0012
884 /* When automatic inquiry scan is enabled, this sets the inquiry scan interval. */
885 #ifndef BTM_DEFAULT_DISC_INTERVAL
886 #define BTM_DEFAULT_DISC_INTERVAL 0x0800
889 /* Sets the period, in seconds, to automatically perform service discovery. */
890 #ifndef BTM_AUTO_DISCOVERY_PERIOD
891 #define BTM_AUTO_DISCOVERY_PERIOD 0
894 /* The size in bytes of the BTM discovery database (if discovery is included). */
895 #ifndef BTM_DISCOVERY_DB_SIZE
896 #define BTM_DISCOVERY_DB_SIZE 4000
899 /* Number of milliseconds to delay BTU task startup upon device initialization. */
900 #ifndef BTU_STARTUP_DELAY
901 #define BTU_STARTUP_DELAY 0
904 /* Whether BTA is included in BTU task. */
905 #ifndef BTU_BTA_INCLUDED
906 #define BTU_BTA_INCLUDED TRUE
909 /* Number of seconds to wait to send an HCI Reset command upon device initialization. */
910 #ifndef BTM_FIRST_RESET_DELAY
911 #define BTM_FIRST_RESET_DELAY 0
914 /* The number of seconds to wait for controller module to reset after issuing an HCI Reset command. */
915 #ifndef BTM_AFTER_RESET_TIMEOUT
916 #define BTM_AFTER_RESET_TIMEOUT 0
919 /* Default class of device
920 * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
922 * SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony)
923 * MAJOR_CLASS:0x02 - PHONE
924 * MINOR_CLASS:0x0C - SMART_PHONE
928 #define BTA_DM_COD {0x5A, 0x02, 0x0C}
931 /* The number of SCO links. */
932 #ifndef BTM_MAX_SCO_LINKS
933 #define BTM_MAX_SCO_LINKS 3
936 /* The preferred type of SCO links (2-eSCO, 0-SCO). */
937 #ifndef BTM_DEFAULT_SCO_MODE
938 #define BTM_DEFAULT_SCO_MODE 2
941 /* The number of security records for peer devices. */
942 #ifndef BTM_SEC_MAX_DEVICE_RECORDS
943 #define BTM_SEC_MAX_DEVICE_RECORDS 100
946 /* The number of security records for services. */
947 #ifndef BTM_SEC_MAX_SERVICE_RECORDS
948 #define BTM_SEC_MAX_SERVICE_RECORDS 32
951 /* If True, force a retrieval of remote device name for each bond in case it's changed */
952 #ifndef BTM_SEC_FORCE_RNR_FOR_DBOND
953 #define BTM_SEC_FORCE_RNR_FOR_DBOND FALSE
956 /* Maximum device name length used in btm database. */
957 #ifndef BTM_MAX_REM_BD_NAME_LEN
958 #define BTM_MAX_REM_BD_NAME_LEN 248
961 /* Maximum local device name length stored btm database.
962 '0' disables storage of the local name in BTM */
963 #ifndef BTM_MAX_LOC_BD_NAME_LEN
964 #define BTM_MAX_LOC_BD_NAME_LEN 248
967 /* Fixed Default String. When this is defined as null string, the device's
968 * product model name is used as the default local name.
970 #ifndef BTM_DEF_LOCAL_NAME
971 #define BTM_DEF_LOCAL_NAME ""
974 /* Maximum service name stored with security authorization (0 if not needed) */
975 #ifndef BTM_SEC_SERVICE_NAME_LEN
976 #define BTM_SEC_SERVICE_NAME_LEN BT_MAX_SERVICE_NAME_LEN
979 /* Maximum number of pending security callback */
980 #ifndef BTM_SEC_MAX_CALLBACKS
981 #define BTM_SEC_MAX_CALLBACKS 7
984 /* Maximum length of the service name. */
985 #ifndef BT_MAX_SERVICE_NAME_LEN
986 #define BT_MAX_SERVICE_NAME_LEN 21
989 /* ACL buffer size in HCI Host Buffer Size command. */
990 #ifndef BTM_ACL_BUF_SIZE
991 #define BTM_ACL_BUF_SIZE 0
994 /* This is set to use the BTM power manager. */
995 #ifndef BTM_PWR_MGR_INCLUDED
996 #define BTM_PWR_MGR_INCLUDED TRUE
999 /* The maximum number of clients that can register with the power manager. */
1000 #ifndef BTM_MAX_PM_RECORDS
1001 #define BTM_MAX_PM_RECORDS 2
1004 /* This is set to show debug trace messages for the power manager. */
1005 #ifndef BTM_PM_DEBUG
1006 #define BTM_PM_DEBUG FALSE
1009 /* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */
1010 #ifndef BTM_SCO_WAKE_PARKED_LINK
1011 #define BTM_SCO_WAKE_PARKED_LINK TRUE
1014 /* This is set to TRUE if the busy level change event is desired. (replace ACL change event) */
1015 #ifndef BTM_BUSY_LEVEL_CHANGE_INCLUDED
1016 #define BTM_BUSY_LEVEL_CHANGE_INCLUDED TRUE
1019 /* If the user does not respond to security process requests within this many seconds,
1020 * a negative response would be sent automatically.
1021 * It's recommended to use a value between 30 and OBX_TIMEOUT_VALUE
1022 * 30 is LMP response timeout value */
1023 #ifndef BTM_SEC_TIMEOUT_VALUE
1024 #define BTM_SEC_TIMEOUT_VALUE 35
1027 /* Maximum number of callbacks that can be registered using BTM_RegisterForVSEvents */
1028 #ifndef BTM_MAX_VSE_CALLBACKS
1029 #define BTM_MAX_VSE_CALLBACKS 3
1032 /******************************************
1034 *******************************************/
1035 /* This is set to TRUE if the server Extended Inquiry Response feature is desired. */
1036 /* server sends EIR to client */
1037 #ifndef BTM_EIR_SERVER_INCLUDED
1038 #define BTM_EIR_SERVER_INCLUDED TRUE
1041 /* This is set to TRUE if the client Extended Inquiry Response feature is desired. */
1042 /* client inquiry to server */
1043 #ifndef BTM_EIR_CLIENT_INCLUDED
1044 #define BTM_EIR_CLIENT_INCLUDED TRUE
1047 /* This is set to TRUE if the FEC is required for EIR packet. */
1048 #ifndef BTM_EIR_DEFAULT_FEC_REQUIRED
1049 #define BTM_EIR_DEFAULT_FEC_REQUIRED TRUE
1052 /* User defined UUID look up table */
1053 #ifndef BTM_EIR_UUID_LKUP_TBL
1056 /* The IO capability of the local device (for Simple Pairing) */
1057 #ifndef BTM_LOCAL_IO_CAPS
1058 #define BTM_LOCAL_IO_CAPS BTM_IO_CAP_IO
1061 #ifndef BTM_LOCAL_IO_CAPS_BLE
1062 #define BTM_LOCAL_IO_CAPS_BLE BTM_IO_CAP_KBDISP
1065 /* The default MITM Protection Requirement (for Simple Pairing)
1066 * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */
1067 #ifndef BTM_DEFAULT_AUTH_REQ
1068 #define BTM_DEFAULT_AUTH_REQ BTM_AUTH_SP_NO
1071 /* The default MITM Protection Requirement for dedicated bonding using Simple Pairing
1072 * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */
1073 #ifndef BTM_DEFAULT_DD_AUTH_REQ
1074 #define BTM_DEFAULT_DD_AUTH_REQ BTM_AUTH_AP_YES
1077 /* Include Out-of-Band implementation for Simple Pairing */
1078 #ifndef BTM_OOB_INCLUDED
1079 #define BTM_OOB_INCLUDED TRUE
1082 /* TRUE to include Sniff Subrating */
1083 #ifndef BTM_SSR_INCLUDED
1084 #define BTM_SSR_INCLUDED TRUE
1087 /*************************
1088 ** End of Lisbon Features
1089 **************************/
1091 /* Used for conformance testing ONLY */
1092 #ifndef BTM_BLE_CONFORMANCE_TESTING
1093 #define BTM_BLE_CONFORMANCE_TESTING FALSE
1096 /* Maximum number of consecutive HCI commands that can time out
1097 * before it gets treated as H/w error*/
1098 #ifndef BTM_MAX_HCI_CMD_TOUT_BEFORE_RESTART
1099 #define BTM_MAX_HCI_CMD_TOUT_BEFORE_RESTART 2
1102 /******************************************************************************
1106 ******************************************************************************/
1108 /* Flow control and retransmission mode */
1110 #ifndef L2CAP_FCR_INCLUDED
1111 #define L2CAP_FCR_INCLUDED TRUE
1114 /* The maximum number of simultaneous links that L2CAP can support. */
1115 #ifndef MAX_ACL_CONNECTIONS
1116 #define MAX_L2CAP_LINKS 7
1118 #define MAX_L2CAP_LINKS MAX_ACL_CONNECTIONS
1121 /* The maximum number of simultaneous channels that L2CAP can support. */
1122 #ifndef MAX_L2CAP_CHANNELS
1123 #define MAX_L2CAP_CHANNELS 16
1126 /* The maximum number of simultaneous applications that can register with L2CAP. */
1127 #ifndef MAX_L2CAP_CLIENTS
1128 #define MAX_L2CAP_CLIENTS 15
1131 /* The number of seconds of link inactivity before a link is disconnected. */
1132 #ifndef L2CAP_LINK_INACTIVITY_TOUT
1133 #define L2CAP_LINK_INACTIVITY_TOUT 4
1136 /* The number of seconds of link inactivity after bonding before a link is disconnected. */
1137 #ifndef L2CAP_BONDING_TIMEOUT
1138 #define L2CAP_BONDING_TIMEOUT 3
1141 /* The time from the HCI connection complete to disconnect if no channel is established. */
1142 #ifndef L2CAP_LINK_STARTUP_TOUT
1143 #define L2CAP_LINK_STARTUP_TOUT 60
1146 /* The L2CAP MTU; must be in accord with the HCI ACL pool size. */
1147 #ifndef L2CAP_MTU_SIZE
1148 #define L2CAP_MTU_SIZE 1691
1151 /* The L2CAP MPS over Bluetooth; must be in accord with the FCR tx pool size and ACL down buffer size. */
1152 #ifndef L2CAP_MPS_OVER_BR_EDR
1153 #define L2CAP_MPS_OVER_BR_EDR 1010
1156 /* This is set to enable host flow control. */
1157 #ifndef L2CAP_HOST_FLOW_CTRL
1158 #define L2CAP_HOST_FLOW_CTRL FALSE
1161 /* If host flow control enabled, this is the number of buffers the controller can have unacknowledged. */
1162 #ifndef L2CAP_HOST_FC_ACL_BUFS
1163 #define L2CAP_HOST_FC_ACL_BUFS 20
1166 /* The percentage of the queue size allowed before a congestion event is sent to the L2CAP client (typically 120%). */
1167 #ifndef L2CAP_FWD_CONG_THRESH
1168 #define L2CAP_FWD_CONG_THRESH 120
1171 /* This is set to enable L2CAP to take the ACL link out of park mode when ACL data is to be sent. */
1172 #ifndef L2CAP_WAKE_PARKED_LINK
1173 #define L2CAP_WAKE_PARKED_LINK TRUE
1176 /* Whether link wants to be the master or the slave. */
1177 #ifndef L2CAP_DESIRED_LINK_ROLE
1178 #define L2CAP_DESIRED_LINK_ROLE HCI_ROLE_SLAVE
1181 /* Include Non-Flushable Packet Boundary Flag feature of Lisbon */
1182 #ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED
1183 #define L2CAP_NON_FLUSHABLE_PB_INCLUDED TRUE
1186 /* Minimum number of ACL credit for high priority link */
1187 #ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
1188 #define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 5
1191 /* used for monitoring HCI ACL credit management */
1192 #ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG
1193 #define L2CAP_HCI_FLOW_CONTROL_DEBUG TRUE
1196 /* Used for calculating transmit buffers off of */
1197 #ifndef L2CAP_NUM_XMIT_BUFFS
1198 #define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX
1201 /* Unicast Connectionless Data */
1202 #ifndef L2CAP_UCD_INCLUDED
1203 #define L2CAP_UCD_INCLUDED FALSE
1206 /* Unicast Connectionless Data MTU */
1207 #ifndef L2CAP_UCD_MTU
1208 #define L2CAP_UCD_MTU L2CAP_MTU_SIZE
1211 /* Unicast Connectionless Data Idle Timeout */
1212 #ifndef L2CAP_UCD_IDLE_TIMEOUT
1213 #define L2CAP_UCD_IDLE_TIMEOUT 2
1216 /* Unicast Connectionless Data Idle Timeout */
1217 #ifndef L2CAP_UCD_CH_PRIORITY
1218 #define L2CAP_UCD_CH_PRIORITY L2CAP_CHNL_PRIORITY_MEDIUM
1221 /* Max clients on Unicast Connectionless Data */
1222 #ifndef L2CAP_MAX_UCD_CLIENTS
1223 #define L2CAP_MAX_UCD_CLIENTS 5
1226 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
1227 /* Excluding L2CAP signaling channel and UCD */
1228 #ifndef L2CAP_NUM_FIXED_CHNLS
1229 #define L2CAP_NUM_FIXED_CHNLS 4
1232 /* First fixed channel supported */
1233 #ifndef L2CAP_FIRST_FIXED_CHNL
1234 #define L2CAP_FIRST_FIXED_CHNL 3
1237 #ifndef L2CAP_LAST_FIXED_CHNL
1238 #define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
1241 /* Round Robin service channels in link */
1242 #ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
1243 #define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE TRUE
1246 /* Used for calculating transmit buffers off of */
1247 #ifndef L2CAP_NUM_XMIT_BUFFS
1248 #define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX
1251 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
1252 #ifndef L2CAP_NUM_FIXED_CHNLS
1253 #define L2CAP_NUM_FIXED_CHNLS 1
1256 /* First fixed channel supported */
1257 #ifndef L2CAP_FIRST_FIXED_CHNL
1258 #define L2CAP_FIRST_FIXED_CHNL 3
1261 #ifndef L2CAP_LAST_FIXED_CHNL
1262 #define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
1265 /* used for monitoring eL2CAP data flow */
1266 #ifndef L2CAP_ERTM_STATS
1267 #define L2CAP_ERTM_STATS FALSE
1270 /* USED FOR FCR TEST ONLY: When TRUE generates bad tx and rx packets */
1271 #ifndef L2CAP_CORRUPT_ERTM_PKTS
1272 #define L2CAP_CORRUPT_ERTM_PKTS FALSE
1275 /* Used for conformance testing ONLY: When TRUE lets scriptwrapper overwrite info response */
1276 #ifndef L2CAP_CONFORMANCE_TESTING
1277 #define L2CAP_CONFORMANCE_TESTING FALSE
1281 #ifndef TIMER_PARAM_TYPE
1283 #define TIMER_PARAM_TYPE void *
1285 #define TIMER_PARAM_TYPE UINT32
1289 /******************************************************************************
1293 ******************************************************************************/
1295 #ifndef BLE_INCLUDED
1296 #define BLE_INCLUDED TRUE
1299 #ifndef BLE_ANDROID_CONTROLLER_SCAN_FILTER
1300 #define BLE_ANDROID_CONTROLLER_SCAN_FILTER TRUE
1303 #ifndef LOCAL_BLE_CONTROLLER_ID
1304 #define LOCAL_BLE_CONTROLLER_ID (1)
1308 * Toggles support for general LE privacy features such as remote address
1309 * resolution, local address rotation etc.
1311 #ifndef BLE_PRIVACY_SPT
1312 #define BLE_PRIVACY_SPT TRUE
1316 * Enables or disables support for local privacy (ex. address rotation)
1318 #ifndef BLE_LOCAL_PRIVACY_ENABLED
1319 #define BLE_LOCAL_PRIVACY_ENABLED TRUE
1323 * Toggles support for vendor specific extensions such as RPA offloading,
1324 * feature discovery, multi-adv etc.
1326 #ifndef BLE_VND_INCLUDED
1327 #define BLE_VND_INCLUDED FALSE
1330 #ifndef BTM_BLE_ADV_TX_POWER
1331 #define BTM_BLE_ADV_TX_POWER {-21, -15, -7, 1, 9}
1335 #ifndef BLE_BATCH_SCAN_INCLUDED
1336 #define BLE_BATCH_SCAN_INCLUDED TRUE
1339 /******************************************************************************
1341 ** ATT/GATT Protocol/Profile Settings
1343 ******************************************************************************/
1344 #ifndef BTA_GATT_INCLUDED
1345 #if BLE_INCLUDED == TRUE
1346 #define BTA_GATT_INCLUDED TRUE
1348 #define BTA_GATT_INCLUDED FALSE
1352 #if BTA_GATT_INCLUDED == TRUE && BLE_INCLUDED == FALSE
1353 #error "can't have GATT without BLE"
1356 #ifndef BLE_LLT_INCLUDED
1357 #define BLE_LLT_INCLUDED TRUE
1359 #ifndef BTM_DUMO_ADDR_CENTRAL_ENABLED
1360 #define BTM_DUMO_ADDR_CENTRAL_ENABLED FALSE
1362 #ifndef ATT_INCLUDED
1363 #define ATT_INCLUDED TRUE
1367 #define ATT_DEBUG TRUE
1370 #ifndef GATT_SERVER_ENABLED
1371 #define GATT_SERVER_ENABLED TRUE
1374 #ifndef GATT_CLIENT_ENABLED
1375 #define GATT_CLIENT_ENABLED TRUE
1378 #ifndef BLE_PERIPHERAL_MODE_SUPPORT
1379 #define BLE_PERIPHERAL_MODE_SUPPORT TRUE
1382 #ifndef BLE_PERIPHERAL_ADV_NAME
1383 #define BLE_PERIPHERAL_ADV_NAME FALSE
1386 #ifndef BLE_DELAY_REQUEST_ENC
1387 /* This flag is to work around IPHONE problem, We need to wait for iPhone ready
1388 before send encryption request to iPhone */
1389 #define BLE_DELAY_REQUEST_ENC FALSE
1392 #ifndef GAP_TRANSPORT_SUPPORTED
1393 #define GAP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
1396 #ifndef GATTP_TRANSPORT_SUPPORTED
1397 #define GATTP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
1400 #ifndef GATT_MAX_SR_PROFILES
1401 #define GATT_MAX_SR_PROFILES 32 /* max is 32 */
1404 #ifndef GATT_MAX_APPS
1405 #define GATT_MAX_APPS 32 /* note: 2 apps used internally GATT and GAP */
1408 #ifndef GATT_MAX_CL_PROFILES
1409 #define GATT_MAX_CL_PROFILES 4
1412 #ifndef GATT_MAX_PHY_CHANNEL
1413 #define GATT_MAX_PHY_CHANNEL 7
1416 /* Used for conformance testing ONLY */
1417 #ifndef GATT_CONFORMANCE_TESTING
1418 #define GATT_CONFORMANCE_TESTING FALSE
1421 /* number of background connection device allowence, ideally to be the same as WL size
1423 #ifndef GATT_MAX_BG_CONN_DEV
1424 #define GATT_MAX_BG_CONN_DEV 32
1427 /******************************************************************************
1431 ******************************************************************************/
1432 #ifndef SMP_INCLUDED
1433 #if BLE_INCLUDED == TRUE
1434 #define SMP_INCLUDED TRUE
1436 #define SMP_INCLUDED FALSE
1440 #if SMP_INCLUDED == TRUE && BLE_INCLUDED == FALSE
1441 #error "can't have SMP without BLE"
1445 #define SMP_DEBUG FALSE
1448 #ifndef SMP_DEFAULT_AUTH_REQ
1449 #define SMP_DEFAULT_AUTH_REQ SMP_AUTH_NB_ENC_ONLY
1452 #ifndef SMP_MAX_ENC_KEY_SIZE
1453 #define SMP_MAX_ENC_KEY_SIZE 16
1456 #ifndef SMP_MIN_ENC_KEY_SIZE
1457 #define SMP_MIN_ENC_KEY_SIZE 7
1460 /* Used for conformance testing ONLY */
1461 #ifndef SMP_CONFORMANCE_TESTING
1462 #define SMP_CONFORMANCE_TESTING FALSE
1465 /******************************************************************************
1469 ******************************************************************************/
1471 /* This is set to enable SDP server functionality. */
1472 #ifndef SDP_SERVER_ENABLED
1473 #define SDP_SERVER_ENABLED TRUE
1476 /* The maximum number of SDP records the server can support. */
1477 #ifndef SDP_MAX_RECORDS
1478 #define SDP_MAX_RECORDS 20
1481 /* The maximum number of attributes in each record. */
1482 #ifndef SDP_MAX_REC_ATTR
1483 //#if defined(HID_DEV_INCLUDED) && (HID_DEV_INCLUDED==TRUE)
1484 #define SDP_MAX_REC_ATTR 25
1486 //#define SDP_MAX_REC_ATTR 13
1490 #ifndef SDP_MAX_PAD_LEN
1491 #define SDP_MAX_PAD_LEN 600
1494 /* The maximum length, in bytes, of an attribute. */
1495 #ifndef SDP_MAX_ATTR_LEN
1496 //#if defined(HID_DEV_INCLUDED) && (HID_DEV_INCLUDED==TRUE)
1497 //#define SDP_MAX_ATTR_LEN 80
1499 //#define SDP_MAX_ATTR_LEN 100
1501 #define SDP_MAX_ATTR_LEN 400
1504 /* The maximum number of attribute filters supported by SDP databases. */
1505 #ifndef SDP_MAX_ATTR_FILTERS
1506 #define SDP_MAX_ATTR_FILTERS 15
1509 /* The maximum number of UUID filters supported by SDP databases. */
1510 #ifndef SDP_MAX_UUID_FILTERS
1511 #define SDP_MAX_UUID_FILTERS 3
1514 /* This is set to enable SDP client functionality. */
1515 #ifndef SDP_CLIENT_ENABLED
1516 #define SDP_CLIENT_ENABLED TRUE
1519 /* The maximum number of record handles retrieved in a search. */
1520 #ifndef SDP_MAX_DISC_SERVER_RECS
1521 #define SDP_MAX_DISC_SERVER_RECS 21
1524 /* The size of a scratchpad buffer, in bytes, for storing the response to an attribute request. */
1525 #ifndef SDP_MAX_LIST_BYTE_COUNT
1526 #define SDP_MAX_LIST_BYTE_COUNT 4096
1529 /* The maximum number of parameters in an SDP protocol element. */
1530 #ifndef SDP_MAX_PROTOCOL_PARAMS
1531 #define SDP_MAX_PROTOCOL_PARAMS 2
1534 /* The maximum number of simultaneous client and server connections. */
1535 #ifndef SDP_MAX_CONNECTIONS
1536 #define SDP_MAX_CONNECTIONS 4
1539 /* The MTU size for the L2CAP configuration. */
1540 #ifndef SDP_MTU_SIZE
1541 #define SDP_MTU_SIZE 672
1544 /* The flush timeout for the L2CAP configuration. */
1545 #ifndef SDP_FLUSH_TO
1546 #define SDP_FLUSH_TO 0xFFFF
1549 /* The name for security authorization. */
1550 #ifndef SDP_SERVICE_NAME
1551 #define SDP_SERVICE_NAME "Service Discovery"
1554 /* The security level for BTM. */
1555 #ifndef SDP_SECURITY_LEVEL
1556 #define SDP_SECURITY_LEVEL BTM_SEC_NONE
1559 /* Device identification feature. */
1560 #ifndef SDP_DI_INCLUDED
1561 #define SDP_DI_INCLUDED TRUE
1564 /******************************************************************************
1568 ******************************************************************************/
1570 #ifndef RFCOMM_INCLUDED
1571 #define RFCOMM_INCLUDED TRUE
1574 /* The maximum number of ports supported. */
1575 #ifndef MAX_RFC_PORTS
1576 #define MAX_RFC_PORTS 30
1579 /* The maximum simultaneous links to different devices. */
1580 #ifndef MAX_ACL_CONNECTIONS
1581 #define MAX_BD_CONNECTIONS 7
1583 #define MAX_BD_CONNECTIONS MAX_ACL_CONNECTIONS
1586 /* The port receive queue low watermark level, in bytes. */
1587 #ifndef PORT_RX_LOW_WM
1588 #define PORT_RX_LOW_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM)
1591 /* The port receive queue high watermark level, in bytes. */
1592 #ifndef PORT_RX_HIGH_WM
1593 #define PORT_RX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM)
1596 /* The port receive queue critical watermark level, in bytes. */
1597 #ifndef PORT_RX_CRITICAL_WM
1598 #define PORT_RX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM)
1601 /* The port receive queue low watermark level, in number of buffers. */
1602 #ifndef PORT_RX_BUF_LOW_WM
1603 #define PORT_RX_BUF_LOW_WM 4
1606 /* The port receive queue high watermark level, in number of buffers. */
1607 #ifndef PORT_RX_BUF_HIGH_WM
1608 #define PORT_RX_BUF_HIGH_WM 10
1611 /* The port receive queue critical watermark level, in number of buffers. */
1612 #ifndef PORT_RX_BUF_CRITICAL_WM
1613 #define PORT_RX_BUF_CRITICAL_WM 15
1616 /* The port transmit queue high watermark level, in bytes. */
1617 #ifndef PORT_TX_HIGH_WM
1618 #define PORT_TX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM)
1621 /* The port transmit queue critical watermark level, in bytes. */
1622 #ifndef PORT_TX_CRITICAL_WM
1623 #define PORT_TX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM)
1626 /* The port transmit queue high watermark level, in number of buffers. */
1627 #ifndef PORT_TX_BUF_HIGH_WM
1628 #define PORT_TX_BUF_HIGH_WM 10
1631 /* The port transmit queue high watermark level, in number of buffers. */
1632 #ifndef PORT_TX_BUF_CRITICAL_WM
1633 #define PORT_TX_BUF_CRITICAL_WM 15
1636 /* The RFCOMM multiplexer preferred flow control mechanism. */
1637 #ifndef PORT_FC_DEFAULT
1638 #define PORT_FC_DEFAULT PORT_FC_CREDIT
1641 /* The maximum number of credits receiver sends to peer when using credit-based flow control. */
1642 #ifndef PORT_CREDIT_RX_MAX
1643 #define PORT_CREDIT_RX_MAX 16
1646 /* The credit low watermark level. */
1647 #ifndef PORT_CREDIT_RX_LOW
1648 #define PORT_CREDIT_RX_LOW 8
1651 /* Test code allowing l2cap FEC on RFCOMM.*/
1652 #ifndef PORT_ENABLE_L2CAP_FCR_TEST
1653 #define PORT_ENABLE_L2CAP_FCR_TEST FALSE
1656 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1657 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_lock() or GKI_disable() */
1658 #ifndef PORT_SCHEDULE_LOCK
1659 #define PORT_SCHEDULE_LOCK GKI_disable()
1662 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1663 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_unlock() or GKI_enable() */
1664 #ifndef PORT_SCHEDULE_UNLOCK
1665 #define PORT_SCHEDULE_UNLOCK GKI_enable()
1668 /******************************************************************************
1672 ******************************************************************************/
1674 #ifndef TCS_INCLUDED
1675 #define TCS_INCLUDED FALSE
1678 /* If set to TRUE, gives lean TCS state machine configuration. */
1680 #define TCS_LEAN FALSE
1683 /* To include/exclude point-to-multipoint broadcast SETUP configuration. */
1684 #ifndef TCS_BCST_SETUP_INCLUDED
1685 #define TCS_BCST_SETUP_INCLUDED TRUE
1688 /* To include/exclude supplementary services. */
1689 #ifndef TCS_SUPP_SVCS_INCLUDED
1690 #define TCS_SUPP_SVCS_INCLUDED TRUE
1693 /* To include/exclude WUG master role. */
1694 #ifndef TCS_WUG_MASTER_INCLUDED
1695 #define TCS_WUG_MASTER_INCLUDED TRUE
1698 /* To include/exclude WUG member role. */
1699 #ifndef TCS_WUG_MEMBER_INCLUDED
1700 #define TCS_WUG_MEMBER_INCLUDED TRUE
1703 /* Maximum number of WUG members. */
1704 #ifndef TCS_MAX_WUG_MEMBERS
1705 #define TCS_MAX_WUG_MEMBERS 7
1708 /* Broadcom specific acknowledgement message to ensure fast and robust operation of WUG FIMA procedure. */
1709 #ifndef TCS_WUG_LISTEN_ACPT_ACK_INCLUDED
1710 #define TCS_WUG_LISTEN_ACPT_ACK_INCLUDED TRUE
1713 /* The number of simultaneous calls supported. */
1714 #ifndef TCS_MAX_NUM_SIMUL_CALLS
1715 #define TCS_MAX_NUM_SIMUL_CALLS 3
1718 /* The number of devices the device can connect to. */
1719 #ifndef TCS_MAX_NUM_ACL_CONNS
1720 #define TCS_MAX_NUM_ACL_CONNS 7
1723 /* The maximum length, in bytes, of the company specific information element. */
1724 #ifndef TCS_MAX_CO_SPEC_LEN
1725 #define TCS_MAX_CO_SPEC_LEN 40
1728 /* The maximum length, in bytes, of the audio control information element . */
1729 #ifndef TCS_MAX_AUDIO_CTL_LEN
1730 #define TCS_MAX_AUDIO_CTL_LEN 40
1733 /* (Dis)allow EDR ESCO */
1734 #ifndef TCS_AUDIO_USE_ESCO_EDR
1735 #define TCS_AUDIO_USE_ESCO_EDR FALSE
1738 /******************************************************************************
1742 ******************************************************************************/
1743 #ifndef OBX_INCLUDED
1744 #define OBX_INCLUDED FALSE
1747 #ifndef OBX_CLIENT_INCLUDED
1748 #define OBX_CLIENT_INCLUDED TRUE
1751 #ifndef OBX_SERVER_INCLUDED
1752 #define OBX_SERVER_INCLUDED TRUE
1755 /* TRUE to include OBEX authentication/MD5 code */
1756 #ifndef OBX_MD5_INCLUDED
1757 #define OBX_MD5_INCLUDED TRUE
1760 /* TRUE to include OBEX authentication/MD5 test code */
1761 #ifndef OBX_MD5_TEST_INCLUDED
1762 #define OBX_MD5_TEST_INCLUDED FALSE
1765 /* TRUE to include OBEX 1.4 enhancement (including Obex Over L2CAP) */
1766 #ifndef OBX_14_INCLUDED
1767 #define OBX_14_INCLUDED FALSE
1769 /* MD5 code is required to use OBEX 1.4 features (Reliable session) */
1770 #if (OBX_MD5_INCLUDED == FALSE)
1771 #undef OBX_14_INCLUDED
1772 #define OBX_14_INCLUDED FALSE
1775 /* L2CAP FCR/eRTM mode is required to use OBEX Over L2CAP */
1776 #if (L2CAP_FCR_INCLUDED == FALSE)
1777 #undef OBX_14_INCLUDED
1778 #define OBX_14_INCLUDED FALSE
1781 /* The timeout value (in seconds) for reliable sessions to remain in suspend. 0xFFFFFFFF for no timeout event. */
1782 #ifndef OBX_SESS_TIMEOUT_VALUE
1783 #define OBX_SESS_TIMEOUT_VALUE 600
1786 /* The idle timeout value. 0 for no timeout event. */
1787 #ifndef OBX_TIMEOUT_VALUE
1788 #define OBX_TIMEOUT_VALUE 60
1791 /* Timeout value used for disconnect */
1792 #ifndef OBX_DISC_TOUT_VALUE
1793 #define OBX_DISC_TOUT_VALUE 5
1796 /* The maximum number of registered servers. */
1797 #ifndef OBX_NUM_SERVERS
1798 #define OBX_NUM_SERVERS 12
1801 /* The maximum number of sessions per registered server. */
1802 #ifndef OBX_MAX_SR_SESSION
1803 #define OBX_MAX_SR_SESSION 4
1806 /* The maximum number of sessions for all registered servers.
1807 * (must be equal or bigger than OBX_NUM_SERVERS) */
1808 #ifndef OBX_NUM_SR_SESSIONS
1809 #define OBX_NUM_SR_SESSIONS 26
1812 /* The maximum number of sessions per registered server.
1813 * must be less than MAX_BD_CONNECTIONS */
1814 #ifndef OBX_MAX_SR_SESSION
1815 #define OBX_MAX_SR_SESSION 4
1818 /* The maximum number of suspended sessions per registered servers. */
1819 #ifndef OBX_MAX_SUSPEND_SESSIONS
1820 #define OBX_MAX_SUSPEND_SESSIONS 4
1823 /* The maximum number of active clients. */
1824 #ifndef OBX_NUM_CLIENTS
1825 #define OBX_NUM_CLIENTS 8
1828 /* The maximum length of OBEX target header.*/
1829 #ifndef OBX_MAX_TARGET_LEN
1830 #define OBX_MAX_TARGET_LEN 16
1833 /* The maximum length of authentication challenge realm.*/
1834 #ifndef OBX_MAX_REALM_LEN
1835 #define OBX_MAX_REALM_LEN 30
1838 /* The maximum of GKI buffer queued at OBX before flow control L2CAP */
1839 #ifndef OBX_MAX_RX_QUEUE_COUNT
1840 #define OBX_MAX_RX_QUEUE_COUNT 3
1843 /* This option is application when OBX_14_INCLUDED=TRUE
1844 Pool ID where to reassemble the SDU.
1845 This Pool will allow buffers to be used that are larger than
1846 the L2CAP_MAX_MTU. */
1847 #ifndef OBX_USER_RX_POOL_ID
1848 #define OBX_USER_RX_POOL_ID OBX_LRG_DATA_POOL_ID
1851 /* This option is application when OBX_14_INCLUDED=TRUE
1852 Pool ID where to hold the SDU.
1853 This Pool will allow buffers to be used that are larger than
1854 the L2CAP_MAX_MTU. */
1855 #ifndef OBX_USER_TX_POOL_ID
1856 #define OBX_USER_TX_POOL_ID OBX_LRG_DATA_POOL_ID
1859 /* This option is application when OBX_14_INCLUDED=TRUE
1860 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
1862 #ifndef OBX_FCR_RX_POOL_ID
1863 #define OBX_FCR_RX_POOL_ID HCI_ACL_POOL_ID
1866 /* This option is application when OBX_14_INCLUDED=TRUE
1867 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
1868 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
1869 Note: This pool needs to have enough buffers to hold two times the window size negotiated
1870 in the L2CA_SetFCROptions (2 * tx_win_size) to allow for retransmissions.
1871 The size of each buffer must be able to hold the maximum MPS segment size passed in
1872 L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1874 #ifndef OBX_FCR_TX_POOL_ID
1875 #define OBX_FCR_TX_POOL_ID HCI_ACL_POOL_ID
1878 /* This option is application when OBX_14_INCLUDED=TRUE
1879 Size of the transmission window when using enhanced retransmission mode. Not used
1880 in basic and streaming modes. Range: 1 - 63
1882 #ifndef OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR
1883 #define OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR 20
1886 /* This option is application when OBX_14_INCLUDED=TRUE
1887 Number of transmission attempts for a single I-Frame before taking
1888 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1891 0 - infinite retransmissions
1892 1 - single transmission
1894 #ifndef OBX_FCR_OPT_MAX_TX_B4_DISCNT
1895 #define OBX_FCR_OPT_MAX_TX_B4_DISCNT 20
1898 /* This option is application when OBX_14_INCLUDED=TRUE
1899 Retransmission Timeout
1900 Range: Minimum 2000 (2 secs) on BR/EDR when supporting PBF.
1902 #ifndef OBX_FCR_OPT_RETX_TOUT
1903 #define OBX_FCR_OPT_RETX_TOUT 2000
1906 /* This option is application when OBX_14_INCLUDED=TRUE
1908 Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
1910 #ifndef OBX_FCR_OPT_MONITOR_TOUT
1911 #define OBX_FCR_OPT_MONITOR_TOUT 12000
1914 /******************************************************************************
1918 ******************************************************************************/
1920 #ifndef BNEP_INCLUDED
1921 #define BNEP_INCLUDED TRUE
1924 /* Protocol filtering is an optional feature. Bydefault it will be turned on */
1925 #ifndef BNEP_SUPPORTS_PROT_FILTERS
1926 #define BNEP_SUPPORTS_PROT_FILTERS TRUE
1929 /* Multicast filtering is an optional feature. Bydefault it will be turned on */
1930 #ifndef BNEP_SUPPORTS_MULTI_FILTERS
1931 #define BNEP_SUPPORTS_MULTI_FILTERS TRUE
1934 /* BNEP status API call is used mainly to get the L2CAP handle */
1935 #ifndef BNEP_SUPPORTS_STATUS_API
1936 #define BNEP_SUPPORTS_STATUS_API TRUE
1939 /* This is just a debug function */
1940 #ifndef BNEP_SUPPORTS_DEBUG_DUMP
1941 #define BNEP_SUPPORTS_DEBUG_DUMP TRUE
1944 #ifndef BNEP_SUPPORTS_ALL_UUID_LENGTHS
1945 #define BNEP_SUPPORTS_ALL_UUID_LENGTHS TRUE /* Otherwise it will support only 16bit UUIDs */
1949 ** When BNEP connection changes roles after the connection is established
1950 ** we will do an authentication check again on the new role
1952 #ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH
1953 #define BNEP_DO_AUTH_FOR_ROLE_SWITCH TRUE
1957 /* Maximum number of protocol filters supported. */
1958 #ifndef BNEP_MAX_PROT_FILTERS
1959 #define BNEP_MAX_PROT_FILTERS 5
1962 /* Maximum number of multicast filters supported. */
1963 #ifndef BNEP_MAX_MULTI_FILTERS
1964 #define BNEP_MAX_MULTI_FILTERS 5
1967 /* Minimum MTU size. */
1968 #ifndef BNEP_MIN_MTU_SIZE
1969 #define BNEP_MIN_MTU_SIZE L2CAP_MTU_SIZE
1972 /* Preferred MTU size. */
1973 #ifndef BNEP_MTU_SIZE
1974 #define BNEP_MTU_SIZE BNEP_MIN_MTU_SIZE
1977 /* Maximum size of user data, in bytes. */
1978 #ifndef BNEP_MAX_USER_DATA_SIZE
1979 #define BNEP_MAX_USER_DATA_SIZE 1500
1982 /* Maximum number of buffers allowed in transmit data queue. */
1983 #ifndef BNEP_MAX_XMITQ_DEPTH
1984 #define BNEP_MAX_XMITQ_DEPTH 20
1987 /* Maximum number BNEP of connections supported. */
1988 #ifndef BNEP_MAX_CONNECTIONS
1989 #define BNEP_MAX_CONNECTIONS 7
1993 /******************************************************************************
1997 ******************************************************************************/
1999 #ifndef AVDT_INCLUDED
2000 #define AVDT_INCLUDED TRUE
2003 /* Include reporting capability in AVDTP */
2004 #ifndef AVDT_REPORTING
2005 #define AVDT_REPORTING TRUE
2008 /* Include multiplexing capability in AVDTP */
2009 #ifndef AVDT_MULTIPLEXING
2010 #define AVDT_MULTIPLEXING TRUE
2013 /* Number of simultaneous links to different peer devices. */
2014 #ifndef AVDT_NUM_LINKS
2015 #define AVDT_NUM_LINKS 2
2018 /* Number of simultaneous stream endpoints. */
2019 #ifndef AVDT_NUM_SEPS
2020 #define AVDT_NUM_SEPS 3
2023 /* Number of transport channels setup per media stream(audio or video) */
2024 #ifndef AVDT_NUM_CHANNELS
2026 #if AVDT_REPORTING == TRUE
2027 /* signaling, media and reporting channels */
2028 #define AVDT_NUM_CHANNELS 3
2030 /* signaling and media channels */
2031 #define AVDT_NUM_CHANNELS 2
2036 /* Number of transport channels setup by AVDT for all media streams
2037 * AVDT_NUM_CHANNELS * Number of simultaneous streams.
2039 #ifndef AVDT_NUM_TC_TBL
2040 #define AVDT_NUM_TC_TBL 6
2044 /* Maximum size in bytes of the codec capabilities information element. */
2045 #ifndef AVDT_CODEC_SIZE
2046 #define AVDT_CODEC_SIZE 10
2049 /* Maximum size in bytes of the content protection information element. */
2050 #ifndef AVDT_PROTECT_SIZE
2051 #define AVDT_PROTECT_SIZE 90
2054 /* Maximum number of GKI buffers in the fragment queue (for video frames).
2055 * Must be less than the number of buffers in the buffer pool of size AVDT_DATA_POOL_SIZE */
2056 #ifndef AVDT_MAX_FRAG_COUNT
2057 #define AVDT_MAX_FRAG_COUNT 15
2060 /******************************************************************************
2064 ******************************************************************************/
2066 #ifndef PAN_INCLUDED
2067 #define PAN_INCLUDED TRUE
2070 /* This will enable the PANU role */
2071 #ifndef PAN_SUPPORTS_ROLE_PANU
2072 #define PAN_SUPPORTS_ROLE_PANU TRUE
2075 /* This will enable the GN role */
2076 #ifndef PAN_SUPPORTS_ROLE_GN
2077 #define PAN_SUPPORTS_ROLE_GN TRUE
2080 /* This will enable the NAP role */
2081 #ifndef PAN_SUPPORTS_ROLE_NAP
2082 #define PAN_SUPPORTS_ROLE_NAP TRUE
2085 /* This is just for debugging purposes */
2086 #ifndef PAN_SUPPORTS_DEBUG_DUMP
2087 #define PAN_SUPPORTS_DEBUG_DUMP TRUE
2091 /* Maximum number of PAN connections allowed */
2092 #ifndef MAX_PAN_CONNS
2093 #define MAX_PAN_CONNS 7
2096 /* Default service name for NAP role */
2097 #ifndef PAN_NAP_DEFAULT_SERVICE_NAME
2098 #define PAN_NAP_DEFAULT_SERVICE_NAME "Network Access Point Service"
2101 /* Default service name for GN role */
2102 #ifndef PAN_GN_DEFAULT_SERVICE_NAME
2103 #define PAN_GN_DEFAULT_SERVICE_NAME "Group Network Service"
2106 /* Default service name for PANU role */
2107 #ifndef PAN_PANU_DEFAULT_SERVICE_NAME
2108 #define PAN_PANU_DEFAULT_SERVICE_NAME "PAN User Service"
2111 /* Default description for NAP role service */
2112 #ifndef PAN_NAP_DEFAULT_DESCRIPTION
2113 #define PAN_NAP_DEFAULT_DESCRIPTION "NAP"
2116 /* Default description for GN role service */
2117 #ifndef PAN_GN_DEFAULT_DESCRIPTION
2118 #define PAN_GN_DEFAULT_DESCRIPTION "GN"
2121 /* Default description for PANU role service */
2122 #ifndef PAN_PANU_DEFAULT_DESCRIPTION
2123 #define PAN_PANU_DEFAULT_DESCRIPTION "PANU"
2126 /* Default Security level for PANU role. */
2127 #ifndef PAN_PANU_SECURITY_LEVEL
2128 #define PAN_PANU_SECURITY_LEVEL 0
2131 /* Default Security level for GN role. */
2132 #ifndef PAN_GN_SECURITY_LEVEL
2133 #define PAN_GN_SECURITY_LEVEL 0
2136 /* Default Security level for NAP role. */
2137 #ifndef PAN_NAP_SECURITY_LEVEL
2138 #define PAN_NAP_SECURITY_LEVEL 0
2144 /******************************************************************************
2148 ******************************************************************************/
2150 #ifndef GAP_INCLUDED
2151 #define GAP_INCLUDED TRUE
2154 /* This is set to enable use of GAP L2CAP connections. */
2155 #ifndef GAP_CONN_INCLUDED
2156 #define GAP_CONN_INCLUDED TRUE
2159 /* This is set to enable posting event for data write */
2160 #ifndef GAP_CONN_POST_EVT_INCLUDED
2161 #define GAP_CONN_POST_EVT_INCLUDED FALSE
2164 /* The maximum number of simultaneous GAP L2CAP connections. */
2165 #ifndef GAP_MAX_CONNECTIONS
2166 #define GAP_MAX_CONNECTIONS 8
2169 /******************************************************************************
2173 ******************************************************************************/
2175 #ifndef CTP_INCLUDED
2176 #define CTP_INCLUDED FALSE
2179 /* To include CTP gateway functionality or not. */
2180 #ifndef CTP_GW_INCLUDED
2181 #define CTP_GW_INCLUDED TRUE
2184 /* The number of terminals supported. */
2185 #ifndef CTP_MAX_NUM_TLS
2186 #define CTP_MAX_NUM_TLS 7
2189 /* If the controller can not support sniff mode when the SCO is up, set this to FALSE. */
2190 #ifndef CTP_USE_SNIFF_ON_SCO
2191 #define CTP_USE_SNIFF_ON_SCO FALSE
2194 /* When ACL link between TL and GW is idle for more than this amount of seconds, the ACL may be put to low power mode. */
2195 #ifndef CTP_TL_IDLE_TIMEOUT
2196 #define CTP_TL_IDLE_TIMEOUT 90
2199 /* To include CTP terminal functionality or not. */
2200 #ifndef CTP_TL_INCLUDED
2201 #define CTP_TL_INCLUDED TRUE
2204 /* To include CTP device discovery functionality or not. */
2205 #ifndef CTP_DISCOVERY_INCLUDED
2206 #define CTP_DISCOVERY_INCLUDED TRUE
2209 /* set to TRUE for controllers that do not support multi-point */
2210 #ifndef CTP_TL_WAIT_DISC
2211 #define CTP_TL_WAIT_DISC TRUE
2214 /* The CTP inquiry database size. */
2215 #ifndef CTP_INQ_DB_SIZE
2216 #define CTP_INQ_DB_SIZE CTP_DISC_REC_SIZE
2219 /* The CTP discovery record size. */
2220 #ifndef CTP_DISC_REC_SIZE
2221 #define CTP_DISC_REC_SIZE 60
2224 /* CTP TL would try to re-establish L2CAP channel after channel is disconnected for this amount of seconds. */
2225 #ifndef CTP_GUARD_LINK_LOST
2226 #define CTP_GUARD_LINK_LOST 1
2229 /* The link policy bitmap. */
2230 #ifndef CTP_DEFAULT_LINK_POLICY
2231 #define CTP_DEFAULT_LINK_POLICY 0x000F
2234 /* The minimum period interval used for the sniff and park modes. */
2235 #ifndef CTP_DEF_LOWPWR_MIN_PERIOD
2236 #define CTP_DEF_LOWPWR_MIN_PERIOD 0x100
2239 /* The maximum period interval used for the sniff and park modes. */
2240 #ifndef CTP_DEF_LOWPWR_MAX_PERIOD
2241 #define CTP_DEF_LOWPWR_MAX_PERIOD 0x1E0
2244 /* The number of baseband receive slot sniff attempts. */
2245 #ifndef CTP_DEF_LOWPWR_ATTEMPT
2246 #define CTP_DEF_LOWPWR_ATTEMPT 0x200
2249 /* The number of baseband receive slots for sniff timeout. */
2250 #ifndef CTP_DEF_LOWPWR_TIMEOUT
2251 #define CTP_DEF_LOWPWR_TIMEOUT 0x200
2254 /* This is set if CTP is to use park mode. */
2255 #ifndef CTP_PARK_INCLUDED
2256 #define CTP_PARK_INCLUDED TRUE
2259 /* This is set if CTP is to use sniff mode. */
2260 #ifndef CTP_SNIFF_INCLUDED
2261 #define CTP_SNIFF_INCLUDED TRUE
2264 /* To include CTP data exchange functionality or not. */
2265 #ifndef CTP_DATA_EXCHG_FEATURE
2266 #define CTP_DATA_EXCHG_FEATURE FALSE
2269 /* To include CTP GW intercom functionality or not. */
2270 #ifndef CTP_GW_INTERCOM_FEATURE
2271 #define CTP_GW_INTERCOM_FEATURE FALSE
2274 /* The MTU size for L2CAP channel. */
2275 #ifndef CTP_MTU_SIZE
2276 #define CTP_MTU_SIZE 200
2279 /* The L2CAP PSM for the data exchange feature. */
2280 #ifndef CTP_DATA_EXCHG_PSM
2281 #define CTP_DATA_EXCHG_PSM 13
2284 /* The flush timeout for L2CAP channels. */
2285 #ifndef CTP_FLUSH_TO
2286 #define CTP_FLUSH_TO 0xFFFF
2289 /* The default service name for CTP. */
2290 #ifndef CTP_DEFAULT_SERVICE_NAME
2291 #define CTP_DEFAULT_SERVICE_NAME "Cordless Telephony"
2294 /* The CTP security level. */
2295 #ifndef CTP_SECURITY_LEVEL
2296 #define CTP_SECURITY_LEVEL (BTM_SEC_IN_AUTHORIZE | BTM_SEC_IN_AUTHENTICATE | BTM_SEC_IN_ENCRYPT)
2299 /* The number of lines to the external network. */
2300 #ifndef CTP_MAX_LINES
2301 #define CTP_MAX_LINES 1
2304 /* Test if the number of resources in TCS is consistent with CTP setting. */
2305 #ifndef CTP_TEST_FULL_TCS
2306 #define CTP_TEST_FULL_TCS TRUE
2309 /* The default inquiry mode. */
2310 #ifndef CTP_DEFAULT_INQUIRY_MODE
2311 #define CTP_DEFAULT_INQUIRY_MODE BTM_GENERAL_INQUIRY
2314 /* The default inquiry duration. */
2315 #ifndef CTP_DEFAULT_INQ_DURATION
2316 #define CTP_DEFAULT_INQ_DURATION 4
2319 /* The maximum number of inquiry responses. */
2320 #ifndef CTP_DEFAULT_INQ_MAX_RESP
2321 #define CTP_DEFAULT_INQ_MAX_RESP 3
2324 /* When TL does not create another L2CAP channel within this period of time GW declares that it's "Connected Limited". */
2325 #ifndef CTP_TL_CONN_TIMEOUT
2326 #define CTP_TL_CONN_TIMEOUT 5
2329 /* The delay for ACL to completely disconnect (for intercom) before sending the connect request to GW. */
2330 #ifndef CTP_RECONNECT_DELAY
2331 #define CTP_RECONNECT_DELAY 5
2334 /* How many times to retry connection when it has failed. */
2335 #ifndef CTP_RETRY_ON_CONN_ERR
2336 #define CTP_RETRY_ON_CONN_ERR 5
2339 /******************************************************************************
2343 ******************************************************************************/
2345 #ifndef ICP_INCLUDED
2346 #define ICP_INCLUDED FALSE
2349 /* The ICP default MTU. */
2350 #ifndef ICP_MTU_SIZE
2351 #define ICP_MTU_SIZE 100
2354 /* The ICP security level. */
2355 #ifndef ICP_SECURITY_LEVEL
2356 #define ICP_SECURITY_LEVEL BTM_SEC_NONE
2359 /* The default service name for ICP. */
2360 #ifndef ICP_DEFAULT_SERVICE_NAME
2361 #define ICP_DEFAULT_SERVICE_NAME "Intercom"
2364 /* The flush timeout for L2CAP channels. */
2365 #ifndef ICP_FLUSH_TO
2366 #define ICP_FLUSH_TO 0xFFFF
2369 /******************************************************************************
2373 ******************************************************************************/
2375 #ifndef SPP_INCLUDED
2376 #define SPP_INCLUDED FALSE
2379 /* The SPP default MTU. */
2380 #ifndef SPP_DEFAULT_MTU
2381 #define SPP_DEFAULT_MTU 127
2384 /* The interval, in seconds, that a client tries to reconnect to a service. */
2385 #ifndef SPP_RETRY_CONN_INTERVAL
2386 #define SPP_RETRY_CONN_INTERVAL 1
2389 /* The SPP discoverable mode: limited or general. */
2390 #ifndef SPP_DISCOVERABLE_MODE
2391 #define SPP_DISCOVERABLE_MODE BTM_GENERAL_DISCOVERABLE
2394 /* The maximum number of inquiry results returned in by inquiry procedure. */
2395 #ifndef SPP_DEF_INQ_MAX_RESP
2396 #define SPP_DEF_INQ_MAX_RESP 10
2399 /* The SPP discovery record size. */
2400 #ifndef SPP_DISC_REC_SIZE
2401 #define SPP_DISC_REC_SIZE 60
2404 #ifndef SPP_MAX_RECS_PER_DEVICE
2405 #define SPP_MAX_RECS_PER_DEVICE (SPP_DB_SIZE / SPP_DISC_REC_SIZE)
2408 /* Inquiry duration in 1.28 second units. */
2409 #ifndef SPP_DEF_INQ_DURATION
2410 #define SPP_DEF_INQ_DURATION 9
2413 /* keep the raw data received from SDP server in database. */
2414 #ifndef SDP_RAW_DATA_INCLUDED
2415 #define SDP_RAW_DATA_INCLUDED TRUE
2418 /* TRUE, to allow JV to create L2CAP connection on SDP PSM. */
2419 #ifndef SDP_FOR_JV_INCLUDED
2420 #define SDP_FOR_JV_INCLUDED FALSE
2423 /* Inquiry duration in 1.28 second units. */
2425 #define SDP_DEBUG TRUE
2428 /******************************************************************************
2432 ******************************************************************************/
2434 #ifndef HSP2_INCLUDED
2435 #define HSP2_INCLUDED FALSE
2438 /* Include the ability to perform inquiry for peer devices. */
2439 #ifndef HSP2_INQUIRY_INCLUDED
2440 #define HSP2_INQUIRY_INCLUDED TRUE
2443 /* Include Audio Gateway specific code. */
2444 #ifndef HSP2_AG_INCLUDED
2445 #define HSP2_AG_INCLUDED TRUE
2448 /* Include Headset Specific Code. */
2449 #ifndef HSP2_HS_INCLUDED
2450 #define HSP2_HS_INCLUDED TRUE
2453 /* Include the ability to open an SCO connection for In-Band Ringing. */
2454 #ifndef HSP2_IB_RING_INCLUDED
2455 #define HSP2_IB_RING_INCLUDED TRUE
2458 /* Include the ability to repeat a ring. */
2459 #ifndef HSP2_AG_REPEAT_RING
2460 #define HSP2_AG_REPEAT_RING TRUE
2463 #ifndef HSP2_APP_CLOSES_ON_CKPD
2464 #define HSP2_APP_CLOSES_ON_CKPD FALSE
2468 /* Include the ability to park a connection. */
2469 #ifndef HSP2_PARK_INCLUDED
2470 #define HSP2_PARK_INCLUDED TRUE
2473 /* Include HSP State Machine debug trace messages. */
2474 #ifndef HSP2_FSM_DEBUG
2475 #define HSP2_FSM_DEBUG TRUE
2478 /* The Module's Inquiry Scan Window. */
2479 #ifndef HSP2_INQ_SCAN_WINDOW
2480 #define HSP2_INQ_SCAN_WINDOW 0
2483 /* The Module's Inquiry Scan Interval. */
2484 #ifndef HSP2_INQ_SCAN_INTERVAL
2485 #define HSP2_INQ_SCAN_INTERVAL 0
2488 /* The Module's Page Scan Interval. */
2489 #ifndef HSP2_PAGE_SCAN_INTERVAL
2490 #define HSP2_PAGE_SCAN_INTERVAL 0
2493 /* The Module's Page Scan Window. */
2494 #ifndef HSP2_PAGE_SCAN_WINDOW
2495 #define HSP2_PAGE_SCAN_WINDOW 0
2498 /* The Park Mode's Minimum Beacon Period. */
2499 #ifndef HSP2_BEACON_MIN_PERIOD
2500 #define HSP2_BEACON_MIN_PERIOD 450
2503 /* The Park Mode's Maximum Beacon Period. */
2504 #ifndef HSP2_BEACON_MAX_PERIOD
2505 #define HSP2_BEACON_MAX_PERIOD 500
2508 /* The duration of the inquiry in seconds. */
2509 #ifndef HSP2_INQ_DURATION
2510 #define HSP2_INQ_DURATION 4
2513 /* Maximum number of peer responses during an inquiry. */
2514 #ifndef HSP2_INQ_MAX_NUM_RESPS
2515 #define HSP2_INQ_MAX_NUM_RESPS 3
2518 /* Maximum number of times to retry an inquiry prior to failure. */
2519 #ifndef HSP2_MAX_INQ_RETRY
2520 #define HSP2_MAX_INQ_RETRY 6
2523 /* Maximum number of times to retry an RFCOMM connection prior to failure. */
2524 #ifndef HSP2_MAX_CONN_RETRY
2525 #define HSP2_MAX_CONN_RETRY 3
2528 /* If the connect request failed for authentication reasons, do not retry */
2529 #ifndef HSP2_NO_RETRY_ON_AUTH_FAIL
2530 #define HSP2_NO_RETRY_ON_AUTH_FAIL TRUE
2533 /* Maximum number of characters in an HSP2 device name. */
2534 #ifndef HSP2_MAX_NAME_LEN
2535 #define HSP2_MAX_NAME_LEN 32
2538 /* The minimum speaker and/or microphone gain setting. */
2539 #ifndef HSP2_MIN_GAIN
2540 #define HSP2_MIN_GAIN 0
2543 /* The maximum speaker and/or microphone setting. */
2544 #ifndef HSP2_MAX_GAIN
2545 #define HSP2_MAX_GAIN 15
2548 /* The default value to send on an AT+CKPD. */
2549 #ifndef HSP2_KEYPRESS_DEFAULT
2550 #define HSP2_KEYPRESS_DEFAULT 200
2553 /* Maximum amount a data that can be received per RFCOMM frame. */
2554 #ifndef HSP2_MAX_RFC_READ_LEN
2555 #define HSP2_MAX_RFC_READ_LEN 128
2558 /* The time in seconds to wait for completion of a partial AT command or response from the peer. */
2559 #ifndef HSP2_AT_TO_INTERVAL
2560 #define HSP2_AT_TO_INTERVAL 30
2563 /* The time to wait before repeating a ring to a peer Headset. */
2564 #ifndef HSP2_REPEAT_RING_TO
2565 #define HSP2_REPEAT_RING_TO 4
2568 /* Time to wait for a response for an AT command */
2569 #ifndef HSP2_AT_RSP_TO
2570 #define HSP2_AT_RSP_TO 20
2573 /* SCO packet type(s) to use (bitmask: see spec), 0 - device default (recommended) */
2574 #ifndef HSP2_SCO_PKT_TYPES
2575 #define HSP2_SCO_PKT_TYPES ((UINT16)0x0000)
2578 /* The default settings of the SCO voice link. */
2579 #ifndef HSP2_DEFAULT_VOICE_SETTINGS
2580 #define HSP2_DEFAULT_VOICE_SETTINGS (HCI_INP_CODING_LINEAR | HCI_INP_DATA_FMT_2S_COMPLEMENT | HCI_INP_SAMPLE_SIZE_16BIT | HCI_AIR_CODING_FORMAT_CVSD)
2583 #ifndef HSP2_MAX_AT_CMD_LENGTH
2584 #define HSP2_MAX_AT_CMD_LENGTH 16
2587 #ifndef HSP2_MAX_AT_VAL_LENGTH
2588 #if (defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE)
2589 #define HSP2_MAX_AT_VAL_LENGTH 310
2591 #define HSP2_MAX_AT_VAL_LENGTH 5
2596 #ifndef HSP2_SDP_DB_SIZE
2597 #define HSP2_SDP_DB_SIZE 300
2601 /******************************************************************************
2605 ******************************************************************************/
2607 #ifndef HFP_INCLUDED
2608 #define HFP_INCLUDED FALSE
2611 /* Include Audio Gateway specific code. */
2612 #ifndef HFP_AG_INCLUDED
2613 #define HFP_AG_INCLUDED TRUE
2616 /* Include Hand Free Specific Code. */
2617 #ifndef HFP_HF_INCLUDED
2618 #define HFP_HF_INCLUDED TRUE
2621 /* Use AT interface instead of full blown API */
2622 #ifndef AT_INTERFACE
2623 #define AT_INTERFACE FALSE
2626 /* HFP Manages SCO establishement for various procedures */
2627 #ifndef HFP_SCO_MGMT_INCLUDED
2628 #define HFP_SCO_MGMT_INCLUDED TRUE
2631 /* CCAP compliant features and behavior desired */
2632 #ifndef CCAP_COMPLIANCE
2633 #define CCAP_COMPLIANCE TRUE
2636 /* Caller ID string, part of +CLIP result code */
2637 #ifndef HFP_MAX_CLIP_INFO
2638 #define HFP_MAX_CLIP_INFO 45
2641 #ifndef HFP_RPT_PEER_INFO_INCLUDED
2642 #define HFP_RPT_PEER_INFO_INCLUDED TRUE /* Reporting of peer features enabled */
2645 /******************************************************************************
2649 ******************************************************************************/
2651 /* HID Device Role Included */
2652 #ifndef HID_DEV_INCLUDED
2653 #define HID_DEV_INCLUDED FALSE
2656 #ifndef HID_DEV_PM_INCLUDED
2657 #define HID_DEV_PM_INCLUDED TRUE
2660 /* The HID Device is a virtual cable */
2661 #ifndef HID_DEV_VIRTUAL_CABLE
2662 #define HID_DEV_VIRTUAL_CABLE TRUE
2665 /* The HID device initiates the reconnections */
2666 #ifndef HID_DEV_RECONN_INITIATE
2667 #define HID_DEV_RECONN_INITIATE TRUE
2670 /* THe HID device is normally connectable */
2671 #ifndef HID_DEV_NORMALLY_CONN
2672 #define HID_DEV_NORMALLY_CONN FALSE
2675 /* The device is battery powered */
2676 #ifndef HID_DEV_BATTERY_POW
2677 #define HID_DEV_BATTERY_POW TRUE
2680 /* Device is capable of waking up the host */
2681 #ifndef HID_DEV_REMOTE_WAKE
2682 #define HID_DEV_REMOTE_WAKE TRUE
2685 /* Device needs host to close SDP channel after SDP is over */
2686 #ifndef HID_DEV_SDP_DISABLE
2687 #define HID_DEV_SDP_DISABLE TRUE
2690 #ifndef HID_DEV_MTU_SIZE
2691 #define HID_DEV_MTU_SIZE 64
2694 #ifndef HID_DEV_FLUSH_TO
2695 #define HID_DEV_FLUSH_TO 0xffff
2698 #ifndef HID_DEV_PAGE_SCAN_WIN
2699 #define HID_DEV_PAGE_SCAN_WIN (0)
2702 #ifndef HID_DEV_PAGE_SCAN_INT
2703 #define HID_DEV_PAGE_SCAN_INT (0)
2706 #ifndef HID_DEV_MAX_CONN_RETRY
2707 #define HID_DEV_MAX_CONN_RETRY (15)
2710 #ifndef HID_DEV_REPAGE_WIN
2711 #define HID_DEV_REPAGE_WIN (1)
2714 #ifndef HID_DEV_SVC_NAME
2715 #define HID_DEV_SVC_NAME "HID"
2718 #ifndef HID_DEV_SVC_DESCR
2719 #define HID_DEV_SVC_DESCR "3-button mouse and keyboard"
2722 #ifndef HID_DEV_PROVIDER_NAME
2723 #define HID_DEV_PROVIDER_NAME "Widcomm"
2726 #ifndef HID_DEV_REL_NUM
2727 #define HID_DEV_REL_NUM 0x0100
2730 #ifndef HID_DEV_PARSER_VER
2731 #define HID_DEV_PARSER_VER 0x0111
2734 #ifndef HID_DEV_SUBCLASS
2735 #define HID_DEV_SUBCLASS COD_MINOR_POINTING
2738 #ifndef HID_DEV_COUNTRY_CODE
2739 #define HID_DEV_COUNTRY_CODE 0x33
2742 #ifndef HID_DEV_SUP_TOUT
2743 #define HID_DEV_SUP_TOUT 0x8000
2746 #ifndef HID_DEV_NUM_LANGS
2747 #define HID_DEV_NUM_LANGS 1
2750 #ifndef HID_DEV_INACT_TIMEOUT
2751 #define HID_DEV_INACT_TIMEOUT 60
2754 #ifndef HID_DEV_BUSY_MODE_PARAMS
2755 #define HID_DEV_BUSY_MODE_PARAMS { 320, 160, 10, 20, HCI_MODE_ACTIVE }
2758 #ifndef HID_DEV_IDLE_MODE_PARAMS
2759 #define HID_DEV_IDLE_MODE_PARAMS { 320, 160, 10, 20, HCI_MODE_SNIFF }
2762 #ifndef HID_DEV_SUSP_MODE_PARAMS
2763 #define HID_DEV_SUSP_MODE_PARAMS { 640, 320, 0, 0, HCI_MODE_PARK }
2766 #ifndef HID_DEV_MAX_DESCRIPTOR_SIZE
2767 #define HID_DEV_MAX_DESCRIPTOR_SIZE 128 /* Max descriptor size */
2770 #ifndef HID_DEV_LANGUAGELIST
2771 #define HID_DEV_LANGUAGELIST {0x35, 0x06, 0x09, 0x04, 0x09, 0x09, 0x01, 0x00}
2774 #ifndef HID_DEV_LINK_SUPERVISION_TO
2775 #define HID_DEV_LINK_SUPERVISION_TO 0x8000
2778 #ifndef HID_CONTROL_POOL_ID
2779 #define HID_CONTROL_POOL_ID 2
2782 #ifndef HID_INTERRUPT_POOL_ID
2783 #define HID_INTERRUPT_POOL_ID 2
2786 /*************************************************************************
2787 ** Definitions for Both HID-Host & Device
2789 #ifndef HID_MAX_SVC_NAME_LEN
2790 #define HID_MAX_SVC_NAME_LEN 32
2793 #ifndef HID_MAX_SVC_DESCR_LEN
2794 #define HID_MAX_SVC_DESCR_LEN 32
2797 #ifndef HID_MAX_PROV_NAME_LEN
2798 #define HID_MAX_PROV_NAME_LEN 32
2801 /*************************************************************************
2802 ** Definitions for HID-Host
2804 #ifndef HID_HOST_INCLUDED
2805 #define HID_HOST_INCLUDED TRUE
2808 #ifndef HID_HOST_MAX_DEVICES
2809 #define HID_HOST_MAX_DEVICES 7
2812 #ifndef HID_HOST_MTU
2813 #define HID_HOST_MTU 640
2816 #ifndef HID_HOST_FLUSH_TO
2817 #define HID_HOST_FLUSH_TO 0xffff
2820 #ifndef HID_HOST_MAX_CONN_RETRY
2821 #define HID_HOST_MAX_CONN_RETRY (3)
2824 #ifndef HID_HOST_REPAGE_WIN
2825 #define HID_HOST_REPAGE_WIN (2)
2829 /******************************************************************************
2833 ******************************************************************************/
2835 #ifndef DUN_INCLUDED
2836 #define DUN_INCLUDED FALSE
2840 /******************************************************************************
2844 ******************************************************************************/
2846 #ifndef GOEP_INCLUDED
2847 #define GOEP_INCLUDED FALSE
2850 /* This is set to enable GOEP non-blocking file system access functions. */
2851 #ifndef GOEP_FS_INCLUDED
2852 #define GOEP_FS_INCLUDED FALSE
2855 /* GOEP authentication key size. */
2856 #ifndef GOEP_MAX_AUTH_KEY_SIZE
2857 #define GOEP_MAX_AUTH_KEY_SIZE 16
2860 /* Maximum size of the realm authentication string. */
2861 #ifndef GOEP_MAX_AUTH_REALM_SIZE
2862 #define GOEP_MAX_AUTH_REALM_SIZE 16
2865 /* Realm Character Set */
2866 #ifndef GOEP_REALM_CHARSET
2867 #define GOEP_REALM_CHARSET 0 /* ASCII */
2870 /* This is set to the maximum length of path name allowed in the system (_MAX_PATH). */
2871 #ifndef GOEP_MAX_PATH_SIZE
2872 #define GOEP_MAX_PATH_SIZE 255
2875 /* Specifies whether or not client's user id is required during obex authentication */
2876 #ifndef GOEP_SERVER_USERID_REQUIRED
2877 #define GOEP_SERVER_USERID_REQUIRED FALSE
2880 /* This is set to the maximum length of file name allowed in the system (_MAX_FNAME). */
2881 #ifndef GOEP_MAX_FILE_SIZE
2882 #define GOEP_MAX_FILE_SIZE 128
2885 /* Character used as path separator */
2886 #ifndef GOEP_PATH_SEPARATOR
2887 #define GOEP_PATH_SEPARATOR ((char) 0x5c) /* 0x2f ('/'), or 0x5c ('\') */
2890 /******************************************************************************
2894 ******************************************************************************/
2896 #ifndef OPP_INCLUDED
2897 #define OPP_INCLUDED FALSE
2900 /* This is set to enable OPP client capabilities. */
2901 #ifndef OPP_CLIENT_INCLUDED
2902 #define OPP_CLIENT_INCLUDED FALSE
2905 /* This is set to enable OPP server capabilities. */
2906 #ifndef OPP_SERVER_INCLUDED
2907 #define OPP_SERVER_INCLUDED FALSE
2910 /* if the optional formating functions are to be included or not */
2911 #ifndef OPP_FORMAT_INCLUDED
2912 #define OPP_FORMAT_INCLUDED FALSE
2915 /* Maximum number of client sessions allowed by server */
2916 #ifndef OPP_MAX_SRVR_SESS
2917 #define OPP_MAX_SRVR_SESS 3
2920 /******************************************************************************
2924 ******************************************************************************/
2926 #ifndef FTP_INCLUDED
2927 #define FTP_INCLUDED FALSE
2930 /* This is set to enable FTP client capabilities. */
2931 #ifndef FTP_CLIENT_INCLUDED
2932 #define FTP_CLIENT_INCLUDED TRUE
2935 /* This is set to enable FTP server capabilities. */
2936 #ifndef FTP_SERVER_INCLUDED
2937 #define FTP_SERVER_INCLUDED TRUE
2940 /******************************************************************************
2944 ******************************************************************************/
2946 #ifndef XML_STACK_SIZE
2947 #define XML_STACK_SIZE 7
2950 /******************************************************************************
2954 ******************************************************************************/
2956 #define BPP_DEBUG FALSE
2959 #ifndef BPP_INCLUDED
2960 #define BPP_INCLUDED FALSE
2963 #ifndef BPP_SND_INCLUDED
2964 #define BPP_SND_INCLUDED FALSE
2967 /* Maximum number of senders allowed to connect simultaneously
2968 ** The maximum is 6 or (OBX_NUM_SERVERS / 2), whichever is smaller
2970 #ifndef BPP_PR_MAX_CON
2971 #define BPP_PR_MAX_CON 3
2974 /* Service Name. maximum length: 248
2975 #ifndef BPP_SERVICE_NAME
2976 #define BPP_SERVICE_NAME "Basic Printing"
2979 /* Document Format Supported. ASCII comma-delimited list of MIME type:version string
2980 #ifndef BPP_DOC_FORMAT_SUPPORTED
2981 #define BPP_DOC_FORMAT_SUPPORTED "application/vnd.pwg-xhtml-print:1.0,application/vnd.hp-PCL:5E,application/PDF"
2984 #ifndef BPP_DOC_FORMAT_SUPPORTED_LEN
2985 #define BPP_DOC_FORMAT_SUPPORTED_LEN 77
2988 /* Character repertoires.
2989 #ifndef BPP_CHARACTER_REPERTOIRES
2990 #define BPP_CHARACTER_REPERTOIRES {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}
2994 #ifndef BPP_XHTML_PRINT_FORMATS
2995 #define BPP_XHTML_PRINT_FORMATS "image/gif:89A,image/jpeg"
2998 #ifndef BPP_XHTML_PRINT_FORMATS_LEN
2999 #define BPP_XHTML_PRINT_FORMATS_LEN 24
3003 #ifndef BPP_COLOR_SUPORTED
3004 #define BPP_COLOR_SUPORTED FALSE
3007 /* 1284 ID string. First 2 bytes are the length.
3009 #define BPP_1284ID "\x00\x48MANUFACTURER:ACME Manufacturing;COMMAND SET:PCL,MPL;MODEL:LaserBeam \?;"
3012 #ifndef BPP_1284ID_LEN
3013 #define BPP_1284ID_LEN 72
3017 #ifndef BPP_PRINTER_NAME
3018 #define BPP_PRINTER_NAME "My Printer"
3021 #ifndef BPP_PRINTER_NAME_LEN
3022 #define BPP_PRINTER_NAME_LEN 10
3026 /* Printer location.
3027 #ifndef BPP_PRINTER_LOCATION
3028 #define BPP_PRINTER_LOCATION "Hotel Lobby"
3031 #ifndef BPP_PRINTER_LOCATION_LEN
3032 #define BPP_PRINTER_LOCATION_LEN 11
3035 /* Duplex printing supported.
3036 #ifndef BPP_DUPLEX_SUPPORTED
3037 #define BPP_DUPLEX_SUPPORTED TRUE
3041 /* Media types supported.
3042 #ifndef BPP_MEDIA_TYPES_SUPPORTED
3043 #define BPP_MEDIA_TYPES_SUPPORTED "stationary,continuous-long,photographic-high-gloss,cardstock"
3046 #ifndef BPP_MEDIA_TYPES_SUPPORTED_LEN
3047 #define BPP_MEDIA_TYPES_SUPPORTED_LEN 60
3050 /* Maximum media with supported.
3051 #ifndef BPP_MAX_MEDIA_WIDTH
3052 #define BPP_MAX_MEDIA_WIDTH 205
3055 /* Maximum media length supported.
3056 #ifndef BPP_MAX_MEDIA_LENGTH
3057 #define BPP_MAX_MEDIA_LENGTH 285
3060 /* the maximum string len for the media size of medium loaded */
3061 #ifndef BPP_MEDIA_SIZE_LEN
3062 #define BPP_MEDIA_SIZE_LEN 33
3065 /* Debug Trace the SOAP object, if TRUE */
3066 #ifndef BPP_TRACE_XML
3067 #define BPP_TRACE_XML TRUE
3070 /* in case that the SOAP object does not all come in one OBEX packet,
3071 * this size of data may be kept in the BPP control block for continuing parsing.
3072 * The maximum is the size of the biggest GKI buffer (GKI_MAX_BUF_SIZE) */
3073 #ifndef BPP_SOAP_KEEP_SIZE
3074 #define BPP_SOAP_KEEP_SIZE 200
3078 /******************************************************************************
3082 ******************************************************************************/
3083 #ifndef BIP_INCLUDED
3084 #define BIP_INCLUDED FALSE
3087 /* TRUE to include imaging initiator */
3088 #ifndef BIP_INITR_INCLUDED
3089 #define BIP_INITR_INCLUDED FALSE
3092 /* TRUE to include imaging responder */
3093 #ifndef BIP_RSPDR_INCLUDED
3094 #define BIP_RSPDR_INCLUDED FALSE
3097 /* TRUE to include image push feature */
3098 #ifndef BIP_PUSH_INCLUDED
3099 #define BIP_PUSH_INCLUDED TRUE
3102 /* TRUE to include image pull feature */
3103 #ifndef BIP_PULL_INCLUDED
3104 #define BIP_PULL_INCLUDED TRUE
3107 /* TRUE to include advanced image printing feature */
3108 #ifndef BIP_PRINTING_INCLUDED
3109 #define BIP_PRINTING_INCLUDED TRUE
3112 /* TRUE to include automatic archive feature */
3113 #ifndef BIP_ARCHIVE_INCLUDED
3114 #define BIP_ARCHIVE_INCLUDED TRUE
3117 /* TRUE to include remote camera feature */
3118 #ifndef BIP_CAMERA_INCLUDED
3119 #define BIP_CAMERA_INCLUDED TRUE
3122 /* TRUE to include remote display feature */
3123 #ifndef BIP_DISPLAY_INCLUDED
3124 #define BIP_DISPLAY_INCLUDED TRUE
3127 /* TRUE to include sanity check code for API functions */
3128 #ifndef BIP_SANITY_CHECKS
3129 #define BIP_SANITY_CHECKS TRUE
3132 /* TRUE to show the received XML object in trace for conformance tests */
3133 #ifndef BIP_TRACE_XML
3134 #define BIP_TRACE_XML TRUE
3137 /* in case that the received XML object is not complete, the XML parser state machine needs
3138 * to keep a copy of the data from the last '<'
3139 * This macro specifies the maximun amount of data for this purpose */
3140 #ifndef BIP_XML_CARRY_OVER_LEN
3141 #define BIP_XML_CARRY_OVER_LEN 100
3144 /* minimum 4, maximum is 255. The value should be set to the maximum size of encoding string + 1. JPEG2000.
3145 * If vendor specific format is supported, it might be bigger than 9 */
3146 #ifndef BIP_IMG_ENCODE_SIZE
3147 #define BIP_IMG_ENCODE_SIZE 9
3150 /* MIME type: text/plain */
3151 #ifndef BIP_TYPE_SIZE
3152 #define BIP_TYPE_SIZE 20
3155 /* example: iso-8895-1 */
3156 #ifndef BIP_CHARSET_SIZE
3157 #define BIP_CHARSET_SIZE 10
3161 #ifndef BIP_FNAME_SIZE
3162 #define BIP_FNAME_SIZE 20
3166 #ifndef BIP_SNAME_SIZE
3167 #define BIP_SNAME_SIZE 60
3170 /* temporary storage file name(for file system access, may include path) */
3171 #ifndef BIP_TEMP_NAME_SIZE
3172 #define BIP_TEMP_NAME_SIZE 200
3175 /* image file name */
3176 #ifndef BIP_IMG_NAME_SIZE
3177 #define BIP_IMG_NAME_SIZE 200
3180 /* attachment file name */
3181 #ifndef BIP_ATT_NAME_SIZE
3182 #define BIP_ATT_NAME_SIZE 200
3185 /* object (image, attachment, thumbnail) file name (may be used for file system) */
3186 #ifndef BIP_OBJ_NAME_SIZE
3187 #define BIP_OBJ_NAME_SIZE 200
3192 /******************************************************************************
3196 ******************************************************************************/
3198 #ifndef HCRP_INCLUDED
3199 #define HCRP_INCLUDED FALSE
3202 /* This is set to enable server. */
3203 #ifndef HCRP_SERVER_INCLUDED
3204 #define HCRP_SERVER_INCLUDED FALSE
3207 /* This is set to enable client. */
3208 #ifndef HCRP_CLIENT_INCLUDED
3209 #define HCRP_CLIENT_INCLUDED FALSE
3212 /* TRUE enables the notification option of the profile. */
3213 #ifndef HCRP_NOTIFICATION_INCLUDED
3214 #define HCRP_NOTIFICATION_INCLUDED TRUE
3217 /* TRUE enables the vendor specific option of the profile. */
3218 #ifndef HCRP_VENDOR_SPEC_INCLUDED
3219 #define HCRP_VENDOR_SPEC_INCLUDED TRUE
3222 /* TRUE enables state machine traces. */
3223 #ifndef HCRP_FSM_DEBUG
3224 #define HCRP_FSM_DEBUG FALSE
3227 /* TRUE enables protocol message traces. */
3228 #ifndef HCRP_PROTO_DEBUG
3229 #define HCRP_PROTO_DEBUG FALSE
3232 /* Maximum length used to store the service name (Minimum 1). */
3233 #ifndef HCRP_MAX_SERVICE_NAME_LEN
3234 #define HCRP_MAX_SERVICE_NAME_LEN 32
3237 /* Maximum length used to store the device name (Minimum 1). */
3238 #ifndef HCRP_MAX_DEVICE_NAME_LEN
3239 #define HCRP_MAX_DEVICE_NAME_LEN 32
3242 /* Maximum length of device location (Minimum 1) */
3243 #ifndef HCRP_MAX_DEVICE_LOC_LEN
3244 #define HCRP_MAX_DEVICE_LOC_LEN 32
3247 /* Maximum length used to store the friendly name (Minimum 1). */
3248 #ifndef HCRP_MAX_FRIENDLY_NAME_LEN
3249 #define HCRP_MAX_FRIENDLY_NAME_LEN 32
3252 /* Maximum length used to store the 1284 id string (Minimum 2 byte length field). */
3253 #ifndef HCRP_MAX_SDP_1284_ID_LEN
3254 #define HCRP_MAX_SDP_1284_ID_LEN 128
3257 /* Maximum length for parameters to be processed for vendor specific commands. */
3258 #ifndef HCRP_MAX_VEND_SPEC_LEN
3259 #define HCRP_MAX_VEND_SPEC_LEN 4
3262 /* Number of seconds to wait for 2nd GAP to open. */
3263 #ifndef HCRP_OPEN_CHAN_TOUT
3264 #define HCRP_OPEN_CHAN_TOUT 5
3267 /* Number of seconds to wait for 2nd GAP to close. */
3268 #ifndef HCRP_CLOSE_CHAN_TOUT
3269 #define HCRP_CLOSE_CHAN_TOUT 3
3272 /* Number of seconds to wait for the application to respond to a protocol request. */
3273 #ifndef HCRP_APPL_RSP_TOUT
3274 #define HCRP_APPL_RSP_TOUT 5
3277 /* Number of seconds to wait for the peer device to respond to a protocol request. */
3278 #ifndef HCRP_CMD_RSP_TOUT
3279 #define HCRP_CMD_RSP_TOUT 7
3282 /* Number of seconds between subsequent credit requests to the server when the send watermark has been exceeded. */
3283 #ifndef HCRP_CREDIT_REQ_UPDATES
3284 #define HCRP_CREDIT_REQ_UPDATES 1
3287 /* Maximum number of results to return in a HCRP_FindServices search. */
3288 #ifndef HCRP_MAX_SEARCH_RESULTS
3289 #define HCRP_MAX_SEARCH_RESULTS 1
3292 /* Maximum number of bytes to be reserved for searching for the client's notification record. */
3293 #ifndef HCRP_MAX_NOTIF_DISC_BUF
3294 #define HCRP_MAX_NOTIF_DISC_BUF 300
3297 /* Maximum number of clients the server will allow to be registered for notifications. */
3298 #ifndef HCRP_MAX_NOTIF_CLIENTS
3299 #define HCRP_MAX_NOTIF_CLIENTS 3
3302 /* Spec says minimum of two notification retries. */
3303 #ifndef HCRP_NOTIF_NUM_RETRIES
3304 #define HCRP_NOTIF_NUM_RETRIES 4
3307 /*************************************************************************
3308 ** Definitions for Multi-Client Server HCRP
3309 ** Note: Many of the above HCRP definitions are also used
3310 ** Maximum number of clients allowed to connect simultaneously
3311 ** Must be less than ((GAP_MAX_CONNECTIONS - 1) / 2)
3313 #ifndef HCRPM_MAX_CLIENTS
3314 #define HCRPM_MAX_CLIENTS 3
3318 /******************************************************************************
3322 ******************************************************************************/
3324 #ifndef PAN_INCLUDED
3325 #define PAN_INCLUDED FALSE
3329 /******************************************************************************
3333 ******************************************************************************/
3335 #ifndef SAP_SERVER_INCLUDED
3336 #define SAP_SERVER_INCLUDED FALSE
3339 /*************************************************************************
3342 #ifndef A2D_INCLUDED
3343 #define A2D_INCLUDED TRUE
3346 /* TRUE to include SBC utility functions */
3347 #ifndef A2D_SBC_INCLUDED
3348 #define A2D_SBC_INCLUDED A2D_INCLUDED
3351 /* TRUE to include MPEG-1,2 (mp3) utility functions */
3352 #ifndef A2D_M12_INCLUDED
3353 #define A2D_M12_INCLUDED A2D_INCLUDED
3356 /* TRUE to include MPEG-2,4 (aac) utility functions */
3357 #ifndef A2D_M24_INCLUDED
3358 #define A2D_M24_INCLUDED A2D_INCLUDED
3361 /******************************************************************************
3365 ******************************************************************************/
3367 #ifndef AVCT_INCLUDED
3368 #define AVCT_INCLUDED TRUE
3371 /* Number of simultaneous ACL links to different peer devices. */
3372 #ifndef AVCT_NUM_LINKS
3373 #define AVCT_NUM_LINKS 2
3376 /* Number of simultaneous AVCTP connections. */
3377 #ifndef AVCT_NUM_CONN
3378 #define AVCT_NUM_CONN 3
3381 /* Pool ID where to reassemble the SDU.
3382 This Pool allows buffers to be used that are larger than
3383 the L2CAP_MAX_MTU. */
3384 #ifndef AVCT_BR_USER_RX_POOL_ID
3385 #define AVCT_BR_USER_RX_POOL_ID HCI_ACL_POOL_ID
3388 /* Pool ID where to hold the SDU.
3389 This Pool allows buffers to be used that are larger than
3390 the L2CAP_MAX_MTU. */
3391 #ifndef AVCT_BR_USER_TX_POOL_ID
3392 #define AVCT_BR_USER_TX_POOL_ID HCI_ACL_POOL_ID
3396 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
3398 #ifndef AVCT_BR_FCR_RX_POOL_ID
3399 #define AVCT_BR_FCR_RX_POOL_ID HCI_ACL_POOL_ID
3403 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
3404 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
3405 Note: This pool needs to have enough buffers to hold two times the window size negotiated
3406 in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions.
3407 The size of each buffer must be able to hold the maximum MPS segment size passed in
3408 tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
3410 #ifndef AVCT_BR_FCR_TX_POOL_ID
3411 #define AVCT_BR_FCR_TX_POOL_ID HCI_ACL_POOL_ID
3414 /* AVCTP Browsing channel FCR Option:
3415 Size of the transmission window when using enhanced retransmission mode. Not used
3416 in basic and streaming modes. Range: 1 - 63
3418 #ifndef AVCT_BR_FCR_OPT_TX_WINDOW_SIZE
3419 #define AVCT_BR_FCR_OPT_TX_WINDOW_SIZE 10
3422 /* AVCTP Browsing channel FCR Option:
3423 Number of transmission attempts for a single I-Frame before taking
3424 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
3427 0 - infinite retransmissions
3428 1 - single transmission
3430 #ifndef AVCT_BR_FCR_OPT_MAX_TX_B4_DISCNT
3431 #define AVCT_BR_FCR_OPT_MAX_TX_B4_DISCNT 20
3434 /* AVCTP Browsing channel FCR Option: Retransmission Timeout
3435 The AVRCP specification set a value in the range of 300 - 2000 ms
3436 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
3437 Range: Minimum 2000 (2 secs) when supporting PBF.
3439 #ifndef AVCT_BR_FCR_OPT_RETX_TOUT
3440 #define AVCT_BR_FCR_OPT_RETX_TOUT 2000
3443 /* AVCTP Browsing channel FCR Option: Monitor Timeout
3444 The AVRCP specification set a value in the range of 300 - 2000 ms
3445 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
3446 Range: Minimum 12000 (12 secs) when supporting PBF.
3448 #ifndef AVCT_BR_FCR_OPT_MONITOR_TOUT
3449 #define AVCT_BR_FCR_OPT_MONITOR_TOUT 12000
3452 /******************************************************************************
3456 ******************************************************************************/
3458 #ifndef AVRC_INCLUDED
3459 #define AVRC_INCLUDED TRUE
3462 #ifndef AVRC_METADATA_INCLUDED
3463 #define AVRC_METADATA_INCLUDED TRUE
3466 #ifndef AVRC_ADV_CTRL_INCLUDED
3467 #define AVRC_ADV_CTRL_INCLUDED TRUE
3470 #ifndef AVRC_CTLR_INCLUDED
3471 #define AVRC_CTLR_INCLUDED TRUE
3474 /******************************************************************************
3478 ******************************************************************************/
3479 #ifndef MCA_INCLUDED
3480 #define MCA_INCLUDED FALSE
3483 /* TRUE to support Clock Synchronization OpCodes */
3484 #ifndef MCA_SYNC_INCLUDED
3485 #define MCA_SYNC_INCLUDED FALSE
3488 /* The MTU size for the L2CAP configuration on control channel. 48 is the minimal */
3489 #ifndef MCA_CTRL_MTU
3490 #define MCA_CTRL_MTU 60
3493 /* The maximum number of registered MCAP instances. */
3494 #ifndef MCA_NUM_REGS
3495 #define MCA_NUM_REGS 12
3498 /* The maximum number of control channels (to difference devices) per registered MCAP instances. */
3499 #ifndef MCA_NUM_LINKS
3500 #define MCA_NUM_LINKS 3
3503 /* The maximum number of MDEP (including HDP echo) per registered MCAP instances. */
3504 #ifndef MCA_NUM_DEPS
3505 #define MCA_NUM_DEPS 13
3508 /* The maximum number of MDL link per control channel. */
3509 #ifndef MCA_NUM_MDLS
3510 #define MCA_NUM_MDLS 4
3513 /* Pool ID where to reassemble the SDU. */
3514 #ifndef MCA_USER_RX_POOL_ID
3515 #define MCA_USER_RX_POOL_ID HCI_ACL_POOL_ID
3518 /* Pool ID where to hold the SDU. */
3519 #ifndef MCA_USER_TX_POOL_ID
3520 #define MCA_USER_TX_POOL_ID HCI_ACL_POOL_ID
3524 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
3526 #ifndef MCA_FCR_RX_POOL_ID
3527 #define MCA_FCR_RX_POOL_ID HCI_ACL_POOL_ID
3531 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
3532 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
3533 Note: This pool needs to have enough buffers to hold two times the window size negotiated
3534 in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions.
3535 The size of each buffer must be able to hold the maximum MPS segment size passed in
3536 tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
3538 #ifndef MCA_FCR_TX_POOL_ID
3539 #define MCA_FCR_TX_POOL_ID HCI_ACL_POOL_ID
3542 /* MCAP control channel FCR Option:
3543 Size of the transmission window when using enhanced retransmission mode.
3544 1 is defined by HDP specification for control channel.
3546 #ifndef MCA_FCR_OPT_TX_WINDOW_SIZE
3547 #define MCA_FCR_OPT_TX_WINDOW_SIZE 1
3550 /* MCAP control channel FCR Option:
3551 Number of transmission attempts for a single I-Frame before taking
3552 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
3555 0 - infinite retransmissions
3556 1 - single transmission
3558 #ifndef MCA_FCR_OPT_MAX_TX_B4_DISCNT
3559 #define MCA_FCR_OPT_MAX_TX_B4_DISCNT 20
3562 /* MCAP control channel FCR Option: Retransmission Timeout
3563 The AVRCP specification set a value in the range of 300 - 2000 ms
3564 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
3565 Range: Minimum 2000 (2 secs) when supporting PBF.
3567 #ifndef MCA_FCR_OPT_RETX_TOUT
3568 #define MCA_FCR_OPT_RETX_TOUT 2000
3571 /* MCAP control channel FCR Option: Monitor Timeout
3572 The AVRCP specification set a value in the range of 300 - 2000 ms
3573 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
3574 Range: Minimum 12000 (12 secs) when supporting PBF.
3576 #ifndef MCA_FCR_OPT_MONITOR_TOUT
3577 #define MCA_FCR_OPT_MONITOR_TOUT 12000
3580 /* MCAP control channel FCR Option: Maximum PDU payload size.
3581 The maximum number of payload octets that the local device can receive in a single PDU.
3583 #ifndef MCA_FCR_OPT_MPS_SIZE
3584 #define MCA_FCR_OPT_MPS_SIZE 1000
3587 /* Shared transport */
3588 #ifndef NFC_SHARED_TRANSPORT_ENABLED
3589 #define NFC_SHARED_TRANSPORT_ENABLED FALSE
3592 /******************************************************************************
3596 ******************************************************************************/
3598 #ifndef SER_INCLUDED
3599 #define SER_INCLUDED FALSE
3602 /* Task which runs the serial application. */
3604 #define SER_TASK BTE_APPL_TASK
3607 /* Mailbox used by serial application. */
3609 #define SER_MBOX TASK_MBOX_1
3613 #ifndef SER_MBOX_MASK
3614 #define SER_MBOX_MASK TASK_MBOX_1_EVT_MASK
3617 /* TX path application event. */
3618 #ifndef SER_TX_PATH_APPL_EVT
3619 #define SER_TX_PATH_APPL_EVT EVENT_MASK(APPL_EVT_3)
3622 /* RX path application event. */
3623 #ifndef SER_RX_PATH_APPL_EVT
3624 #define SER_RX_PATH_APPL_EVT EVENT_MASK(APPL_EVT_4)
3627 /******************************************************************************
3629 ** Sleep Mode (Low Power Mode)
3631 ******************************************************************************/
3633 #ifndef HCILP_INCLUDED
3634 #define HCILP_INCLUDED TRUE
3637 /******************************************************************************
3639 ** SAP - Sample applications
3641 ******************************************************************************/
3643 #ifndef MMI_INCLUDED
3644 #define MMI_INCLUDED FALSE
3647 /******************************************************************************
3649 ** APPL - Application Task
3651 ******************************************************************************/
3652 /* When TRUE indicates that an application task is to be run */
3653 #ifndef APPL_INCLUDED
3654 #define APPL_INCLUDED TRUE
3657 /* When TRUE remote terminal code included (RPC MUST be included) */
3658 #ifndef RSI_INCLUDED
3659 #define RSI_INCLUDED TRUE
3664 #define L2CAP_FEATURE_REQ_ID 73
3665 #define L2CAP_FEATURE_RSP_ID 173
3668 /******************************************************************************
3672 ******************************************************************************/
3673 /* BTA EIR canned UUID list (default is dynamic) */
3674 #ifndef BTA_EIR_CANNED_UUID_LIST
3675 #define BTA_EIR_CANNED_UUID_LIST FALSE
3678 /* Number of supported customer UUID in EIR */
3679 #ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID
3680 #define BTA_EIR_SERVER_NUM_CUSTOM_UUID 8
3683 /* CHLD override for bluedroid */
3684 #ifndef BTA_AG_CHLD_VAL_ECC
3685 #define BTA_AG_CHLD_VAL_ECC "(0,1,1x,2,2x,3)"
3688 #ifndef BTA_AG_CHLD_VAL
3689 #define BTA_AG_CHLD_VAL "(0,1,2,3)"
3692 /* Set the CIND to match HFP 1.5 */
3693 #ifndef BTA_AG_CIND_INFO
3694 #define BTA_AG_CIND_INFO "(\"call\",(0,1)),(\"callsetup\",(0-3)),(\"service\",(0-1)),(\"signal\",(0-5)),(\"roam\",(0,1)),(\"battchg\",(0-5)),(\"callheld\",(0-2))"
3697 #ifndef BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY
3698 #define BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY TRUE
3701 /******************************************************************************
3705 ******************************************************************************/
3706 #ifndef BTE_PLATFORM_IDLE
3707 #define BTE_PLATFORM_IDLE
3710 #ifndef BTE_IDLE_TASK_INCLUDED
3711 #define BTE_IDLE_TASK_INCLUDED FALSE
3714 #ifndef BTE_PLATFORM_INITHW
3715 #define BTE_PLATFORM_INITHW
3718 #ifndef BTE_BTA_CODE_INCLUDED
3719 #define BTE_BTA_CODE_INCLUDED FALSE
3722 /******************************************************************************
3726 ******************************************************************************/
3727 /* Whether to parse and display traces-> Platform specific implementation */
3729 #define BTTRC_DISP BTTRC_DispOnInsight
3732 /******************************************************************************
3734 ** Tracing: Include trace header file here.
3736 ******************************************************************************/
3738 #include "bt_trace.h"
3740 #endif /* BT_TARGET_H */