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 #ifndef BTA_SYS_TIMER_PERIOD
195 #define BTA_SYS_TIMER_PERIOD 100
198 #ifndef GKI_SHUTDOWN_EVT
199 #define GKI_SHUTDOWN_EVT APPL_EVT_7
202 #ifndef GKI_PTHREAD_JOINABLE
203 #define GKI_PTHREAD_JOINABLE TRUE
206 #ifndef LINUX_DRV_INCLUDED
207 #define LINUX_DRV_INCLUDED TRUE
211 #define LINUX_OS TRUE
214 #ifndef BTM_APP_DEV_INIT
215 #define BTM_APP_DEV_INIT bte_main_post_reset_init
218 #ifndef SBC_FOR_EMBEDDED_LINUX
219 #define SBC_FOR_EMBEDDED_LINUX TRUE
222 #ifndef BTA_DM_REMOTE_DEVICE_NAME_LENGTH
223 #define BTA_DM_REMOTE_DEVICE_NAME_LENGTH 248
227 #define AVDT_VERSION 0x0102
230 #ifndef BTA_AG_AT_MAX_LEN
231 #define BTA_AG_AT_MAX_LEN 512
234 #ifndef BTA_AVRCP_FF_RW_SUPPORT
235 #define BTA_AVRCP_FF_RW_SUPPORT TRUE
238 #ifndef BTA_AG_SCO_PKT_TYPES
239 #define BTA_AG_SCO_PKT_TYPES (BTM_SCO_LINK_ONLY_MASK | BTM_SCO_PKT_TYPES_MASK_EV3 | BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 | BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 | BTM_SCO_PKT_TYPES_MASK_NO_3_EV5)
242 #ifndef BTA_AV_RET_TOUT
243 #define BTA_AV_RET_TOUT 15
246 #ifndef PORCHE_PAIRING_CONFLICT
247 #define PORCHE_PAIRING_CONFLICT TRUE
250 #ifndef BTA_AV_CO_CP_SCMS_T
251 #define BTA_AV_CO_CP_SCMS_T FALSE
254 #ifndef AVDT_CONNECT_CP_ONLY
255 #define AVDT_CONNECT_CP_ONLY FALSE
258 /* This feature is used to eanble interleaved scan*/
259 #ifndef BTA_HOST_INTERLEAVE_SEARCH
260 #define BTA_HOST_INTERLEAVE_SEARCH FALSE
263 #ifndef BT_TRACE_PROTOCOL
264 #define BT_TRACE_PROTOCOL TRUE
267 #ifndef BT_USE_TRACES
268 #define BT_USE_TRACES TRUE
271 #ifndef BT_TRACE_BTIF
272 #define BT_TRACE_BTIF TRUE
275 #ifndef BTTRC_INCLUDED
276 #define BTTRC_INCLUDED FALSE
279 #ifndef BT_TRACE_VERBOSE
280 #define BT_TRACE_VERBOSE FALSE
283 #ifndef BTTRC_PARSER_INCLUDED
284 #define BTTRC_PARSER_INCLUDED FALSE
287 #ifndef MAX_TRACE_RAM_SIZE
288 #define MAX_TRACE_RAM_SIZE 10000
291 #ifndef OBX_INITIAL_TRACE_LEVEL
292 #define OBX_INITIAL_TRACE_LEVEL BT_TRACE_LEVEL_ERROR
295 #ifndef PBAP_ZERO_VCARD_IN_DB
296 #define PBAP_ZERO_VCARD_IN_DB FALSE
299 #ifndef BTA_DM_SDP_DB_SIZE
300 #define BTA_DM_SDP_DB_SIZE 8000
304 #define HL_INCLUDED TRUE
307 #ifndef AG_VOICE_SETTINGS
308 #define AG_VOICE_SETTINGS HCI_DEFAULT_VOICE_SETTINGS
311 #ifndef BTIF_DM_OOB_TEST
312 #define BTIF_DM_OOB_TEST TRUE
315 // How long to wait before activating sniff mode after entering the
316 // idle state for FTS, OPS connections
317 #ifndef BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS
318 #define BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS 7000
321 //------------------End added from bdroid_buildcfg.h---------------------
325 /******************************************************************************
329 ******************************************************************************/
331 /* API macros for simulator */
335 #ifndef BTE_BSE_WRAPPER
338 #define BTAPI __declspec(dllexport)
343 #define BTU_API BTAPI
344 #define A2D_API BTAPI
345 #define VDP_API BTAPI
346 #define AVDT_API BTAPI
347 #define AVCT_API BTAPI
348 #define AVRC_API BTAPI
349 #define BIP_API BTAPI
350 #define BNEP_API BTAPI
351 #define BPP_API BTAPI
352 #define BTM_API BTAPI
353 #define CTP_API BTAPI
354 #define DUN_API BTAPI
355 #define FTP_API BTAPI
356 #define GAP_API BTAPI
357 #define GOEP_API BTAPI
358 #define HCI_API BTAPI
359 #define HCRP_API BTAPI
360 #define HID_API BTAPI
361 #define HFP_API BTAPI
362 #define HSP2_API BTAPI
363 #define ICP_API BTAPI
364 #define L2C_API BTAPI
365 #define OBX_API BTAPI
366 #define OPP_API BTAPI
367 #define PAN_API BTAPI
368 #define RFC_API BTAPI
369 #define RPC_API BTAPI
370 #define SDP_API BTAPI
371 #define SPP_API BTAPI
372 #define TCS_API BTAPI
373 #define XML_API BTAPI
374 #define BTA_API BTAPI
375 #define SBC_API BTAPI
376 #define MCE_API BTAPI
377 #define MCA_API BTAPI
378 #define GATT_API BTAPI
379 #define SMP_API BTAPI
382 /******************************************************************************
386 ******************************************************************************/
388 /* Receives HCI events from the lower-layer. */
389 #ifndef HCI_CMD_POOL_ID
390 #define HCI_CMD_POOL_ID GKI_POOL_ID_2
393 #ifndef HCI_CMD_POOL_BUF_SIZE
394 #define HCI_CMD_POOL_BUF_SIZE GKI_BUF2_SIZE
397 /* Receives ACL data packets from thelower-layer. */
398 #ifndef HCI_ACL_POOL_ID
399 #define HCI_ACL_POOL_ID GKI_POOL_ID_3
402 #ifndef HCI_ACL_POOL_BUF_SIZE
403 #define HCI_ACL_POOL_BUF_SIZE GKI_BUF3_SIZE
406 /* Maximum number of buffers available for ACL receive data. */
407 #ifndef HCI_ACL_BUF_MAX
408 #define HCI_ACL_BUF_MAX GKI_BUF3_MAX
411 /* Receives SCO data packets from the lower-layer. */
412 #ifndef HCI_SCO_POOL_ID
413 #define HCI_SCO_POOL_ID GKI_POOL_ID_6
417 #ifndef HCI_DATA_DESCR_POOL_ID
418 #define HCI_DATA_DESCR_POOL_ID GKI_POOL_ID_0
421 /* Sends SDP data packets. */
423 #define SDP_POOL_ID 3
426 /* Sends RFCOMM command packets. */
427 #ifndef RFCOMM_CMD_POOL_ID
428 #define RFCOMM_CMD_POOL_ID GKI_POOL_ID_2
431 #ifndef RFCOMM_CMD_POOL_BUF_SIZE
432 #define RFCOMM_CMD_POOL_BUF_SIZE GKI_BUF2_SIZE
435 /* Sends RFCOMM data packets. */
436 #ifndef RFCOMM_DATA_POOL_ID
437 #define RFCOMM_DATA_POOL_ID GKI_POOL_ID_3
440 #ifndef RFCOMM_DATA_POOL_BUF_SIZE
441 #define RFCOMM_DATA_POOL_BUF_SIZE GKI_BUF3_SIZE
444 /* Sends L2CAP packets to the peer and HCI messages to the controller. */
445 #ifndef L2CAP_CMD_POOL_ID
446 #define L2CAP_CMD_POOL_ID GKI_POOL_ID_2
449 /* Sends L2CAP segmented packets in ERTM mode */
450 #ifndef L2CAP_FCR_TX_POOL_ID
451 #define L2CAP_FCR_TX_POOL_ID HCI_ACL_POOL_ID
454 /* Receives L2CAP segmented packets in ERTM mode */
455 #ifndef L2CAP_FCR_RX_POOL_ID
456 #define L2CAP_FCR_RX_POOL_ID HCI_ACL_POOL_ID
459 /* Number of ACL buffers to assign to LE
460 if the HCI buffer pool is shared with BR/EDR */
461 #ifndef L2C_DEF_NUM_BLE_BUF_SHARED
462 #define L2C_DEF_NUM_BLE_BUF_SHARED 1
465 /* Used by BTM when it sends HCI commands to the controller. */
466 #ifndef BTM_CMD_POOL_ID
467 #define BTM_CMD_POOL_ID GKI_POOL_ID_2
470 #ifndef OBX_CMD_POOL_SIZE
471 #define OBX_CMD_POOL_SIZE GKI_BUF2_SIZE
474 #ifndef OBX_LRG_DATA_POOL_SIZE
475 #define OBX_LRG_DATA_POOL_SIZE GKI_BUF4_SIZE
478 #ifndef OBX_LRG_DATA_POOL_ID
479 #define OBX_LRG_DATA_POOL_ID GKI_POOL_ID_4
482 /* Used for CTP discovery database. */
483 #ifndef CTP_SDP_DB_POOL_ID
484 #define CTP_SDP_DB_POOL_ID GKI_POOL_ID_3
487 /* Used to send data to L2CAP. */
488 #ifndef GAP_DATA_POOL_ID
489 #define GAP_DATA_POOL_ID GKI_POOL_ID_3
492 /* Used for SPP inquiry and discovery databases. */
493 #ifndef SPP_DB_POOL_ID
494 #define SPP_DB_POOL_ID GKI_POOL_ID_3
498 #define SPP_DB_SIZE GKI_BUF3_SIZE
501 /* BNEP data and protocol messages. */
503 #define BNEP_POOL_ID GKI_POOL_ID_3
506 /* RPC pool for temporary trace message buffers. */
507 #ifndef RPC_SCRATCH_POOL_ID
508 #define RPC_SCRATCH_POOL_ID GKI_POOL_ID_2
511 /* RPC scratch buffer size (not related to RPC_SCRATCH_POOL_ID) */
512 #ifndef RPC_SCRATCH_BUF_SIZE
513 #define RPC_SCRATCH_BUF_SIZE GKI_BUF3_SIZE
516 /* RPC pool for protocol messages */
517 #ifndef RPC_MSG_POOL_ID
518 #define RPC_MSG_POOL_ID GKI_POOL_ID_3
521 #ifndef RPC_MSG_POOL_SIZE
522 #define RPC_MSG_POOL_SIZE GKI_BUF3_SIZE
525 /* AVDTP pool for protocol messages */
526 #ifndef AVDT_CMD_POOL_ID
527 #define AVDT_CMD_POOL_ID GKI_POOL_ID_2
530 /* AVDTP pool size for media packets in case of fragmentation */
531 #ifndef AVDT_DATA_POOL_SIZE
532 #define AVDT_DATA_POOL_SIZE GKI_BUF3_SIZE
536 #define PAN_POOL_ID GKI_POOL_ID_3
537 /* Maximum amount of the shared buffer to allocate for PAN */
538 #define PAN_POOL_MAX (GKI_BUF3_MAX / 4)
541 /* UNV pool for read/write serialization */
542 #ifndef UNV_MSG_POOL_ID
543 #define UNV_MSG_POOL_ID GKI_POOL_ID_2
546 #ifndef UNV_MSG_POOL_SIZE
547 #define UNV_MSG_POOL_SIZE GKI_BUF2_SIZE
550 /* AVCTP pool for protocol messages */
551 #ifndef AVCT_CMD_POOL_ID
552 #define AVCT_CMD_POOL_ID GKI_POOL_ID_1
555 #ifndef AVCT_META_CMD_POOL_ID
556 #define AVCT_META_CMD_POOL_ID GKI_POOL_ID_2
559 /* AVRCP pool for protocol messages */
560 #ifndef AVRC_CMD_POOL_ID
561 #define AVRC_CMD_POOL_ID GKI_POOL_ID_1
564 /* AVRCP pool size for protocol messages */
565 #ifndef AVRC_CMD_POOL_SIZE
566 #define AVRC_CMD_POOL_SIZE GKI_BUF1_SIZE
569 /* AVRCP Metadata pool for protocol messages */
570 #ifndef AVRC_META_CMD_POOL_ID
571 #define AVRC_META_CMD_POOL_ID GKI_POOL_ID_2
574 /* AVRCP Metadata pool size for protocol messages */
575 #ifndef AVRC_META_CMD_POOL_SIZE
576 #define AVRC_META_CMD_POOL_SIZE GKI_BUF2_SIZE
580 /* AVRCP buffer size for browsing channel messages */
581 #ifndef AVRC_BROWSE_POOL_SIZE
582 #define AVRC_BROWSE_POOL_SIZE GKI_MAX_BUF_SIZE
585 /* HDP buffer size for the Pulse Oximeter */
586 #ifndef BTA_HL_LRG_DATA_POOL_SIZE
587 #define BTA_HL_LRG_DATA_POOL_SIZE GKI_BUF7_SIZE
590 #ifndef BTA_HL_LRG_DATA_POOL_ID
591 #define BTA_HL_LRG_DATA_POOL_ID GKI_POOL_ID_7
594 /* GATT Server Database pool ID */
595 #ifndef GATT_DB_POOL_ID
596 #define GATT_DB_POOL_ID GKI_POOL_ID_8
599 /* GATT Data sending buffer pool ID, use default ACL pool for fix channel data */
600 #ifndef GATT_BUF_POOL_ID
601 #define GATT_BUF_POOL_ID HCI_ACL_POOL_ID
604 /******************************************************************************
606 ** Lower Layer Interface
608 ******************************************************************************/
610 /* Sends ACL data received over HCI to the upper stack. */
611 #ifndef HCI_ACL_DATA_TO_UPPER
612 #define HCI_ACL_DATA_TO_UPPER(p) {((BT_HDR *)p)->event = BT_EVT_TO_BTU_HCI_ACL; GKI_send_msg (BTU_TASK, BTU_HCI_RCV_MBOX, p);}
615 /* Sends SCO data received over HCI to the upper stack. */
616 #ifndef HCI_SCO_DATA_TO_UPPER
617 #define HCI_SCO_DATA_TO_UPPER(p) {((BT_HDR *)p)->event = BT_EVT_TO_BTU_HCI_SCO; GKI_send_msg (BTU_TASK, BTU_HCI_RCV_MBOX, p);}
620 /* Sends an HCI event received over HCI to theupper stack. */
621 #ifndef HCI_EVT_TO_UPPER
622 #define HCI_EVT_TO_UPPER(p) {((BT_HDR *)p)->event = BT_EVT_TO_BTU_HCI_EVT; GKI_send_msg (BTU_TASK, BTU_HCI_RCV_MBOX, p);}
625 /* Macro for allocating buffer for HCI commands */
626 #ifndef HCI_GET_CMD_BUF
627 #if (!defined(HCI_USE_VARIABLE_SIZE_CMD_BUF) || (HCI_USE_VARIABLE_SIZE_CMD_BUF == FALSE))
628 /* Allocate fixed-size buffer from HCI_CMD_POOL (default case) */
629 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getpoolbuf (HCI_CMD_POOL_ID))
631 /* Allocate smallest possible buffer (for platforms with limited RAM) */
632 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getbuf ((UINT16)(BT_HDR_SIZE + HCIC_PREAMBLE_SIZE + (paramlen))))
634 #endif /* HCI_GET_CMD_BUF */
636 /******************************************************************************
640 ******************************************************************************/
641 #ifndef HCISU_H4_INCLUDED
642 #define HCISU_H4_INCLUDED TRUE
649 BT_API extern void bte_main_hci_send (BT_HDR *p_msg, UINT16 event);
650 #if (HCISU_H4_INCLUDED == TRUE)
651 BT_API extern void bte_main_lpm_allow_bt_device_sleep(void);
658 /* Sends ACL data received from the upper stack to the BD/EDR HCI transport. */
659 #ifndef HCI_ACL_DATA_TO_LOWER
660 #define HCI_ACL_DATA_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_ACL);
663 #ifndef HCI_BLE_ACL_DATA_TO_LOWER
664 #define HCI_BLE_ACL_DATA_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), (UINT16)(BT_EVT_TO_LM_HCI_ACL|LOCAL_BLE_CONTROLLER_ID));
667 /* Sends SCO data received from the upper stack to the HCI transport. */
668 #ifndef HCI_SCO_DATA_TO_LOWER
669 #define HCI_SCO_DATA_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_SCO);
672 /* Sends an HCI command received from the upper stack to the BD/EDR HCI transport. */
673 #ifndef HCI_CMD_TO_LOWER
674 #define HCI_CMD_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_CMD);
677 /* Sends an LM Diagnosic command received from the upper stack to the HCI transport. */
678 #ifndef HCI_LM_DIAG_TO_LOWER
679 #define HCI_LM_DIAG_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_DIAG);
682 /* Send HCISU a message to allow BT sleep */
683 #ifndef HCI_LP_ALLOW_BT_DEVICE_SLEEP
684 #define HCI_LP_ALLOW_BT_DEVICE_SLEEP() bte_main_lpm_allow_bt_device_sleep()
687 /* If nonzero, the upper-layer sends at most this number of HCI commands to the lower-layer. */
688 #ifndef HCI_MAX_SIMUL_CMDS
689 #define HCI_MAX_SIMUL_CMDS 0
692 /* Timeout for receiving response to HCI command */
693 #ifndef BTU_CMD_CMPL_TIMEOUT
694 #define BTU_CMD_CMPL_TIMEOUT 8
697 /* If TRUE, BTU task will check HCISU again when HCI command timer expires */
698 #ifndef BTU_CMD_CMPL_TOUT_DOUBLE_CHECK
699 #define BTU_CMD_CMPL_TOUT_DOUBLE_CHECK FALSE
702 /* Use 2 second for low-resolution systems, override to 1 for high-resolution systems */
703 #ifndef BT_1SEC_TIMEOUT
704 #define BT_1SEC_TIMEOUT (2)
708 /* if L2CAP_FCR_INCLUDED is TRUE then it should have 100 millisecond resolution */
709 /* if none of them is included then QUICK_TIMER_TICKS_PER_SEC is set to 0 to exclude quick timer */
710 #ifndef QUICK_TIMER_TICKS_PER_SEC
711 #define QUICK_TIMER_TICKS_PER_SEC 10 /* 10ms timer */
714 /******************************************************************************
718 ******************************************************************************/
719 /* if set to TRUE, stack will automatically send an HCI reset at start-up. To be
720 set to FALSE for advanced start-up / shut-down procedures using USER_HW_ENABLE_API
721 and USER_HW_DISABLE_API macros */
722 #ifndef BTM_AUTOMATIC_HCI_RESET
723 #define BTM_AUTOMATIC_HCI_RESET FALSE
726 /* Include BTM Discovery database and code. */
727 #ifndef BTM_DISCOVERY_INCLUDED
728 #define BTM_DISCOVERY_INCLUDED TRUE
731 /* Include inquiry code. */
732 #ifndef BTM_INQUIRY_INCLUDED
733 #define BTM_INQUIRY_INCLUDED TRUE
736 /* Cancel Inquiry on incoming SSP */
737 #ifndef BTM_NO_SSP_ON_INQUIRY
738 #define BTM_NO_SSP_ON_INQUIRY FALSE
741 /* Include periodic inquiry code (used when BTM_INQUIRY_INCLUDED is TRUE). */
742 #ifndef BTM_PERIODIC_INQ_INCLUDED
743 #define BTM_PERIODIC_INQ_INCLUDED TRUE
746 /* Include security authorization code */
747 #ifndef BTM_AUTHORIZATION_INCLUDED
748 #define BTM_AUTHORIZATION_INCLUDED TRUE
751 /* Includes SCO if TRUE */
752 #ifndef BTM_SCO_INCLUDED
753 #define BTM_SCO_INCLUDED TRUE /* TRUE includes SCO code */
756 /* Includes SCO if TRUE */
757 #ifndef BTM_SCO_HCI_INCLUDED
758 #define BTM_SCO_HCI_INCLUDED FALSE /* TRUE includes SCO over HCI code */
761 /* Includes WBS if TRUE */
762 #ifndef BTM_WBS_INCLUDED
763 #define BTM_WBS_INCLUDED FALSE /* TRUE includes WBS code */
766 /* Includes PCM2 support if TRUE */
767 #ifndef BTM_PCM2_INCLUDED
768 #define BTM_PCM2_INCLUDED FALSE
771 /* This is used to work around a controller bug that doesn't like Disconnect
772 ** issued while there is a role switch in progress
774 #ifndef BTM_DISC_DURING_RS
775 #define BTM_DISC_DURING_RS TRUE
778 /**************************
779 ** Initial SCO TX credit
780 *************************/
781 /* max TX SCO data packet size */
782 #ifndef BTM_SCO_DATA_SIZE_MAX
783 #define BTM_SCO_DATA_SIZE_MAX 240
786 /* maximum BTM buffering capacity */
787 #ifndef BTM_SCO_MAX_BUF_CAP
788 #define BTM_SCO_MAX_BUF_CAP (BTM_SCO_INIT_XMIT_CREDIT * 4)
791 /* The size in bytes of the BTM inquiry database. */
792 #ifndef BTM_INQ_DB_SIZE
793 #define BTM_INQ_DB_SIZE 40
796 /* This is set to enable automatic periodic inquiry at startup. */
797 #ifndef BTM_ENABLE_AUTO_INQUIRY
798 #define BTM_ENABLE_AUTO_INQUIRY FALSE
801 /* This is set to always try to acquire the remote device name. */
802 #ifndef BTM_INQ_GET_REMOTE_NAME
803 #define BTM_INQ_GET_REMOTE_NAME FALSE
806 /* The inquiry duration in 1.28 second units when auto inquiry is enabled. */
807 #ifndef BTM_DEFAULT_INQ_DUR
808 #define BTM_DEFAULT_INQ_DUR 5
811 /* The inquiry mode when auto inquiry is enabled. */
812 #ifndef BTM_DEFAULT_INQ_MODE
813 #define BTM_DEFAULT_INQ_MODE BTM_GENERAL_INQUIRY
816 /* The default periodic inquiry maximum delay when auto inquiry is enabled, in 1.28 second units. */
817 #ifndef BTM_DEFAULT_INQ_MAX_DELAY
818 #define BTM_DEFAULT_INQ_MAX_DELAY 30
821 /* The default periodic inquiry minimum delay when auto inquiry is enabled, in 1.28 second units. */
822 #ifndef BTM_DEFAULT_INQ_MIN_DELAY
823 #define BTM_DEFAULT_INQ_MIN_DELAY 20
826 /* The maximum age of entries in inquiry database in seconds ('0' disables feature). */
827 #ifndef BTM_INQ_MAX_AGE
828 #define BTM_INQ_MAX_AGE 0
831 /* The maximum age of entries in inquiry database based on inquiry response failure ('0' disables feature). */
832 #ifndef BTM_INQ_AGE_BY_COUNT
833 #define BTM_INQ_AGE_BY_COUNT 0
836 /* TRUE if controller does not support inquiry event filtering. */
837 #ifndef BTM_BYPASS_EVENT_FILTERING
838 #define BTM_BYPASS_EVENT_FILTERING FALSE
841 /* TRUE if inquiry filtering is desired from BTM. */
842 #ifndef BTM_USE_INQ_RESULTS_FILTER
843 #define BTM_USE_INQ_RESULTS_FILTER TRUE
846 /* The default scan mode */
847 #ifndef BTM_DEFAULT_SCAN_TYPE
848 #define BTM_DEFAULT_SCAN_TYPE BTM_SCAN_TYPE_INTERLACED
851 /* Should connections to unknown devices be allowed when not discoverable? */
852 #ifndef BTM_ALLOW_CONN_IF_NONDISCOVER
853 #define BTM_ALLOW_CONN_IF_NONDISCOVER TRUE
856 /* When connectable mode is set to TRUE, the device will respond to paging. */
857 #ifndef BTM_IS_CONNECTABLE
858 #define BTM_IS_CONNECTABLE FALSE
861 /* Sets the Page_Scan_Window: the length of time that the device is performing a page scan. */
862 #ifndef BTM_DEFAULT_CONN_WINDOW
863 #define BTM_DEFAULT_CONN_WINDOW 0x0012
866 /* Sets the Page_Scan_Activity: the interval between the start of two consecutive page scans. */
867 #ifndef BTM_DEFAULT_CONN_INTERVAL
868 #define BTM_DEFAULT_CONN_INTERVAL 0x0800
871 /* This is set to automatically perform inquiry scan on startup. */
872 #ifndef BTM_IS_DISCOVERABLE
873 #define BTM_IS_DISCOVERABLE FALSE
876 /* When automatic inquiry scan is enabled, this sets the discovery mode. */
877 #ifndef BTM_DEFAULT_DISC_MODE
878 #define BTM_DEFAULT_DISC_MODE BTM_GENERAL_DISCOVERABLE
881 /* When automatic inquiry scan is enabled, this sets the inquiry scan window. */
882 #ifndef BTM_DEFAULT_DISC_WINDOW
883 #define BTM_DEFAULT_DISC_WINDOW 0x0012
886 /* When automatic inquiry scan is enabled, this sets the inquiry scan interval. */
887 #ifndef BTM_DEFAULT_DISC_INTERVAL
888 #define BTM_DEFAULT_DISC_INTERVAL 0x0800
891 /* Sets the period, in seconds, to automatically perform service discovery. */
892 #ifndef BTM_AUTO_DISCOVERY_PERIOD
893 #define BTM_AUTO_DISCOVERY_PERIOD 0
896 /* The size in bytes of the BTM discovery database (if discovery is included). */
897 #ifndef BTM_DISCOVERY_DB_SIZE
898 #define BTM_DISCOVERY_DB_SIZE 4000
901 /* Number of milliseconds to delay BTU task startup upon device initialization. */
902 #ifndef BTU_STARTUP_DELAY
903 #define BTU_STARTUP_DELAY 0
906 /* Whether BTA is included in BTU task. */
907 #ifndef BTU_BTA_INCLUDED
908 #define BTU_BTA_INCLUDED TRUE
911 /* Number of seconds to wait to send an HCI Reset command upon device initialization. */
912 #ifndef BTM_FIRST_RESET_DELAY
913 #define BTM_FIRST_RESET_DELAY 0
916 /* The number of seconds to wait for controller module to reset after issuing an HCI Reset command. */
917 #ifndef BTM_AFTER_RESET_TIMEOUT
918 #define BTM_AFTER_RESET_TIMEOUT 0
921 /* Default class of device
922 * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
924 * SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony)
925 * MAJOR_CLASS:0x02 - PHONE
926 * MINOR_CLASS:0x0C - SMART_PHONE
930 #define BTA_DM_COD {0x5A, 0x02, 0x0C}
933 /* The number of SCO links. */
934 #ifndef BTM_MAX_SCO_LINKS
935 #define BTM_MAX_SCO_LINKS 3
938 /* The preferred type of SCO links (2-eSCO, 0-SCO). */
939 #ifndef BTM_DEFAULT_SCO_MODE
940 #define BTM_DEFAULT_SCO_MODE 2
943 /* The number of security records for peer devices. */
944 #ifndef BTM_SEC_MAX_DEVICE_RECORDS
945 #define BTM_SEC_MAX_DEVICE_RECORDS 100
948 /* The number of security records for services. */
949 #ifndef BTM_SEC_MAX_SERVICE_RECORDS
950 #define BTM_SEC_MAX_SERVICE_RECORDS 32
953 /* If True, force a retrieval of remote device name for each bond in case it's changed */
954 #ifndef BTM_SEC_FORCE_RNR_FOR_DBOND
955 #define BTM_SEC_FORCE_RNR_FOR_DBOND FALSE
958 /* Maximum device name length used in btm database. */
959 #ifndef BTM_MAX_REM_BD_NAME_LEN
960 #define BTM_MAX_REM_BD_NAME_LEN 248
963 /* Maximum local device name length stored btm database.
964 '0' disables storage of the local name in BTM */
965 #ifndef BTM_MAX_LOC_BD_NAME_LEN
966 #define BTM_MAX_LOC_BD_NAME_LEN 248
969 /* Fixed Default String. When this is defined as null string, the device's
970 * product model name is used as the default local name.
972 #ifndef BTM_DEF_LOCAL_NAME
973 #define BTM_DEF_LOCAL_NAME ""
976 /* Maximum service name stored with security authorization (0 if not needed) */
977 #ifndef BTM_SEC_SERVICE_NAME_LEN
978 #define BTM_SEC_SERVICE_NAME_LEN BT_MAX_SERVICE_NAME_LEN
981 /* Maximum number of pending security callback */
982 #ifndef BTM_SEC_MAX_CALLBACKS
983 #define BTM_SEC_MAX_CALLBACKS 7
986 /* Maximum length of the service name. */
987 #ifndef BT_MAX_SERVICE_NAME_LEN
988 #define BT_MAX_SERVICE_NAME_LEN 21
991 /* ACL buffer size in HCI Host Buffer Size command. */
992 #ifndef BTM_ACL_BUF_SIZE
993 #define BTM_ACL_BUF_SIZE 0
996 /* This is set to use the BTM power manager. */
997 #ifndef BTM_PWR_MGR_INCLUDED
998 #define BTM_PWR_MGR_INCLUDED TRUE
1001 /* The maximum number of clients that can register with the power manager. */
1002 #ifndef BTM_MAX_PM_RECORDS
1003 #define BTM_MAX_PM_RECORDS 2
1006 /* This is set to show debug trace messages for the power manager. */
1007 #ifndef BTM_PM_DEBUG
1008 #define BTM_PM_DEBUG FALSE
1011 /* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */
1012 #ifndef BTM_SCO_WAKE_PARKED_LINK
1013 #define BTM_SCO_WAKE_PARKED_LINK TRUE
1016 /* May be set to the the name of a function used for vendor specific chip initialization */
1017 #ifndef BTM_APP_DEV_INIT
1018 /* #define BTM_APP_DEV_INIT myInitFunction() */
1021 /* This is set to TRUE if the busy level change event is desired. (replace ACL change event) */
1022 #ifndef BTM_BUSY_LEVEL_CHANGE_INCLUDED
1023 #define BTM_BUSY_LEVEL_CHANGE_INCLUDED TRUE
1026 /* If the user does not respond to security process requests within this many seconds,
1027 * a negative response would be sent automatically.
1028 * It's recommended to use a value between 30 and OBX_TIMEOUT_VALUE
1029 * 30 is LMP response timeout value */
1030 #ifndef BTM_SEC_TIMEOUT_VALUE
1031 #define BTM_SEC_TIMEOUT_VALUE 35
1034 /* Maximum number of callbacks that can be registered using BTM_RegisterForVSEvents */
1035 #ifndef BTM_MAX_VSE_CALLBACKS
1036 #define BTM_MAX_VSE_CALLBACKS 3
1039 /******************************************
1041 *******************************************/
1042 /* This is set to TRUE if the server Extended Inquiry Response feature is desired. */
1043 /* server sends EIR to client */
1044 #ifndef BTM_EIR_SERVER_INCLUDED
1045 #define BTM_EIR_SERVER_INCLUDED TRUE
1048 /* This is set to TRUE if the client Extended Inquiry Response feature is desired. */
1049 /* client inquiry to server */
1050 #ifndef BTM_EIR_CLIENT_INCLUDED
1051 #define BTM_EIR_CLIENT_INCLUDED TRUE
1054 /* This is set to TRUE if the FEC is required for EIR packet. */
1055 #ifndef BTM_EIR_DEFAULT_FEC_REQUIRED
1056 #define BTM_EIR_DEFAULT_FEC_REQUIRED TRUE
1059 /* User defined UUID look up table */
1060 #ifndef BTM_EIR_UUID_LKUP_TBL
1063 /* The IO capability of the local device (for Simple Pairing) */
1064 #ifndef BTM_LOCAL_IO_CAPS
1065 #define BTM_LOCAL_IO_CAPS BTM_IO_CAP_IO
1068 /* The default MITM Protection Requirement (for Simple Pairing)
1069 * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */
1070 #ifndef BTM_DEFAULT_AUTH_REQ
1071 #define BTM_DEFAULT_AUTH_REQ BTM_AUTH_SP_NO
1074 /* The default MITM Protection Requirement for dedicated bonding using Simple Pairing
1075 * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */
1076 #ifndef BTM_DEFAULT_DD_AUTH_REQ
1077 #define BTM_DEFAULT_DD_AUTH_REQ BTM_AUTH_AP_YES
1080 /* Include Out-of-Band implementation for Simple Pairing */
1081 #ifndef BTM_OOB_INCLUDED
1082 #define BTM_OOB_INCLUDED TRUE
1085 /* TRUE to include Sniff Subrating */
1086 #ifndef BTM_SSR_INCLUDED
1087 #define BTM_SSR_INCLUDED TRUE
1090 /*************************
1091 ** End of Lisbon Features
1092 **************************/
1094 /* Used for conformance testing ONLY */
1095 #ifndef BTM_BLE_CONFORMANCE_TESTING
1096 #define BTM_BLE_CONFORMANCE_TESTING FALSE
1099 /* Maximum number of consecutive HCI commands that can time out
1100 * before it gets treated as H/w error*/
1101 #ifndef BTM_MAX_HCI_CMD_TOUT_BEFORE_RESTART
1102 #define BTM_MAX_HCI_CMD_TOUT_BEFORE_RESTART 2
1105 /******************************************************************************
1109 ******************************************************************************/
1111 /* Flow control and retransmission mode */
1113 #ifndef L2CAP_FCR_INCLUDED
1114 #define L2CAP_FCR_INCLUDED TRUE
1117 /* The maximum number of simultaneous links that L2CAP can support. */
1118 #ifndef MAX_ACL_CONNECTIONS
1119 #define MAX_L2CAP_LINKS 7
1121 #define MAX_L2CAP_LINKS MAX_ACL_CONNECTIONS
1124 /* The maximum number of simultaneous channels that L2CAP can support. */
1125 #ifndef MAX_L2CAP_CHANNELS
1126 #define MAX_L2CAP_CHANNELS 16
1129 /* The maximum number of simultaneous applications that can register with L2CAP. */
1130 #ifndef MAX_L2CAP_CLIENTS
1131 #define MAX_L2CAP_CLIENTS 15
1134 /* The number of seconds of link inactivity before a link is disconnected. */
1135 #ifndef L2CAP_LINK_INACTIVITY_TOUT
1136 #define L2CAP_LINK_INACTIVITY_TOUT 4
1139 /* The number of seconds of link inactivity after bonding before a link is disconnected. */
1140 #ifndef L2CAP_BONDING_TIMEOUT
1141 #define L2CAP_BONDING_TIMEOUT 3
1144 /* The time from the HCI connection complete to disconnect if no channel is established. */
1145 #ifndef L2CAP_LINK_STARTUP_TOUT
1146 #define L2CAP_LINK_STARTUP_TOUT 60
1149 /* The L2CAP MTU; must be in accord with the HCI ACL pool size. */
1150 #ifndef L2CAP_MTU_SIZE
1151 #define L2CAP_MTU_SIZE 1691
1154 /* The L2CAP MPS over Bluetooth; must be in accord with the FCR tx pool size and ACL down buffer size. */
1155 #ifndef L2CAP_MPS_OVER_BR_EDR
1156 #define L2CAP_MPS_OVER_BR_EDR 1010
1159 /* This is set to enable host flow control. */
1160 #ifndef L2CAP_HOST_FLOW_CTRL
1161 #define L2CAP_HOST_FLOW_CTRL FALSE
1164 /* If host flow control enabled, this is the number of buffers the controller can have unacknowledged. */
1165 #ifndef L2CAP_HOST_FC_ACL_BUFS
1166 #define L2CAP_HOST_FC_ACL_BUFS 20
1169 /* The percentage of the queue size allowed before a congestion event is sent to the L2CAP client (typically 120%). */
1170 #ifndef L2CAP_FWD_CONG_THRESH
1171 #define L2CAP_FWD_CONG_THRESH 120
1174 /* This is set to enable L2CAP to take the ACL link out of park mode when ACL data is to be sent. */
1175 #ifndef L2CAP_WAKE_PARKED_LINK
1176 #define L2CAP_WAKE_PARKED_LINK TRUE
1179 /* Whether link wants to be the master or the slave. */
1180 #ifndef L2CAP_DESIRED_LINK_ROLE
1181 #define L2CAP_DESIRED_LINK_ROLE HCI_ROLE_SLAVE
1184 /* Include Non-Flushable Packet Boundary Flag feature of Lisbon */
1185 #ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED
1186 #define L2CAP_NON_FLUSHABLE_PB_INCLUDED TRUE
1189 /* Minimum number of ACL credit for high priority link */
1190 #ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
1191 #define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 5
1194 /* used for monitoring HCI ACL credit management */
1195 #ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG
1196 #define L2CAP_HCI_FLOW_CONTROL_DEBUG TRUE
1199 /* Used for calculating transmit buffers off of */
1200 #ifndef L2CAP_NUM_XMIT_BUFFS
1201 #define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX
1204 /* Unicast Connectionless Data */
1205 #ifndef L2CAP_UCD_INCLUDED
1206 #define L2CAP_UCD_INCLUDED FALSE
1209 /* Unicast Connectionless Data MTU */
1210 #ifndef L2CAP_UCD_MTU
1211 #define L2CAP_UCD_MTU L2CAP_MTU_SIZE
1214 /* Unicast Connectionless Data Idle Timeout */
1215 #ifndef L2CAP_UCD_IDLE_TIMEOUT
1216 #define L2CAP_UCD_IDLE_TIMEOUT 2
1219 /* Unicast Connectionless Data Idle Timeout */
1220 #ifndef L2CAP_UCD_CH_PRIORITY
1221 #define L2CAP_UCD_CH_PRIORITY L2CAP_CHNL_PRIORITY_MEDIUM
1224 /* Max clients on Unicast Connectionless Data */
1225 #ifndef L2CAP_MAX_UCD_CLIENTS
1226 #define L2CAP_MAX_UCD_CLIENTS 5
1229 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
1230 /* Excluding L2CAP signaling channel and UCD */
1231 #ifndef L2CAP_NUM_FIXED_CHNLS
1232 #define L2CAP_NUM_FIXED_CHNLS 4
1235 /* First fixed channel supported */
1236 #ifndef L2CAP_FIRST_FIXED_CHNL
1237 #define L2CAP_FIRST_FIXED_CHNL 3
1240 #ifndef L2CAP_LAST_FIXED_CHNL
1241 #define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
1244 /* Round Robin service channels in link */
1245 #ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
1246 #define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE TRUE
1249 /* Used for calculating transmit buffers off of */
1250 #ifndef L2CAP_NUM_XMIT_BUFFS
1251 #define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX
1254 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
1255 #ifndef L2CAP_NUM_FIXED_CHNLS
1256 #define L2CAP_NUM_FIXED_CHNLS 1
1259 /* First fixed channel supported */
1260 #ifndef L2CAP_FIRST_FIXED_CHNL
1261 #define L2CAP_FIRST_FIXED_CHNL 3
1264 #ifndef L2CAP_LAST_FIXED_CHNL
1265 #define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
1268 /* used for monitoring eL2CAP data flow */
1269 #ifndef L2CAP_ERTM_STATS
1270 #define L2CAP_ERTM_STATS FALSE
1273 /* USED FOR FCR TEST ONLY: When TRUE generates bad tx and rx packets */
1274 #ifndef L2CAP_CORRUPT_ERTM_PKTS
1275 #define L2CAP_CORRUPT_ERTM_PKTS FALSE
1278 /* Used for conformance testing ONLY: When TRUE lets scriptwrapper overwrite info response */
1279 #ifndef L2CAP_CONFORMANCE_TESTING
1280 #define L2CAP_CONFORMANCE_TESTING FALSE
1284 #ifndef TIMER_PARAM_TYPE
1286 #define TIMER_PARAM_TYPE void *
1288 #define TIMER_PARAM_TYPE UINT32
1292 /******************************************************************************
1296 ******************************************************************************/
1298 #ifndef BLE_INCLUDED
1299 #define BLE_INCLUDED TRUE
1302 #ifndef BLE_ANDROID_CONTROLLER_SCAN_FILTER
1303 #define BLE_ANDROID_CONTROLLER_SCAN_FILTER TRUE
1306 #ifndef LOCAL_BLE_CONTROLLER_ID
1307 #define LOCAL_BLE_CONTROLLER_ID (1)
1311 * Toggles support for general LE privacy features such as remote address
1312 * resolution, local address rotation etc.
1314 #ifndef BLE_PRIVACY_SPT
1315 #define BLE_PRIVACY_SPT TRUE
1319 * Enables or disables support for local privacy (ex. address rotation)
1321 #ifndef BLE_LOCAL_PRIVACY_ENABLED
1322 #define BLE_LOCAL_PRIVACY_ENABLED TRUE
1326 * Toggles support for vendor specific extensions such as RPA offloading,
1327 * feature discovery, multi-adv etc.
1329 #ifndef BLE_VND_INCLUDED
1330 #define BLE_VND_INCLUDED FALSE
1333 #ifndef BTM_BLE_ADV_TX_POWER
1334 #define BTM_BLE_ADV_TX_POWER {-21, -15, -7, 1, 9}
1338 #ifndef BLE_BATCH_SCAN_INCLUDED
1339 #define BLE_BATCH_SCAN_INCLUDED TRUE
1342 /******************************************************************************
1344 ** ATT/GATT Protocol/Profile Settings
1346 ******************************************************************************/
1347 #ifndef BTA_GATT_INCLUDED
1348 #if BLE_INCLUDED == TRUE
1349 #define BTA_GATT_INCLUDED TRUE
1351 #define BTA_GATT_INCLUDED FALSE
1355 #if BTA_GATT_INCLUDED == TRUE && BLE_INCLUDED == FALSE
1356 #error "can't have GATT without BLE"
1359 #ifndef BLE_LLT_INCLUDED
1360 #define BLE_LLT_INCLUDED TRUE
1362 #ifndef BTM_DUMO_ADDR_CENTRAL_ENABLED
1363 #define BTM_DUMO_ADDR_CENTRAL_ENABLED FALSE
1365 #ifndef ATT_INCLUDED
1366 #define ATT_INCLUDED TRUE
1370 #define ATT_DEBUG TRUE
1373 #ifndef GATT_SERVER_ENABLED
1374 #define GATT_SERVER_ENABLED TRUE
1377 #ifndef GATT_CLIENT_ENABLED
1378 #define GATT_CLIENT_ENABLED TRUE
1381 #ifndef BLE_PERIPHERAL_MODE_SUPPORT
1382 #define BLE_PERIPHERAL_MODE_SUPPORT TRUE
1385 #ifndef BLE_PERIPHERAL_ADV_NAME
1386 #define BLE_PERIPHERAL_ADV_NAME FALSE
1389 #ifndef BLE_DELAY_REQUEST_ENC
1390 /* This flag is to work around IPHONE problem, We need to wait for iPhone ready
1391 before send encryption request to iPhone */
1392 #define BLE_DELAY_REQUEST_ENC FALSE
1395 #ifndef GAP_TRANSPORT_SUPPORTED
1396 #define GAP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
1399 #ifndef GATTP_TRANSPORT_SUPPORTED
1400 #define GATTP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
1403 #ifndef GATT_MAX_SR_PROFILES
1404 #define GATT_MAX_SR_PROFILES 32 /* max is 32 */
1407 #ifndef GATT_MAX_APPS
1408 #define GATT_MAX_APPS 32 /* note: 2 apps used internally GATT and GAP */
1411 #ifndef GATT_MAX_CL_PROFILES
1412 #define GATT_MAX_CL_PROFILES 4
1415 #ifndef GATT_MAX_PHY_CHANNEL
1416 #define GATT_MAX_PHY_CHANNEL 7
1419 /* Used for conformance testing ONLY */
1420 #ifndef GATT_CONFORMANCE_TESTING
1421 #define GATT_CONFORMANCE_TESTING FALSE
1424 /* number of background connection device allowence, ideally to be the same as WL size
1426 #ifndef GATT_MAX_BG_CONN_DEV
1427 #define GATT_MAX_BG_CONN_DEV 32
1430 /******************************************************************************
1434 ******************************************************************************/
1435 #ifndef SMP_INCLUDED
1436 #if BLE_INCLUDED == TRUE
1437 #define SMP_INCLUDED TRUE
1439 #define SMP_INCLUDED FALSE
1443 #if SMP_INCLUDED == TRUE && BLE_INCLUDED == FALSE
1444 #error "can't have SMP without BLE"
1448 #define SMP_DEBUG TRUE
1451 #ifndef SMP_DEFAULT_AUTH_REQ
1452 #define SMP_DEFAULT_AUTH_REQ SMP_AUTH_NB_ENC_ONLY
1455 #ifndef SMP_MAX_ENC_KEY_SIZE
1456 #define SMP_MAX_ENC_KEY_SIZE 16
1459 #ifndef SMP_MIN_ENC_KEY_SIZE
1460 #define SMP_MIN_ENC_KEY_SIZE 7
1463 /* Used for conformance testing ONLY */
1464 #ifndef SMP_CONFORMANCE_TESTING
1465 #define SMP_CONFORMANCE_TESTING FALSE
1468 /******************************************************************************
1472 ******************************************************************************/
1474 /* This is set to enable SDP server functionality. */
1475 #ifndef SDP_SERVER_ENABLED
1476 #define SDP_SERVER_ENABLED TRUE
1479 /* The maximum number of SDP records the server can support. */
1480 #ifndef SDP_MAX_RECORDS
1481 #define SDP_MAX_RECORDS 20
1484 /* The maximum number of attributes in each record. */
1485 #ifndef SDP_MAX_REC_ATTR
1486 //#if defined(HID_DEV_INCLUDED) && (HID_DEV_INCLUDED==TRUE)
1487 #define SDP_MAX_REC_ATTR 25
1489 //#define SDP_MAX_REC_ATTR 13
1493 #ifndef SDP_MAX_PAD_LEN
1494 #define SDP_MAX_PAD_LEN 600
1497 /* The maximum length, in bytes, of an attribute. */
1498 #ifndef SDP_MAX_ATTR_LEN
1499 //#if defined(HID_DEV_INCLUDED) && (HID_DEV_INCLUDED==TRUE)
1500 //#define SDP_MAX_ATTR_LEN 80
1502 //#define SDP_MAX_ATTR_LEN 100
1504 #define SDP_MAX_ATTR_LEN 400
1507 /* The maximum number of attribute filters supported by SDP databases. */
1508 #ifndef SDP_MAX_ATTR_FILTERS
1509 #define SDP_MAX_ATTR_FILTERS 15
1512 /* The maximum number of UUID filters supported by SDP databases. */
1513 #ifndef SDP_MAX_UUID_FILTERS
1514 #define SDP_MAX_UUID_FILTERS 3
1517 /* This is set to enable SDP client functionality. */
1518 #ifndef SDP_CLIENT_ENABLED
1519 #define SDP_CLIENT_ENABLED TRUE
1522 /* The maximum number of record handles retrieved in a search. */
1523 #ifndef SDP_MAX_DISC_SERVER_RECS
1524 #define SDP_MAX_DISC_SERVER_RECS 21
1527 /* The size of a scratchpad buffer, in bytes, for storing the response to an attribute request. */
1528 #ifndef SDP_MAX_LIST_BYTE_COUNT
1529 #define SDP_MAX_LIST_BYTE_COUNT 4096
1532 /* The maximum number of parameters in an SDP protocol element. */
1533 #ifndef SDP_MAX_PROTOCOL_PARAMS
1534 #define SDP_MAX_PROTOCOL_PARAMS 2
1537 /* The maximum number of simultaneous client and server connections. */
1538 #ifndef SDP_MAX_CONNECTIONS
1539 #define SDP_MAX_CONNECTIONS 4
1542 /* The MTU size for the L2CAP configuration. */
1543 #ifndef SDP_MTU_SIZE
1544 #define SDP_MTU_SIZE 672
1547 /* The flush timeout for the L2CAP configuration. */
1548 #ifndef SDP_FLUSH_TO
1549 #define SDP_FLUSH_TO 0xFFFF
1552 /* The name for security authorization. */
1553 #ifndef SDP_SERVICE_NAME
1554 #define SDP_SERVICE_NAME "Service Discovery"
1557 /* The security level for BTM. */
1558 #ifndef SDP_SECURITY_LEVEL
1559 #define SDP_SECURITY_LEVEL BTM_SEC_NONE
1562 /* Device identification feature. */
1563 #ifndef SDP_DI_INCLUDED
1564 #define SDP_DI_INCLUDED TRUE
1567 /******************************************************************************
1571 ******************************************************************************/
1573 #ifndef RFCOMM_INCLUDED
1574 #define RFCOMM_INCLUDED TRUE
1577 /* The maximum number of ports supported. */
1578 #ifndef MAX_RFC_PORTS
1579 #define MAX_RFC_PORTS 30
1582 /* The maximum simultaneous links to different devices. */
1583 #ifndef MAX_ACL_CONNECTIONS
1584 #define MAX_BD_CONNECTIONS 7
1586 #define MAX_BD_CONNECTIONS MAX_ACL_CONNECTIONS
1589 /* The port receive queue low watermark level, in bytes. */
1590 #ifndef PORT_RX_LOW_WM
1591 #define PORT_RX_LOW_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM)
1594 /* The port receive queue high watermark level, in bytes. */
1595 #ifndef PORT_RX_HIGH_WM
1596 #define PORT_RX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM)
1599 /* The port receive queue critical watermark level, in bytes. */
1600 #ifndef PORT_RX_CRITICAL_WM
1601 #define PORT_RX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM)
1604 /* The port receive queue low watermark level, in number of buffers. */
1605 #ifndef PORT_RX_BUF_LOW_WM
1606 #define PORT_RX_BUF_LOW_WM 4
1609 /* The port receive queue high watermark level, in number of buffers. */
1610 #ifndef PORT_RX_BUF_HIGH_WM
1611 #define PORT_RX_BUF_HIGH_WM 10
1614 /* The port receive queue critical watermark level, in number of buffers. */
1615 #ifndef PORT_RX_BUF_CRITICAL_WM
1616 #define PORT_RX_BUF_CRITICAL_WM 15
1619 /* The port transmit queue high watermark level, in bytes. */
1620 #ifndef PORT_TX_HIGH_WM
1621 #define PORT_TX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM)
1624 /* The port transmit queue critical watermark level, in bytes. */
1625 #ifndef PORT_TX_CRITICAL_WM
1626 #define PORT_TX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM)
1629 /* The port transmit queue high watermark level, in number of buffers. */
1630 #ifndef PORT_TX_BUF_HIGH_WM
1631 #define PORT_TX_BUF_HIGH_WM 10
1634 /* The port transmit queue high watermark level, in number of buffers. */
1635 #ifndef PORT_TX_BUF_CRITICAL_WM
1636 #define PORT_TX_BUF_CRITICAL_WM 15
1639 /* The RFCOMM multiplexer preferred flow control mechanism. */
1640 #ifndef PORT_FC_DEFAULT
1641 #define PORT_FC_DEFAULT PORT_FC_CREDIT
1644 /* The maximum number of credits receiver sends to peer when using credit-based flow control. */
1645 #ifndef PORT_CREDIT_RX_MAX
1646 #define PORT_CREDIT_RX_MAX 16
1649 /* The credit low watermark level. */
1650 #ifndef PORT_CREDIT_RX_LOW
1651 #define PORT_CREDIT_RX_LOW 8
1654 /* Test code allowing l2cap FEC on RFCOMM.*/
1655 #ifndef PORT_ENABLE_L2CAP_FCR_TEST
1656 #define PORT_ENABLE_L2CAP_FCR_TEST FALSE
1659 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1660 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_lock() or GKI_disable() */
1661 #ifndef PORT_SCHEDULE_LOCK
1662 #define PORT_SCHEDULE_LOCK GKI_disable()
1665 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1666 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_unlock() or GKI_enable() */
1667 #ifndef PORT_SCHEDULE_UNLOCK
1668 #define PORT_SCHEDULE_UNLOCK GKI_enable()
1671 /******************************************************************************
1675 ******************************************************************************/
1677 #ifndef TCS_INCLUDED
1678 #define TCS_INCLUDED FALSE
1681 /* If set to TRUE, gives lean TCS state machine configuration. */
1683 #define TCS_LEAN FALSE
1686 /* To include/exclude point-to-multipoint broadcast SETUP configuration. */
1687 #ifndef TCS_BCST_SETUP_INCLUDED
1688 #define TCS_BCST_SETUP_INCLUDED TRUE
1691 /* To include/exclude supplementary services. */
1692 #ifndef TCS_SUPP_SVCS_INCLUDED
1693 #define TCS_SUPP_SVCS_INCLUDED TRUE
1696 /* To include/exclude WUG master role. */
1697 #ifndef TCS_WUG_MASTER_INCLUDED
1698 #define TCS_WUG_MASTER_INCLUDED TRUE
1701 /* To include/exclude WUG member role. */
1702 #ifndef TCS_WUG_MEMBER_INCLUDED
1703 #define TCS_WUG_MEMBER_INCLUDED TRUE
1706 /* Maximum number of WUG members. */
1707 #ifndef TCS_MAX_WUG_MEMBERS
1708 #define TCS_MAX_WUG_MEMBERS 7
1711 /* Broadcom specific acknowledgement message to ensure fast and robust operation of WUG FIMA procedure. */
1712 #ifndef TCS_WUG_LISTEN_ACPT_ACK_INCLUDED
1713 #define TCS_WUG_LISTEN_ACPT_ACK_INCLUDED TRUE
1716 /* The number of simultaneous calls supported. */
1717 #ifndef TCS_MAX_NUM_SIMUL_CALLS
1718 #define TCS_MAX_NUM_SIMUL_CALLS 3
1721 /* The number of devices the device can connect to. */
1722 #ifndef TCS_MAX_NUM_ACL_CONNS
1723 #define TCS_MAX_NUM_ACL_CONNS 7
1726 /* The maximum length, in bytes, of the company specific information element. */
1727 #ifndef TCS_MAX_CO_SPEC_LEN
1728 #define TCS_MAX_CO_SPEC_LEN 40
1731 /* The maximum length, in bytes, of the audio control information element . */
1732 #ifndef TCS_MAX_AUDIO_CTL_LEN
1733 #define TCS_MAX_AUDIO_CTL_LEN 40
1736 /* (Dis)allow EDR ESCO */
1737 #ifndef TCS_AUDIO_USE_ESCO_EDR
1738 #define TCS_AUDIO_USE_ESCO_EDR FALSE
1741 /******************************************************************************
1745 ******************************************************************************/
1746 #ifndef OBX_INCLUDED
1747 #define OBX_INCLUDED FALSE
1750 #ifndef OBX_CLIENT_INCLUDED
1751 #define OBX_CLIENT_INCLUDED TRUE
1754 #ifndef OBX_SERVER_INCLUDED
1755 #define OBX_SERVER_INCLUDED TRUE
1758 /* TRUE to include OBEX authentication/MD5 code */
1759 #ifndef OBX_MD5_INCLUDED
1760 #define OBX_MD5_INCLUDED TRUE
1763 /* TRUE to include OBEX authentication/MD5 test code */
1764 #ifndef OBX_MD5_TEST_INCLUDED
1765 #define OBX_MD5_TEST_INCLUDED FALSE
1768 /* TRUE to include OBEX 1.4 enhancement (including Obex Over L2CAP) */
1769 #ifndef OBX_14_INCLUDED
1770 #define OBX_14_INCLUDED FALSE
1772 /* MD5 code is required to use OBEX 1.4 features (Reliable session) */
1773 #if (OBX_MD5_INCLUDED == FALSE)
1774 #undef OBX_14_INCLUDED
1775 #define OBX_14_INCLUDED FALSE
1778 /* L2CAP FCR/eRTM mode is required to use OBEX Over L2CAP */
1779 #if (L2CAP_FCR_INCLUDED == FALSE)
1780 #undef OBX_14_INCLUDED
1781 #define OBX_14_INCLUDED FALSE
1784 /* The timeout value (in seconds) for reliable sessions to remain in suspend. 0xFFFFFFFF for no timeout event. */
1785 #ifndef OBX_SESS_TIMEOUT_VALUE
1786 #define OBX_SESS_TIMEOUT_VALUE 600
1789 /* The idle timeout value. 0 for no timeout event. */
1790 #ifndef OBX_TIMEOUT_VALUE
1791 #define OBX_TIMEOUT_VALUE 60
1794 /* Timeout value used for disconnect */
1795 #ifndef OBX_DISC_TOUT_VALUE
1796 #define OBX_DISC_TOUT_VALUE 5
1799 /* The maximum number of registered servers. */
1800 #ifndef OBX_NUM_SERVERS
1801 #define OBX_NUM_SERVERS 12
1804 /* The maximum number of sessions per registered server. */
1805 #ifndef OBX_MAX_SR_SESSION
1806 #define OBX_MAX_SR_SESSION 4
1809 /* The maximum number of sessions for all registered servers.
1810 * (must be equal or bigger than OBX_NUM_SERVERS) */
1811 #ifndef OBX_NUM_SR_SESSIONS
1812 #define OBX_NUM_SR_SESSIONS 26
1815 /* The maximum number of sessions per registered server.
1816 * must be less than MAX_BD_CONNECTIONS */
1817 #ifndef OBX_MAX_SR_SESSION
1818 #define OBX_MAX_SR_SESSION 4
1821 /* The maximum number of suspended sessions per registered servers. */
1822 #ifndef OBX_MAX_SUSPEND_SESSIONS
1823 #define OBX_MAX_SUSPEND_SESSIONS 4
1826 /* The maximum number of active clients. */
1827 #ifndef OBX_NUM_CLIENTS
1828 #define OBX_NUM_CLIENTS 8
1831 /* The maximum length of OBEX target header.*/
1832 #ifndef OBX_MAX_TARGET_LEN
1833 #define OBX_MAX_TARGET_LEN 16
1836 /* The maximum length of authentication challenge realm.*/
1837 #ifndef OBX_MAX_REALM_LEN
1838 #define OBX_MAX_REALM_LEN 30
1841 /* The maximum of GKI buffer queued at OBX before flow control L2CAP */
1842 #ifndef OBX_MAX_RX_QUEUE_COUNT
1843 #define OBX_MAX_RX_QUEUE_COUNT 3
1846 /* This option is application when OBX_14_INCLUDED=TRUE
1847 Pool ID where to reassemble the SDU.
1848 This Pool will allow buffers to be used that are larger than
1849 the L2CAP_MAX_MTU. */
1850 #ifndef OBX_USER_RX_POOL_ID
1851 #define OBX_USER_RX_POOL_ID OBX_LRG_DATA_POOL_ID
1854 /* This option is application when OBX_14_INCLUDED=TRUE
1855 Pool ID where to hold the SDU.
1856 This Pool will allow buffers to be used that are larger than
1857 the L2CAP_MAX_MTU. */
1858 #ifndef OBX_USER_TX_POOL_ID
1859 #define OBX_USER_TX_POOL_ID OBX_LRG_DATA_POOL_ID
1862 /* This option is application when OBX_14_INCLUDED=TRUE
1863 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
1865 #ifndef OBX_FCR_RX_POOL_ID
1866 #define OBX_FCR_RX_POOL_ID HCI_ACL_POOL_ID
1869 /* This option is application when OBX_14_INCLUDED=TRUE
1870 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
1871 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
1872 Note: This pool needs to have enough buffers to hold two times the window size negotiated
1873 in the L2CA_SetFCROptions (2 * tx_win_size) to allow for retransmissions.
1874 The size of each buffer must be able to hold the maximum MPS segment size passed in
1875 L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1877 #ifndef OBX_FCR_TX_POOL_ID
1878 #define OBX_FCR_TX_POOL_ID HCI_ACL_POOL_ID
1881 /* This option is application when OBX_14_INCLUDED=TRUE
1882 Size of the transmission window when using enhanced retransmission mode. Not used
1883 in basic and streaming modes. Range: 1 - 63
1885 #ifndef OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR
1886 #define OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR 20
1889 /* This option is application when OBX_14_INCLUDED=TRUE
1890 Number of transmission attempts for a single I-Frame before taking
1891 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1894 0 - infinite retransmissions
1895 1 - single transmission
1897 #ifndef OBX_FCR_OPT_MAX_TX_B4_DISCNT
1898 #define OBX_FCR_OPT_MAX_TX_B4_DISCNT 20
1901 /* This option is application when OBX_14_INCLUDED=TRUE
1902 Retransmission Timeout
1903 Range: Minimum 2000 (2 secs) on BR/EDR when supporting PBF.
1905 #ifndef OBX_FCR_OPT_RETX_TOUT
1906 #define OBX_FCR_OPT_RETX_TOUT 2000
1909 /* This option is application when OBX_14_INCLUDED=TRUE
1911 Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
1913 #ifndef OBX_FCR_OPT_MONITOR_TOUT
1914 #define OBX_FCR_OPT_MONITOR_TOUT 12000
1917 /******************************************************************************
1921 ******************************************************************************/
1923 #ifndef BNEP_INCLUDED
1924 #define BNEP_INCLUDED TRUE
1927 /* Protocol filtering is an optional feature. Bydefault it will be turned on */
1928 #ifndef BNEP_SUPPORTS_PROT_FILTERS
1929 #define BNEP_SUPPORTS_PROT_FILTERS TRUE
1932 /* Multicast filtering is an optional feature. Bydefault it will be turned on */
1933 #ifndef BNEP_SUPPORTS_MULTI_FILTERS
1934 #define BNEP_SUPPORTS_MULTI_FILTERS TRUE
1937 /* BNEP status API call is used mainly to get the L2CAP handle */
1938 #ifndef BNEP_SUPPORTS_STATUS_API
1939 #define BNEP_SUPPORTS_STATUS_API TRUE
1942 /* This is just a debug function */
1943 #ifndef BNEP_SUPPORTS_DEBUG_DUMP
1944 #define BNEP_SUPPORTS_DEBUG_DUMP TRUE
1947 #ifndef BNEP_SUPPORTS_ALL_UUID_LENGTHS
1948 #define BNEP_SUPPORTS_ALL_UUID_LENGTHS TRUE /* Otherwise it will support only 16bit UUIDs */
1952 ** When BNEP connection changes roles after the connection is established
1953 ** we will do an authentication check again on the new role
1955 #ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH
1956 #define BNEP_DO_AUTH_FOR_ROLE_SWITCH TRUE
1960 /* Maximum number of protocol filters supported. */
1961 #ifndef BNEP_MAX_PROT_FILTERS
1962 #define BNEP_MAX_PROT_FILTERS 5
1965 /* Maximum number of multicast filters supported. */
1966 #ifndef BNEP_MAX_MULTI_FILTERS
1967 #define BNEP_MAX_MULTI_FILTERS 5
1970 /* Minimum MTU size. */
1971 #ifndef BNEP_MIN_MTU_SIZE
1972 #define BNEP_MIN_MTU_SIZE L2CAP_MTU_SIZE
1975 /* Preferred MTU size. */
1976 #ifndef BNEP_MTU_SIZE
1977 #define BNEP_MTU_SIZE BNEP_MIN_MTU_SIZE
1980 /* Maximum size of user data, in bytes. */
1981 #ifndef BNEP_MAX_USER_DATA_SIZE
1982 #define BNEP_MAX_USER_DATA_SIZE 1500
1985 /* Maximum number of buffers allowed in transmit data queue. */
1986 #ifndef BNEP_MAX_XMITQ_DEPTH
1987 #define BNEP_MAX_XMITQ_DEPTH 20
1990 /* Maximum number BNEP of connections supported. */
1991 #ifndef BNEP_MAX_CONNECTIONS
1992 #define BNEP_MAX_CONNECTIONS 7
1996 /******************************************************************************
2000 ******************************************************************************/
2002 #ifndef AVDT_INCLUDED
2003 #define AVDT_INCLUDED TRUE
2006 /* Include reporting capability in AVDTP */
2007 #ifndef AVDT_REPORTING
2008 #define AVDT_REPORTING TRUE
2011 /* Include multiplexing capability in AVDTP */
2012 #ifndef AVDT_MULTIPLEXING
2013 #define AVDT_MULTIPLEXING TRUE
2016 /* Number of simultaneous links to different peer devices. */
2017 #ifndef AVDT_NUM_LINKS
2018 #define AVDT_NUM_LINKS 2
2021 /* Number of simultaneous stream endpoints. */
2022 #ifndef AVDT_NUM_SEPS
2023 #define AVDT_NUM_SEPS 3
2026 /* Number of transport channels setup per media stream(audio or video) */
2027 #ifndef AVDT_NUM_CHANNELS
2029 #if AVDT_REPORTING == TRUE
2030 /* signaling, media and reporting channels */
2031 #define AVDT_NUM_CHANNELS 3
2033 /* signaling and media channels */
2034 #define AVDT_NUM_CHANNELS 2
2039 /* Number of transport channels setup by AVDT for all media streams
2040 * AVDT_NUM_CHANNELS * Number of simultaneous streams.
2042 #ifndef AVDT_NUM_TC_TBL
2043 #define AVDT_NUM_TC_TBL 6
2047 /* Maximum size in bytes of the codec capabilities information element. */
2048 #ifndef AVDT_CODEC_SIZE
2049 #define AVDT_CODEC_SIZE 10
2052 /* Maximum size in bytes of the content protection information element. */
2053 #ifndef AVDT_PROTECT_SIZE
2054 #define AVDT_PROTECT_SIZE 90
2057 /* Maximum number of GKI buffers in the fragment queue (for video frames).
2058 * Must be less than the number of buffers in the buffer pool of size AVDT_DATA_POOL_SIZE */
2059 #ifndef AVDT_MAX_FRAG_COUNT
2060 #define AVDT_MAX_FRAG_COUNT 15
2063 /******************************************************************************
2067 ******************************************************************************/
2069 #ifndef PAN_INCLUDED
2070 #define PAN_INCLUDED TRUE
2073 /* This will enable the PANU role */
2074 #ifndef PAN_SUPPORTS_ROLE_PANU
2075 #define PAN_SUPPORTS_ROLE_PANU TRUE
2078 /* This will enable the GN role */
2079 #ifndef PAN_SUPPORTS_ROLE_GN
2080 #define PAN_SUPPORTS_ROLE_GN TRUE
2083 /* This will enable the NAP role */
2084 #ifndef PAN_SUPPORTS_ROLE_NAP
2085 #define PAN_SUPPORTS_ROLE_NAP TRUE
2088 /* This is just for debugging purposes */
2089 #ifndef PAN_SUPPORTS_DEBUG_DUMP
2090 #define PAN_SUPPORTS_DEBUG_DUMP TRUE
2094 /* Maximum number of PAN connections allowed */
2095 #ifndef MAX_PAN_CONNS
2096 #define MAX_PAN_CONNS 7
2099 /* Default service name for NAP role */
2100 #ifndef PAN_NAP_DEFAULT_SERVICE_NAME
2101 #define PAN_NAP_DEFAULT_SERVICE_NAME "Network Access Point Service"
2104 /* Default service name for GN role */
2105 #ifndef PAN_GN_DEFAULT_SERVICE_NAME
2106 #define PAN_GN_DEFAULT_SERVICE_NAME "Group Network Service"
2109 /* Default service name for PANU role */
2110 #ifndef PAN_PANU_DEFAULT_SERVICE_NAME
2111 #define PAN_PANU_DEFAULT_SERVICE_NAME "PAN User Service"
2114 /* Default description for NAP role service */
2115 #ifndef PAN_NAP_DEFAULT_DESCRIPTION
2116 #define PAN_NAP_DEFAULT_DESCRIPTION "NAP"
2119 /* Default description for GN role service */
2120 #ifndef PAN_GN_DEFAULT_DESCRIPTION
2121 #define PAN_GN_DEFAULT_DESCRIPTION "GN"
2124 /* Default description for PANU role service */
2125 #ifndef PAN_PANU_DEFAULT_DESCRIPTION
2126 #define PAN_PANU_DEFAULT_DESCRIPTION "PANU"
2129 /* Default Security level for PANU role. */
2130 #ifndef PAN_PANU_SECURITY_LEVEL
2131 #define PAN_PANU_SECURITY_LEVEL 0
2134 /* Default Security level for GN role. */
2135 #ifndef PAN_GN_SECURITY_LEVEL
2136 #define PAN_GN_SECURITY_LEVEL 0
2139 /* Default Security level for NAP role. */
2140 #ifndef PAN_NAP_SECURITY_LEVEL
2141 #define PAN_NAP_SECURITY_LEVEL 0
2147 /******************************************************************************
2151 ******************************************************************************/
2153 #ifndef GAP_INCLUDED
2154 #define GAP_INCLUDED TRUE
2157 /* This is set to enable use of GAP L2CAP connections. */
2158 #ifndef GAP_CONN_INCLUDED
2159 #define GAP_CONN_INCLUDED TRUE
2162 /* This is set to enable posting event for data write */
2163 #ifndef GAP_CONN_POST_EVT_INCLUDED
2164 #define GAP_CONN_POST_EVT_INCLUDED FALSE
2167 /* The maximum number of simultaneous GAP L2CAP connections. */
2168 #ifndef GAP_MAX_CONNECTIONS
2169 #define GAP_MAX_CONNECTIONS 8
2172 /******************************************************************************
2176 ******************************************************************************/
2178 #ifndef CTP_INCLUDED
2179 #define CTP_INCLUDED FALSE
2182 /* To include CTP gateway functionality or not. */
2183 #ifndef CTP_GW_INCLUDED
2184 #define CTP_GW_INCLUDED TRUE
2187 /* The number of terminals supported. */
2188 #ifndef CTP_MAX_NUM_TLS
2189 #define CTP_MAX_NUM_TLS 7
2192 /* If the controller can not support sniff mode when the SCO is up, set this to FALSE. */
2193 #ifndef CTP_USE_SNIFF_ON_SCO
2194 #define CTP_USE_SNIFF_ON_SCO FALSE
2197 /* When ACL link between TL and GW is idle for more than this amount of seconds, the ACL may be put to low power mode. */
2198 #ifndef CTP_TL_IDLE_TIMEOUT
2199 #define CTP_TL_IDLE_TIMEOUT 90
2202 /* To include CTP terminal functionality or not. */
2203 #ifndef CTP_TL_INCLUDED
2204 #define CTP_TL_INCLUDED TRUE
2207 /* To include CTP device discovery functionality or not. */
2208 #ifndef CTP_DISCOVERY_INCLUDED
2209 #define CTP_DISCOVERY_INCLUDED TRUE
2212 /* set to TRUE for controllers that do not support multi-point */
2213 #ifndef CTP_TL_WAIT_DISC
2214 #define CTP_TL_WAIT_DISC TRUE
2217 /* The CTP inquiry database size. */
2218 #ifndef CTP_INQ_DB_SIZE
2219 #define CTP_INQ_DB_SIZE CTP_DISC_REC_SIZE
2222 /* The CTP discovery record size. */
2223 #ifndef CTP_DISC_REC_SIZE
2224 #define CTP_DISC_REC_SIZE 60
2227 /* CTP TL would try to re-establish L2CAP channel after channel is disconnected for this amount of seconds. */
2228 #ifndef CTP_GUARD_LINK_LOST
2229 #define CTP_GUARD_LINK_LOST 1
2232 /* The link policy bitmap. */
2233 #ifndef CTP_DEFAULT_LINK_POLICY
2234 #define CTP_DEFAULT_LINK_POLICY 0x000F
2237 /* The minimum period interval used for the sniff and park modes. */
2238 #ifndef CTP_DEF_LOWPWR_MIN_PERIOD
2239 #define CTP_DEF_LOWPWR_MIN_PERIOD 0x100
2242 /* The maximum period interval used for the sniff and park modes. */
2243 #ifndef CTP_DEF_LOWPWR_MAX_PERIOD
2244 #define CTP_DEF_LOWPWR_MAX_PERIOD 0x1E0
2247 /* The number of baseband receive slot sniff attempts. */
2248 #ifndef CTP_DEF_LOWPWR_ATTEMPT
2249 #define CTP_DEF_LOWPWR_ATTEMPT 0x200
2252 /* The number of baseband receive slots for sniff timeout. */
2253 #ifndef CTP_DEF_LOWPWR_TIMEOUT
2254 #define CTP_DEF_LOWPWR_TIMEOUT 0x200
2257 /* This is set if CTP is to use park mode. */
2258 #ifndef CTP_PARK_INCLUDED
2259 #define CTP_PARK_INCLUDED TRUE
2262 /* This is set if CTP is to use sniff mode. */
2263 #ifndef CTP_SNIFF_INCLUDED
2264 #define CTP_SNIFF_INCLUDED TRUE
2267 /* To include CTP data exchange functionality or not. */
2268 #ifndef CTP_DATA_EXCHG_FEATURE
2269 #define CTP_DATA_EXCHG_FEATURE FALSE
2272 /* To include CTP GW intercom functionality or not. */
2273 #ifndef CTP_GW_INTERCOM_FEATURE
2274 #define CTP_GW_INTERCOM_FEATURE FALSE
2277 /* The MTU size for L2CAP channel. */
2278 #ifndef CTP_MTU_SIZE
2279 #define CTP_MTU_SIZE 200
2282 /* The L2CAP PSM for the data exchange feature. */
2283 #ifndef CTP_DATA_EXCHG_PSM
2284 #define CTP_DATA_EXCHG_PSM 13
2287 /* The flush timeout for L2CAP channels. */
2288 #ifndef CTP_FLUSH_TO
2289 #define CTP_FLUSH_TO 0xFFFF
2292 /* The default service name for CTP. */
2293 #ifndef CTP_DEFAULT_SERVICE_NAME
2294 #define CTP_DEFAULT_SERVICE_NAME "Cordless Telephony"
2297 /* The CTP security level. */
2298 #ifndef CTP_SECURITY_LEVEL
2299 #define CTP_SECURITY_LEVEL (BTM_SEC_IN_AUTHORIZE | BTM_SEC_IN_AUTHENTICATE | BTM_SEC_IN_ENCRYPT)
2302 /* The number of lines to the external network. */
2303 #ifndef CTP_MAX_LINES
2304 #define CTP_MAX_LINES 1
2307 /* Test if the number of resources in TCS is consistent with CTP setting. */
2308 #ifndef CTP_TEST_FULL_TCS
2309 #define CTP_TEST_FULL_TCS TRUE
2312 /* The default inquiry mode. */
2313 #ifndef CTP_DEFAULT_INQUIRY_MODE
2314 #define CTP_DEFAULT_INQUIRY_MODE BTM_GENERAL_INQUIRY
2317 /* The default inquiry duration. */
2318 #ifndef CTP_DEFAULT_INQ_DURATION
2319 #define CTP_DEFAULT_INQ_DURATION 4
2322 /* The maximum number of inquiry responses. */
2323 #ifndef CTP_DEFAULT_INQ_MAX_RESP
2324 #define CTP_DEFAULT_INQ_MAX_RESP 3
2327 /* When TL does not create another L2CAP channel within this period of time GW declares that it's "Connected Limited". */
2328 #ifndef CTP_TL_CONN_TIMEOUT
2329 #define CTP_TL_CONN_TIMEOUT 5
2332 /* The delay for ACL to completely disconnect (for intercom) before sending the connect request to GW. */
2333 #ifndef CTP_RECONNECT_DELAY
2334 #define CTP_RECONNECT_DELAY 5
2337 /* How many times to retry connection when it has failed. */
2338 #ifndef CTP_RETRY_ON_CONN_ERR
2339 #define CTP_RETRY_ON_CONN_ERR 5
2342 /******************************************************************************
2346 ******************************************************************************/
2348 #ifndef ICP_INCLUDED
2349 #define ICP_INCLUDED FALSE
2352 /* The ICP default MTU. */
2353 #ifndef ICP_MTU_SIZE
2354 #define ICP_MTU_SIZE 100
2357 /* The ICP security level. */
2358 #ifndef ICP_SECURITY_LEVEL
2359 #define ICP_SECURITY_LEVEL BTM_SEC_NONE
2362 /* The default service name for ICP. */
2363 #ifndef ICP_DEFAULT_SERVICE_NAME
2364 #define ICP_DEFAULT_SERVICE_NAME "Intercom"
2367 /* The flush timeout for L2CAP channels. */
2368 #ifndef ICP_FLUSH_TO
2369 #define ICP_FLUSH_TO 0xFFFF
2372 /******************************************************************************
2376 ******************************************************************************/
2378 #ifndef SPP_INCLUDED
2379 #define SPP_INCLUDED FALSE
2382 /* The SPP default MTU. */
2383 #ifndef SPP_DEFAULT_MTU
2384 #define SPP_DEFAULT_MTU 127
2387 /* The interval, in seconds, that a client tries to reconnect to a service. */
2388 #ifndef SPP_RETRY_CONN_INTERVAL
2389 #define SPP_RETRY_CONN_INTERVAL 1
2392 /* The SPP discoverable mode: limited or general. */
2393 #ifndef SPP_DISCOVERABLE_MODE
2394 #define SPP_DISCOVERABLE_MODE BTM_GENERAL_DISCOVERABLE
2397 /* The maximum number of inquiry results returned in by inquiry procedure. */
2398 #ifndef SPP_DEF_INQ_MAX_RESP
2399 #define SPP_DEF_INQ_MAX_RESP 10
2402 /* The SPP discovery record size. */
2403 #ifndef SPP_DISC_REC_SIZE
2404 #define SPP_DISC_REC_SIZE 60
2407 #ifndef SPP_MAX_RECS_PER_DEVICE
2408 #define SPP_MAX_RECS_PER_DEVICE (SPP_DB_SIZE / SPP_DISC_REC_SIZE)
2411 /* Inquiry duration in 1.28 second units. */
2412 #ifndef SPP_DEF_INQ_DURATION
2413 #define SPP_DEF_INQ_DURATION 9
2416 /* keep the raw data received from SDP server in database. */
2417 #ifndef SDP_RAW_DATA_INCLUDED
2418 #define SDP_RAW_DATA_INCLUDED TRUE
2421 /* TRUE, to allow JV to create L2CAP connection on SDP PSM. */
2422 #ifndef SDP_FOR_JV_INCLUDED
2423 #define SDP_FOR_JV_INCLUDED FALSE
2426 /* Inquiry duration in 1.28 second units. */
2428 #define SDP_DEBUG TRUE
2431 /******************************************************************************
2435 ******************************************************************************/
2437 #ifndef HSP2_INCLUDED
2438 #define HSP2_INCLUDED FALSE
2441 /* Include the ability to perform inquiry for peer devices. */
2442 #ifndef HSP2_INQUIRY_INCLUDED
2443 #define HSP2_INQUIRY_INCLUDED TRUE
2446 /* Include Audio Gateway specific code. */
2447 #ifndef HSP2_AG_INCLUDED
2448 #define HSP2_AG_INCLUDED TRUE
2451 /* Include Headset Specific Code. */
2452 #ifndef HSP2_HS_INCLUDED
2453 #define HSP2_HS_INCLUDED TRUE
2456 /* Include the ability to open an SCO connection for In-Band Ringing. */
2457 #ifndef HSP2_IB_RING_INCLUDED
2458 #define HSP2_IB_RING_INCLUDED TRUE
2461 /* Include the ability to repeat a ring. */
2462 #ifndef HSP2_AG_REPEAT_RING
2463 #define HSP2_AG_REPEAT_RING TRUE
2466 #ifndef HSP2_APP_CLOSES_ON_CKPD
2467 #define HSP2_APP_CLOSES_ON_CKPD FALSE
2471 /* Include the ability to park a connection. */
2472 #ifndef HSP2_PARK_INCLUDED
2473 #define HSP2_PARK_INCLUDED TRUE
2476 /* Include HSP State Machine debug trace messages. */
2477 #ifndef HSP2_FSM_DEBUG
2478 #define HSP2_FSM_DEBUG TRUE
2481 /* The Module's Inquiry Scan Window. */
2482 #ifndef HSP2_INQ_SCAN_WINDOW
2483 #define HSP2_INQ_SCAN_WINDOW 0
2486 /* The Module's Inquiry Scan Interval. */
2487 #ifndef HSP2_INQ_SCAN_INTERVAL
2488 #define HSP2_INQ_SCAN_INTERVAL 0
2491 /* The Module's Page Scan Interval. */
2492 #ifndef HSP2_PAGE_SCAN_INTERVAL
2493 #define HSP2_PAGE_SCAN_INTERVAL 0
2496 /* The Module's Page Scan Window. */
2497 #ifndef HSP2_PAGE_SCAN_WINDOW
2498 #define HSP2_PAGE_SCAN_WINDOW 0
2501 /* The Park Mode's Minimum Beacon Period. */
2502 #ifndef HSP2_BEACON_MIN_PERIOD
2503 #define HSP2_BEACON_MIN_PERIOD 450
2506 /* The Park Mode's Maximum Beacon Period. */
2507 #ifndef HSP2_BEACON_MAX_PERIOD
2508 #define HSP2_BEACON_MAX_PERIOD 500
2511 /* The duration of the inquiry in seconds. */
2512 #ifndef HSP2_INQ_DURATION
2513 #define HSP2_INQ_DURATION 4
2516 /* Maximum number of peer responses during an inquiry. */
2517 #ifndef HSP2_INQ_MAX_NUM_RESPS
2518 #define HSP2_INQ_MAX_NUM_RESPS 3
2521 /* Maximum number of times to retry an inquiry prior to failure. */
2522 #ifndef HSP2_MAX_INQ_RETRY
2523 #define HSP2_MAX_INQ_RETRY 6
2526 /* Maximum number of times to retry an RFCOMM connection prior to failure. */
2527 #ifndef HSP2_MAX_CONN_RETRY
2528 #define HSP2_MAX_CONN_RETRY 3
2531 /* If the connect request failed for authentication reasons, do not retry */
2532 #ifndef HSP2_NO_RETRY_ON_AUTH_FAIL
2533 #define HSP2_NO_RETRY_ON_AUTH_FAIL TRUE
2536 /* Maximum number of characters in an HSP2 device name. */
2537 #ifndef HSP2_MAX_NAME_LEN
2538 #define HSP2_MAX_NAME_LEN 32
2541 /* The minimum speaker and/or microphone gain setting. */
2542 #ifndef HSP2_MIN_GAIN
2543 #define HSP2_MIN_GAIN 0
2546 /* The maximum speaker and/or microphone setting. */
2547 #ifndef HSP2_MAX_GAIN
2548 #define HSP2_MAX_GAIN 15
2551 /* The default value to send on an AT+CKPD. */
2552 #ifndef HSP2_KEYPRESS_DEFAULT
2553 #define HSP2_KEYPRESS_DEFAULT 200
2556 /* Maximum amount a data that can be received per RFCOMM frame. */
2557 #ifndef HSP2_MAX_RFC_READ_LEN
2558 #define HSP2_MAX_RFC_READ_LEN 128
2561 /* The time in seconds to wait for completion of a partial AT command or response from the peer. */
2562 #ifndef HSP2_AT_TO_INTERVAL
2563 #define HSP2_AT_TO_INTERVAL 30
2566 /* The time to wait before repeating a ring to a peer Headset. */
2567 #ifndef HSP2_REPEAT_RING_TO
2568 #define HSP2_REPEAT_RING_TO 4
2571 /* Time to wait for a response for an AT command */
2572 #ifndef HSP2_AT_RSP_TO
2573 #define HSP2_AT_RSP_TO 20
2576 /* SCO packet type(s) to use (bitmask: see spec), 0 - device default (recommended) */
2577 #ifndef HSP2_SCO_PKT_TYPES
2578 #define HSP2_SCO_PKT_TYPES ((UINT16)0x0000)
2581 /* The default settings of the SCO voice link. */
2582 #ifndef HSP2_DEFAULT_VOICE_SETTINGS
2583 #define HSP2_DEFAULT_VOICE_SETTINGS (HCI_INP_CODING_LINEAR | HCI_INP_DATA_FMT_2S_COMPLEMENT | HCI_INP_SAMPLE_SIZE_16BIT | HCI_AIR_CODING_FORMAT_CVSD)
2586 #ifndef HSP2_MAX_AT_CMD_LENGTH
2587 #define HSP2_MAX_AT_CMD_LENGTH 16
2590 #ifndef HSP2_MAX_AT_VAL_LENGTH
2591 #if (defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE)
2592 #define HSP2_MAX_AT_VAL_LENGTH 310
2594 #define HSP2_MAX_AT_VAL_LENGTH 5
2599 #ifndef HSP2_SDP_DB_SIZE
2600 #define HSP2_SDP_DB_SIZE 300
2604 /******************************************************************************
2608 ******************************************************************************/
2610 #ifndef HFP_INCLUDED
2611 #define HFP_INCLUDED FALSE
2614 /* Include Audio Gateway specific code. */
2615 #ifndef HFP_AG_INCLUDED
2616 #define HFP_AG_INCLUDED TRUE
2619 /* Include Hand Free Specific Code. */
2620 #ifndef HFP_HF_INCLUDED
2621 #define HFP_HF_INCLUDED TRUE
2624 /* Use AT interface instead of full blown API */
2625 #ifndef AT_INTERFACE
2626 #define AT_INTERFACE FALSE
2629 /* HFP Manages SCO establishement for various procedures */
2630 #ifndef HFP_SCO_MGMT_INCLUDED
2631 #define HFP_SCO_MGMT_INCLUDED TRUE
2634 /* CCAP compliant features and behavior desired */
2635 #ifndef CCAP_COMPLIANCE
2636 #define CCAP_COMPLIANCE TRUE
2639 /* Caller ID string, part of +CLIP result code */
2640 #ifndef HFP_MAX_CLIP_INFO
2641 #define HFP_MAX_CLIP_INFO 45
2644 #ifndef HFP_RPT_PEER_INFO_INCLUDED
2645 #define HFP_RPT_PEER_INFO_INCLUDED TRUE /* Reporting of peer features enabled */
2648 /******************************************************************************
2652 ******************************************************************************/
2654 /* HID Device Role Included */
2655 #ifndef HID_DEV_INCLUDED
2656 #define HID_DEV_INCLUDED FALSE
2659 #ifndef HID_DEV_PM_INCLUDED
2660 #define HID_DEV_PM_INCLUDED TRUE
2663 /* The HID Device is a virtual cable */
2664 #ifndef HID_DEV_VIRTUAL_CABLE
2665 #define HID_DEV_VIRTUAL_CABLE TRUE
2668 /* The HID device initiates the reconnections */
2669 #ifndef HID_DEV_RECONN_INITIATE
2670 #define HID_DEV_RECONN_INITIATE TRUE
2673 /* THe HID device is normally connectable */
2674 #ifndef HID_DEV_NORMALLY_CONN
2675 #define HID_DEV_NORMALLY_CONN FALSE
2678 /* The device is battery powered */
2679 #ifndef HID_DEV_BATTERY_POW
2680 #define HID_DEV_BATTERY_POW TRUE
2683 /* Device is capable of waking up the host */
2684 #ifndef HID_DEV_REMOTE_WAKE
2685 #define HID_DEV_REMOTE_WAKE TRUE
2688 /* Device needs host to close SDP channel after SDP is over */
2689 #ifndef HID_DEV_SDP_DISABLE
2690 #define HID_DEV_SDP_DISABLE TRUE
2693 #ifndef HID_DEV_MTU_SIZE
2694 #define HID_DEV_MTU_SIZE 64
2697 #ifndef HID_DEV_FLUSH_TO
2698 #define HID_DEV_FLUSH_TO 0xffff
2701 #ifndef HID_DEV_PAGE_SCAN_WIN
2702 #define HID_DEV_PAGE_SCAN_WIN (0)
2705 #ifndef HID_DEV_PAGE_SCAN_INT
2706 #define HID_DEV_PAGE_SCAN_INT (0)
2709 #ifndef HID_DEV_MAX_CONN_RETRY
2710 #define HID_DEV_MAX_CONN_RETRY (15)
2713 #ifndef HID_DEV_REPAGE_WIN
2714 #define HID_DEV_REPAGE_WIN (1)
2717 #ifndef HID_DEV_SVC_NAME
2718 #define HID_DEV_SVC_NAME "HID"
2721 #ifndef HID_DEV_SVC_DESCR
2722 #define HID_DEV_SVC_DESCR "3-button mouse and keyboard"
2725 #ifndef HID_DEV_PROVIDER_NAME
2726 #define HID_DEV_PROVIDER_NAME "Widcomm"
2729 #ifndef HID_DEV_REL_NUM
2730 #define HID_DEV_REL_NUM 0x0100
2733 #ifndef HID_DEV_PARSER_VER
2734 #define HID_DEV_PARSER_VER 0x0111
2737 #ifndef HID_DEV_SUBCLASS
2738 #define HID_DEV_SUBCLASS COD_MINOR_POINTING
2741 #ifndef HID_DEV_COUNTRY_CODE
2742 #define HID_DEV_COUNTRY_CODE 0x33
2745 #ifndef HID_DEV_SUP_TOUT
2746 #define HID_DEV_SUP_TOUT 0x8000
2749 #ifndef HID_DEV_NUM_LANGS
2750 #define HID_DEV_NUM_LANGS 1
2753 #ifndef HID_DEV_INACT_TIMEOUT
2754 #define HID_DEV_INACT_TIMEOUT 60
2757 #ifndef HID_DEV_BUSY_MODE_PARAMS
2758 #define HID_DEV_BUSY_MODE_PARAMS { 320, 160, 10, 20, HCI_MODE_ACTIVE }
2761 #ifndef HID_DEV_IDLE_MODE_PARAMS
2762 #define HID_DEV_IDLE_MODE_PARAMS { 320, 160, 10, 20, HCI_MODE_SNIFF }
2765 #ifndef HID_DEV_SUSP_MODE_PARAMS
2766 #define HID_DEV_SUSP_MODE_PARAMS { 640, 320, 0, 0, HCI_MODE_PARK }
2769 #ifndef HID_DEV_MAX_DESCRIPTOR_SIZE
2770 #define HID_DEV_MAX_DESCRIPTOR_SIZE 128 /* Max descriptor size */
2773 #ifndef HID_DEV_LANGUAGELIST
2774 #define HID_DEV_LANGUAGELIST {0x35, 0x06, 0x09, 0x04, 0x09, 0x09, 0x01, 0x00}
2777 #ifndef HID_DEV_LINK_SUPERVISION_TO
2778 #define HID_DEV_LINK_SUPERVISION_TO 0x8000
2781 #ifndef HID_CONTROL_POOL_ID
2782 #define HID_CONTROL_POOL_ID 2
2785 #ifndef HID_INTERRUPT_POOL_ID
2786 #define HID_INTERRUPT_POOL_ID 2
2789 /*************************************************************************
2790 ** Definitions for Both HID-Host & Device
2792 #ifndef HID_MAX_SVC_NAME_LEN
2793 #define HID_MAX_SVC_NAME_LEN 32
2796 #ifndef HID_MAX_SVC_DESCR_LEN
2797 #define HID_MAX_SVC_DESCR_LEN 32
2800 #ifndef HID_MAX_PROV_NAME_LEN
2801 #define HID_MAX_PROV_NAME_LEN 32
2804 /*************************************************************************
2805 ** Definitions for HID-Host
2807 #ifndef HID_HOST_INCLUDED
2808 #define HID_HOST_INCLUDED TRUE
2811 #ifndef HID_HOST_MAX_DEVICES
2812 #define HID_HOST_MAX_DEVICES 7
2815 #ifndef HID_HOST_MTU
2816 #define HID_HOST_MTU 640
2819 #ifndef HID_HOST_FLUSH_TO
2820 #define HID_HOST_FLUSH_TO 0xffff
2823 #ifndef HID_HOST_MAX_CONN_RETRY
2824 #define HID_HOST_MAX_CONN_RETRY (3)
2827 #ifndef HID_HOST_REPAGE_WIN
2828 #define HID_HOST_REPAGE_WIN (2)
2832 /******************************************************************************
2836 ******************************************************************************/
2838 #ifndef DUN_INCLUDED
2839 #define DUN_INCLUDED FALSE
2843 /******************************************************************************
2847 ******************************************************************************/
2849 #ifndef GOEP_INCLUDED
2850 #define GOEP_INCLUDED FALSE
2853 /* This is set to enable GOEP non-blocking file system access functions. */
2854 #ifndef GOEP_FS_INCLUDED
2855 #define GOEP_FS_INCLUDED FALSE
2858 /* GOEP authentication key size. */
2859 #ifndef GOEP_MAX_AUTH_KEY_SIZE
2860 #define GOEP_MAX_AUTH_KEY_SIZE 16
2863 /* Maximum size of the realm authentication string. */
2864 #ifndef GOEP_MAX_AUTH_REALM_SIZE
2865 #define GOEP_MAX_AUTH_REALM_SIZE 16
2868 /* Realm Character Set */
2869 #ifndef GOEP_REALM_CHARSET
2870 #define GOEP_REALM_CHARSET 0 /* ASCII */
2873 /* This is set to the maximum length of path name allowed in the system (_MAX_PATH). */
2874 #ifndef GOEP_MAX_PATH_SIZE
2875 #define GOEP_MAX_PATH_SIZE 255
2878 /* Specifies whether or not client's user id is required during obex authentication */
2879 #ifndef GOEP_SERVER_USERID_REQUIRED
2880 #define GOEP_SERVER_USERID_REQUIRED FALSE
2883 /* This is set to the maximum length of file name allowed in the system (_MAX_FNAME). */
2884 #ifndef GOEP_MAX_FILE_SIZE
2885 #define GOEP_MAX_FILE_SIZE 128
2888 /* Character used as path separator */
2889 #ifndef GOEP_PATH_SEPARATOR
2890 #define GOEP_PATH_SEPARATOR ((char) 0x5c) /* 0x2f ('/'), or 0x5c ('\') */
2893 /******************************************************************************
2897 ******************************************************************************/
2899 #ifndef OPP_INCLUDED
2900 #define OPP_INCLUDED FALSE
2903 /* This is set to enable OPP client capabilities. */
2904 #ifndef OPP_CLIENT_INCLUDED
2905 #define OPP_CLIENT_INCLUDED FALSE
2908 /* This is set to enable OPP server capabilities. */
2909 #ifndef OPP_SERVER_INCLUDED
2910 #define OPP_SERVER_INCLUDED FALSE
2913 /* if the optional formating functions are to be included or not */
2914 #ifndef OPP_FORMAT_INCLUDED
2915 #define OPP_FORMAT_INCLUDED FALSE
2918 /* Maximum number of client sessions allowed by server */
2919 #ifndef OPP_MAX_SRVR_SESS
2920 #define OPP_MAX_SRVR_SESS 3
2923 /******************************************************************************
2927 ******************************************************************************/
2929 #ifndef FTP_INCLUDED
2930 #define FTP_INCLUDED FALSE
2933 /* This is set to enable FTP client capabilities. */
2934 #ifndef FTP_CLIENT_INCLUDED
2935 #define FTP_CLIENT_INCLUDED TRUE
2938 /* This is set to enable FTP server capabilities. */
2939 #ifndef FTP_SERVER_INCLUDED
2940 #define FTP_SERVER_INCLUDED TRUE
2943 /******************************************************************************
2947 ******************************************************************************/
2949 #ifndef XML_STACK_SIZE
2950 #define XML_STACK_SIZE 7
2953 /******************************************************************************
2957 ******************************************************************************/
2959 #define BPP_DEBUG FALSE
2962 #ifndef BPP_INCLUDED
2963 #define BPP_INCLUDED FALSE
2966 #ifndef BPP_SND_INCLUDED
2967 #define BPP_SND_INCLUDED FALSE
2970 /* Maximum number of senders allowed to connect simultaneously
2971 ** The maximum is 6 or (OBX_NUM_SERVERS / 2), whichever is smaller
2973 #ifndef BPP_PR_MAX_CON
2974 #define BPP_PR_MAX_CON 3
2977 /* Service Name. maximum length: 248
2978 #ifndef BPP_SERVICE_NAME
2979 #define BPP_SERVICE_NAME "Basic Printing"
2982 /* Document Format Supported. ASCII comma-delimited list of MIME type:version string
2983 #ifndef BPP_DOC_FORMAT_SUPPORTED
2984 #define BPP_DOC_FORMAT_SUPPORTED "application/vnd.pwg-xhtml-print:1.0,application/vnd.hp-PCL:5E,application/PDF"
2987 #ifndef BPP_DOC_FORMAT_SUPPORTED_LEN
2988 #define BPP_DOC_FORMAT_SUPPORTED_LEN 77
2991 /* Character repertoires.
2992 #ifndef BPP_CHARACTER_REPERTOIRES
2993 #define BPP_CHARACTER_REPERTOIRES {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}
2997 #ifndef BPP_XHTML_PRINT_FORMATS
2998 #define BPP_XHTML_PRINT_FORMATS "image/gif:89A,image/jpeg"
3001 #ifndef BPP_XHTML_PRINT_FORMATS_LEN
3002 #define BPP_XHTML_PRINT_FORMATS_LEN 24
3006 #ifndef BPP_COLOR_SUPORTED
3007 #define BPP_COLOR_SUPORTED FALSE
3010 /* 1284 ID string. First 2 bytes are the length.
3012 #define BPP_1284ID "\x00\x48MANUFACTURER:ACME Manufacturing;COMMAND SET:PCL,MPL;MODEL:LaserBeam \?;"
3015 #ifndef BPP_1284ID_LEN
3016 #define BPP_1284ID_LEN 72
3020 #ifndef BPP_PRINTER_NAME
3021 #define BPP_PRINTER_NAME "My Printer"
3024 #ifndef BPP_PRINTER_NAME_LEN
3025 #define BPP_PRINTER_NAME_LEN 10
3029 /* Printer location.
3030 #ifndef BPP_PRINTER_LOCATION
3031 #define BPP_PRINTER_LOCATION "Hotel Lobby"
3034 #ifndef BPP_PRINTER_LOCATION_LEN
3035 #define BPP_PRINTER_LOCATION_LEN 11
3038 /* Duplex printing supported.
3039 #ifndef BPP_DUPLEX_SUPPORTED
3040 #define BPP_DUPLEX_SUPPORTED TRUE
3044 /* Media types supported.
3045 #ifndef BPP_MEDIA_TYPES_SUPPORTED
3046 #define BPP_MEDIA_TYPES_SUPPORTED "stationary,continuous-long,photographic-high-gloss,cardstock"
3049 #ifndef BPP_MEDIA_TYPES_SUPPORTED_LEN
3050 #define BPP_MEDIA_TYPES_SUPPORTED_LEN 60
3053 /* Maximum media with supported.
3054 #ifndef BPP_MAX_MEDIA_WIDTH
3055 #define BPP_MAX_MEDIA_WIDTH 205
3058 /* Maximum media length supported.
3059 #ifndef BPP_MAX_MEDIA_LENGTH
3060 #define BPP_MAX_MEDIA_LENGTH 285
3063 /* the maximum string len for the media size of medium loaded */
3064 #ifndef BPP_MEDIA_SIZE_LEN
3065 #define BPP_MEDIA_SIZE_LEN 33
3068 /* Debug Trace the SOAP object, if TRUE */
3069 #ifndef BPP_TRACE_XML
3070 #define BPP_TRACE_XML TRUE
3073 /* in case that the SOAP object does not all come in one OBEX packet,
3074 * this size of data may be kept in the BPP control block for continuing parsing.
3075 * The maximum is the size of the biggest GKI buffer (GKI_MAX_BUF_SIZE) */
3076 #ifndef BPP_SOAP_KEEP_SIZE
3077 #define BPP_SOAP_KEEP_SIZE 200
3081 /******************************************************************************
3085 ******************************************************************************/
3086 #ifndef BIP_INCLUDED
3087 #define BIP_INCLUDED FALSE
3090 /* TRUE to include imaging initiator */
3091 #ifndef BIP_INITR_INCLUDED
3092 #define BIP_INITR_INCLUDED FALSE
3095 /* TRUE to include imaging responder */
3096 #ifndef BIP_RSPDR_INCLUDED
3097 #define BIP_RSPDR_INCLUDED FALSE
3100 /* TRUE to include image push feature */
3101 #ifndef BIP_PUSH_INCLUDED
3102 #define BIP_PUSH_INCLUDED TRUE
3105 /* TRUE to include image pull feature */
3106 #ifndef BIP_PULL_INCLUDED
3107 #define BIP_PULL_INCLUDED TRUE
3110 /* TRUE to include advanced image printing feature */
3111 #ifndef BIP_PRINTING_INCLUDED
3112 #define BIP_PRINTING_INCLUDED TRUE
3115 /* TRUE to include automatic archive feature */
3116 #ifndef BIP_ARCHIVE_INCLUDED
3117 #define BIP_ARCHIVE_INCLUDED TRUE
3120 /* TRUE to include remote camera feature */
3121 #ifndef BIP_CAMERA_INCLUDED
3122 #define BIP_CAMERA_INCLUDED TRUE
3125 /* TRUE to include remote display feature */
3126 #ifndef BIP_DISPLAY_INCLUDED
3127 #define BIP_DISPLAY_INCLUDED TRUE
3130 /* TRUE to include sanity check code for API functions */
3131 #ifndef BIP_SANITY_CHECKS
3132 #define BIP_SANITY_CHECKS TRUE
3135 /* TRUE to show the received XML object in trace for conformance tests */
3136 #ifndef BIP_TRACE_XML
3137 #define BIP_TRACE_XML TRUE
3140 /* in case that the received XML object is not complete, the XML parser state machine needs
3141 * to keep a copy of the data from the last '<'
3142 * This macro specifies the maximun amount of data for this purpose */
3143 #ifndef BIP_XML_CARRY_OVER_LEN
3144 #define BIP_XML_CARRY_OVER_LEN 100
3147 /* minimum 4, maximum is 255. The value should be set to the maximum size of encoding string + 1. JPEG2000.
3148 * If vendor specific format is supported, it might be bigger than 9 */
3149 #ifndef BIP_IMG_ENCODE_SIZE
3150 #define BIP_IMG_ENCODE_SIZE 9
3153 /* MIME type: text/plain */
3154 #ifndef BIP_TYPE_SIZE
3155 #define BIP_TYPE_SIZE 20
3158 /* example: iso-8895-1 */
3159 #ifndef BIP_CHARSET_SIZE
3160 #define BIP_CHARSET_SIZE 10
3164 #ifndef BIP_FNAME_SIZE
3165 #define BIP_FNAME_SIZE 20
3169 #ifndef BIP_SNAME_SIZE
3170 #define BIP_SNAME_SIZE 60
3173 /* temporary storage file name(for file system access, may include path) */
3174 #ifndef BIP_TEMP_NAME_SIZE
3175 #define BIP_TEMP_NAME_SIZE 200
3178 /* image file name */
3179 #ifndef BIP_IMG_NAME_SIZE
3180 #define BIP_IMG_NAME_SIZE 200
3183 /* attachment file name */
3184 #ifndef BIP_ATT_NAME_SIZE
3185 #define BIP_ATT_NAME_SIZE 200
3188 /* object (image, attachment, thumbnail) file name (may be used for file system) */
3189 #ifndef BIP_OBJ_NAME_SIZE
3190 #define BIP_OBJ_NAME_SIZE 200
3195 /******************************************************************************
3199 ******************************************************************************/
3201 #ifndef HCRP_INCLUDED
3202 #define HCRP_INCLUDED FALSE
3205 /* This is set to enable server. */
3206 #ifndef HCRP_SERVER_INCLUDED
3207 #define HCRP_SERVER_INCLUDED FALSE
3210 /* This is set to enable client. */
3211 #ifndef HCRP_CLIENT_INCLUDED
3212 #define HCRP_CLIENT_INCLUDED FALSE
3215 /* TRUE enables the notification option of the profile. */
3216 #ifndef HCRP_NOTIFICATION_INCLUDED
3217 #define HCRP_NOTIFICATION_INCLUDED TRUE
3220 /* TRUE enables the vendor specific option of the profile. */
3221 #ifndef HCRP_VENDOR_SPEC_INCLUDED
3222 #define HCRP_VENDOR_SPEC_INCLUDED TRUE
3225 /* TRUE enables state machine traces. */
3226 #ifndef HCRP_FSM_DEBUG
3227 #define HCRP_FSM_DEBUG FALSE
3230 /* TRUE enables protocol message traces. */
3231 #ifndef HCRP_PROTO_DEBUG
3232 #define HCRP_PROTO_DEBUG FALSE
3235 /* Maximum length used to store the service name (Minimum 1). */
3236 #ifndef HCRP_MAX_SERVICE_NAME_LEN
3237 #define HCRP_MAX_SERVICE_NAME_LEN 32
3240 /* Maximum length used to store the device name (Minimum 1). */
3241 #ifndef HCRP_MAX_DEVICE_NAME_LEN
3242 #define HCRP_MAX_DEVICE_NAME_LEN 32
3245 /* Maximum length of device location (Minimum 1) */
3246 #ifndef HCRP_MAX_DEVICE_LOC_LEN
3247 #define HCRP_MAX_DEVICE_LOC_LEN 32
3250 /* Maximum length used to store the friendly name (Minimum 1). */
3251 #ifndef HCRP_MAX_FRIENDLY_NAME_LEN
3252 #define HCRP_MAX_FRIENDLY_NAME_LEN 32
3255 /* Maximum length used to store the 1284 id string (Minimum 2 byte length field). */
3256 #ifndef HCRP_MAX_SDP_1284_ID_LEN
3257 #define HCRP_MAX_SDP_1284_ID_LEN 128
3260 /* Maximum length for parameters to be processed for vendor specific commands. */
3261 #ifndef HCRP_MAX_VEND_SPEC_LEN
3262 #define HCRP_MAX_VEND_SPEC_LEN 4
3265 /* Number of seconds to wait for 2nd GAP to open. */
3266 #ifndef HCRP_OPEN_CHAN_TOUT
3267 #define HCRP_OPEN_CHAN_TOUT 5
3270 /* Number of seconds to wait for 2nd GAP to close. */
3271 #ifndef HCRP_CLOSE_CHAN_TOUT
3272 #define HCRP_CLOSE_CHAN_TOUT 3
3275 /* Number of seconds to wait for the application to respond to a protocol request. */
3276 #ifndef HCRP_APPL_RSP_TOUT
3277 #define HCRP_APPL_RSP_TOUT 5
3280 /* Number of seconds to wait for the peer device to respond to a protocol request. */
3281 #ifndef HCRP_CMD_RSP_TOUT
3282 #define HCRP_CMD_RSP_TOUT 7
3285 /* Number of seconds between subsequent credit requests to the server when the send watermark has been exceeded. */
3286 #ifndef HCRP_CREDIT_REQ_UPDATES
3287 #define HCRP_CREDIT_REQ_UPDATES 1
3290 /* Maximum number of results to return in a HCRP_FindServices search. */
3291 #ifndef HCRP_MAX_SEARCH_RESULTS
3292 #define HCRP_MAX_SEARCH_RESULTS 1
3295 /* Maximum number of bytes to be reserved for searching for the client's notification record. */
3296 #ifndef HCRP_MAX_NOTIF_DISC_BUF
3297 #define HCRP_MAX_NOTIF_DISC_BUF 300
3300 /* Maximum number of clients the server will allow to be registered for notifications. */
3301 #ifndef HCRP_MAX_NOTIF_CLIENTS
3302 #define HCRP_MAX_NOTIF_CLIENTS 3
3305 /* Spec says minimum of two notification retries. */
3306 #ifndef HCRP_NOTIF_NUM_RETRIES
3307 #define HCRP_NOTIF_NUM_RETRIES 4
3310 /*************************************************************************
3311 ** Definitions for Multi-Client Server HCRP
3312 ** Note: Many of the above HCRP definitions are also used
3313 ** Maximum number of clients allowed to connect simultaneously
3314 ** Must be less than ((GAP_MAX_CONNECTIONS - 1) / 2)
3316 #ifndef HCRPM_MAX_CLIENTS
3317 #define HCRPM_MAX_CLIENTS 3
3321 /******************************************************************************
3325 ******************************************************************************/
3327 #ifndef PAN_INCLUDED
3328 #define PAN_INCLUDED FALSE
3332 /******************************************************************************
3336 ******************************************************************************/
3338 #ifndef SAP_SERVER_INCLUDED
3339 #define SAP_SERVER_INCLUDED FALSE
3342 /*************************************************************************
3345 #ifndef A2D_INCLUDED
3346 #define A2D_INCLUDED TRUE
3349 /* TRUE to include SBC utility functions */
3350 #ifndef A2D_SBC_INCLUDED
3351 #define A2D_SBC_INCLUDED A2D_INCLUDED
3354 /* TRUE to include MPEG-1,2 (mp3) utility functions */
3355 #ifndef A2D_M12_INCLUDED
3356 #define A2D_M12_INCLUDED A2D_INCLUDED
3359 /* TRUE to include MPEG-2,4 (aac) utility functions */
3360 #ifndef A2D_M24_INCLUDED
3361 #define A2D_M24_INCLUDED A2D_INCLUDED
3364 /******************************************************************************
3368 ******************************************************************************/
3370 #ifndef AVCT_INCLUDED
3371 #define AVCT_INCLUDED TRUE
3374 /* Number of simultaneous ACL links to different peer devices. */
3375 #ifndef AVCT_NUM_LINKS
3376 #define AVCT_NUM_LINKS 2
3379 /* Number of simultaneous AVCTP connections. */
3380 #ifndef AVCT_NUM_CONN
3381 #define AVCT_NUM_CONN 3
3384 /* Pool ID where to reassemble the SDU.
3385 This Pool allows buffers to be used that are larger than
3386 the L2CAP_MAX_MTU. */
3387 #ifndef AVCT_BR_USER_RX_POOL_ID
3388 #define AVCT_BR_USER_RX_POOL_ID HCI_ACL_POOL_ID
3391 /* Pool ID where to hold the SDU.
3392 This Pool allows buffers to be used that are larger than
3393 the L2CAP_MAX_MTU. */
3394 #ifndef AVCT_BR_USER_TX_POOL_ID
3395 #define AVCT_BR_USER_TX_POOL_ID HCI_ACL_POOL_ID
3399 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
3401 #ifndef AVCT_BR_FCR_RX_POOL_ID
3402 #define AVCT_BR_FCR_RX_POOL_ID HCI_ACL_POOL_ID
3406 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
3407 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
3408 Note: This pool needs to have enough buffers to hold two times the window size negotiated
3409 in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions.
3410 The size of each buffer must be able to hold the maximum MPS segment size passed in
3411 tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
3413 #ifndef AVCT_BR_FCR_TX_POOL_ID
3414 #define AVCT_BR_FCR_TX_POOL_ID HCI_ACL_POOL_ID
3417 /* AVCTP Browsing channel FCR Option:
3418 Size of the transmission window when using enhanced retransmission mode. Not used
3419 in basic and streaming modes. Range: 1 - 63
3421 #ifndef AVCT_BR_FCR_OPT_TX_WINDOW_SIZE
3422 #define AVCT_BR_FCR_OPT_TX_WINDOW_SIZE 10
3425 /* AVCTP Browsing channel FCR Option:
3426 Number of transmission attempts for a single I-Frame before taking
3427 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
3430 0 - infinite retransmissions
3431 1 - single transmission
3433 #ifndef AVCT_BR_FCR_OPT_MAX_TX_B4_DISCNT
3434 #define AVCT_BR_FCR_OPT_MAX_TX_B4_DISCNT 20
3437 /* AVCTP Browsing channel FCR Option: Retransmission Timeout
3438 The AVRCP specification set a value in the range of 300 - 2000 ms
3439 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
3440 Range: Minimum 2000 (2 secs) when supporting PBF.
3442 #ifndef AVCT_BR_FCR_OPT_RETX_TOUT
3443 #define AVCT_BR_FCR_OPT_RETX_TOUT 2000
3446 /* AVCTP Browsing channel FCR Option: Monitor Timeout
3447 The AVRCP specification set a value in the range of 300 - 2000 ms
3448 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
3449 Range: Minimum 12000 (12 secs) when supporting PBF.
3451 #ifndef AVCT_BR_FCR_OPT_MONITOR_TOUT
3452 #define AVCT_BR_FCR_OPT_MONITOR_TOUT 12000
3455 /******************************************************************************
3459 ******************************************************************************/
3461 #ifndef AVRC_INCLUDED
3462 #define AVRC_INCLUDED TRUE
3465 #ifndef AVRC_METADATA_INCLUDED
3466 #define AVRC_METADATA_INCLUDED TRUE
3469 #ifndef AVRC_ADV_CTRL_INCLUDED
3470 #define AVRC_ADV_CTRL_INCLUDED TRUE
3473 #ifndef AVRC_CTLR_INCLUDED
3474 #define AVRC_CTLR_INCLUDED TRUE
3477 /******************************************************************************
3481 ******************************************************************************/
3482 #ifndef MCA_INCLUDED
3483 #define MCA_INCLUDED FALSE
3486 /* TRUE to support Clock Synchronization OpCodes */
3487 #ifndef MCA_SYNC_INCLUDED
3488 #define MCA_SYNC_INCLUDED FALSE
3491 /* The MTU size for the L2CAP configuration on control channel. 48 is the minimal */
3492 #ifndef MCA_CTRL_MTU
3493 #define MCA_CTRL_MTU 60
3496 /* The maximum number of registered MCAP instances. */
3497 #ifndef MCA_NUM_REGS
3498 #define MCA_NUM_REGS 12
3501 /* The maximum number of control channels (to difference devices) per registered MCAP instances. */
3502 #ifndef MCA_NUM_LINKS
3503 #define MCA_NUM_LINKS 3
3506 /* The maximum number of MDEP (including HDP echo) per registered MCAP instances. */
3507 #ifndef MCA_NUM_DEPS
3508 #define MCA_NUM_DEPS 13
3511 /* The maximum number of MDL link per control channel. */
3512 #ifndef MCA_NUM_MDLS
3513 #define MCA_NUM_MDLS 4
3516 /* Pool ID where to reassemble the SDU. */
3517 #ifndef MCA_USER_RX_POOL_ID
3518 #define MCA_USER_RX_POOL_ID HCI_ACL_POOL_ID
3521 /* Pool ID where to hold the SDU. */
3522 #ifndef MCA_USER_TX_POOL_ID
3523 #define MCA_USER_TX_POOL_ID HCI_ACL_POOL_ID
3527 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
3529 #ifndef MCA_FCR_RX_POOL_ID
3530 #define MCA_FCR_RX_POOL_ID HCI_ACL_POOL_ID
3534 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
3535 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
3536 Note: This pool needs to have enough buffers to hold two times the window size negotiated
3537 in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions.
3538 The size of each buffer must be able to hold the maximum MPS segment size passed in
3539 tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
3541 #ifndef MCA_FCR_TX_POOL_ID
3542 #define MCA_FCR_TX_POOL_ID HCI_ACL_POOL_ID
3545 /* MCAP control channel FCR Option:
3546 Size of the transmission window when using enhanced retransmission mode.
3547 1 is defined by HDP specification for control channel.
3549 #ifndef MCA_FCR_OPT_TX_WINDOW_SIZE
3550 #define MCA_FCR_OPT_TX_WINDOW_SIZE 1
3553 /* MCAP control channel FCR Option:
3554 Number of transmission attempts for a single I-Frame before taking
3555 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
3558 0 - infinite retransmissions
3559 1 - single transmission
3561 #ifndef MCA_FCR_OPT_MAX_TX_B4_DISCNT
3562 #define MCA_FCR_OPT_MAX_TX_B4_DISCNT 20
3565 /* MCAP control channel FCR Option: Retransmission Timeout
3566 The AVRCP specification set a value in the range of 300 - 2000 ms
3567 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
3568 Range: Minimum 2000 (2 secs) when supporting PBF.
3570 #ifndef MCA_FCR_OPT_RETX_TOUT
3571 #define MCA_FCR_OPT_RETX_TOUT 2000
3574 /* MCAP control channel FCR Option: Monitor Timeout
3575 The AVRCP specification set a value in the range of 300 - 2000 ms
3576 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
3577 Range: Minimum 12000 (12 secs) when supporting PBF.
3579 #ifndef MCA_FCR_OPT_MONITOR_TOUT
3580 #define MCA_FCR_OPT_MONITOR_TOUT 12000
3583 /* MCAP control channel FCR Option: Maximum PDU payload size.
3584 The maximum number of payload octets that the local device can receive in a single PDU.
3586 #ifndef MCA_FCR_OPT_MPS_SIZE
3587 #define MCA_FCR_OPT_MPS_SIZE 1000
3590 /* Shared transport */
3591 #ifndef NFC_SHARED_TRANSPORT_ENABLED
3592 #define NFC_SHARED_TRANSPORT_ENABLED FALSE
3595 /******************************************************************************
3599 ******************************************************************************/
3601 #ifndef SER_INCLUDED
3602 #define SER_INCLUDED FALSE
3605 /* Task which runs the serial application. */
3607 #define SER_TASK BTE_APPL_TASK
3610 /* Mailbox used by serial application. */
3612 #define SER_MBOX TASK_MBOX_1
3616 #ifndef SER_MBOX_MASK
3617 #define SER_MBOX_MASK TASK_MBOX_1_EVT_MASK
3620 /* TX path application event. */
3621 #ifndef SER_TX_PATH_APPL_EVT
3622 #define SER_TX_PATH_APPL_EVT EVENT_MASK(APPL_EVT_3)
3625 /* RX path application event. */
3626 #ifndef SER_RX_PATH_APPL_EVT
3627 #define SER_RX_PATH_APPL_EVT EVENT_MASK(APPL_EVT_4)
3630 /******************************************************************************
3632 ** Sleep Mode (Low Power Mode)
3634 ******************************************************************************/
3636 #ifndef HCILP_INCLUDED
3637 #define HCILP_INCLUDED TRUE
3640 /******************************************************************************
3644 ******************************************************************************/
3646 #ifndef RPC_INCLUDED
3647 #define RPC_INCLUDED FALSE
3650 /* RPCT task mailbox ID for messages coming from rpcgen code. */
3652 #define RPCT_MBOX TASK_MBOX_0
3655 /* RPCT task event for mailbox. */
3656 #ifndef RPCT_RPC_MBOX_EVT
3657 #define RPCT_RPC_MBOX_EVT TASK_MBOX_0_EVT_MASK
3660 /* RPCT task event from driver indicating RX data is ready. */
3661 #ifndef RPCT_RX_READY_EVT
3662 #define RPCT_RX_READY_EVT APPL_EVT_0
3665 /* RPCT task event from driver indicating data TX is done. */
3666 #ifndef RPCT_TX_DONE_EVT
3667 #define RPCT_TX_DONE_EVT APPL_EVT_1
3670 /* RPCT task event indicating data is in the circular buffer. */
3671 #ifndef RPCT_UCBUF_EVT
3672 #define RPCT_UCBUF_EVT APPL_EVT_2
3675 /* Task ID of RPCGEN task. */
3677 #define RPCGEN_TASK BTU_TASK
3680 /* RPCGEN task event for messages coming from RPCT. */
3681 #ifndef RPCGEN_MSG_EVT
3682 #define RPCGEN_MSG_EVT TASK_MBOX_1_EVT_MASK
3685 #ifndef RPCGEN_MSG_MBOX
3686 #define RPCGEN_MSG_MBOX TASK_MBOX_1
3689 /* Size of circular buffer used to store diagnostic messages. */
3690 #ifndef RPCT_UCBUF_SIZE
3691 #define RPCT_UCBUF_SIZE 2000
3694 /******************************************************************************
3696 ** SAP - Sample applications
3698 ******************************************************************************/
3700 #ifndef MMI_INCLUDED
3701 #define MMI_INCLUDED FALSE
3704 /******************************************************************************
3706 ** APPL - Application Task
3708 ******************************************************************************/
3709 /* When TRUE indicates that an application task is to be run */
3710 #ifndef APPL_INCLUDED
3711 #define APPL_INCLUDED TRUE
3714 /* When TRUE remote terminal code included (RPC MUST be included) */
3715 #ifndef RSI_INCLUDED
3716 #define RSI_INCLUDED TRUE
3721 #define L2CAP_FEATURE_REQ_ID 73
3722 #define L2CAP_FEATURE_RSP_ID 173
3725 /******************************************************************************
3729 ******************************************************************************/
3730 /* BTA EIR canned UUID list (default is dynamic) */
3731 #ifndef BTA_EIR_CANNED_UUID_LIST
3732 #define BTA_EIR_CANNED_UUID_LIST FALSE
3735 /* Number of supported customer UUID in EIR */
3736 #ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID
3737 #define BTA_EIR_SERVER_NUM_CUSTOM_UUID 8
3740 /* CHLD override for bluedroid */
3741 #ifndef BTA_AG_CHLD_VAL_ECC
3742 #define BTA_AG_CHLD_VAL_ECC "(0,1,1x,2,2x,3)"
3745 #ifndef BTA_AG_CHLD_VAL
3746 #define BTA_AG_CHLD_VAL "(0,1,2,3)"
3749 /* Set the CIND to match HFP 1.5 */
3750 #ifndef BTA_AG_CIND_INFO
3751 #define BTA_AG_CIND_INFO "(\"call\",(0,1)),(\"callsetup\",(0-3)),(\"service\",(0-1)),(\"signal\",(0-5)),(\"roam\",(0,1)),(\"battchg\",(0-5)),(\"callheld\",(0-2))"
3754 #ifndef BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY
3755 #define BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY TRUE
3758 /******************************************************************************
3762 ******************************************************************************/
3763 #ifndef BTE_PLATFORM_IDLE
3764 #define BTE_PLATFORM_IDLE
3767 #ifndef BTE_IDLE_TASK_INCLUDED
3768 #define BTE_IDLE_TASK_INCLUDED FALSE
3771 #ifndef BTE_PLATFORM_INITHW
3772 #define BTE_PLATFORM_INITHW
3775 #ifndef BTE_BTA_CODE_INCLUDED
3776 #define BTE_BTA_CODE_INCLUDED FALSE
3779 /******************************************************************************
3783 ******************************************************************************/
3784 /* Whether to parse and display traces-> Platform specific implementation */
3786 #define BTTRC_DISP BTTRC_DispOnInsight
3789 /******************************************************************************
3791 ** Tracing: Include trace header file here.
3793 ******************************************************************************/
3795 #include "bt_trace.h"
3797 #endif /* BT_TARGET_H */