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 /* defined BTA_AVK_INCLUDED in Android.mk file based on target selected*/
172 #ifndef BTA_DISABLE_DELAY
173 #define BTA_DISABLE_DELAY 200 /* in milliseconds */
176 #ifndef RPC_TRACE_ONLY
177 #define RPC_TRACE_ONLY FALSE
180 #ifndef ANDROID_APP_INCLUDED
181 #define ANDROID_APP_INCLUDED TRUE
184 #ifndef ANDROID_USE_LOGCAT
185 #define ANDROID_USE_LOGCAT TRUE
188 #ifndef LINUX_GKI_INCLUDED
189 #define LINUX_GKI_INCLUDED TRUE
192 #ifndef BTA_SYS_TIMER_PERIOD
193 #define BTA_SYS_TIMER_PERIOD 100
196 #ifndef GKI_SHUTDOWN_EVT
197 #define GKI_SHUTDOWN_EVT APPL_EVT_7
200 #ifndef GKI_PTHREAD_JOINABLE
201 #define GKI_PTHREAD_JOINABLE TRUE
204 #ifndef LINUX_DRV_INCLUDED
205 #define LINUX_DRV_INCLUDED TRUE
209 #define LINUX_OS TRUE
212 #ifndef BTM_APP_DEV_INIT
213 #define BTM_APP_DEV_INIT bte_main_post_reset_init
216 #ifndef SBC_FOR_EMBEDDED_LINUX
217 #define SBC_FOR_EMBEDDED_LINUX TRUE
220 #ifndef BTA_DM_REMOTE_DEVICE_NAME_LENGTH
221 #define BTA_DM_REMOTE_DEVICE_NAME_LENGTH 248
225 #define AVDT_VERSION 0x0102
228 #ifndef BTA_AG_AT_MAX_LEN
229 #define BTA_AG_AT_MAX_LEN 512
232 #ifndef BTA_AVRCP_FF_RW_SUPPORT
233 #define BTA_AVRCP_FF_RW_SUPPORT TRUE
236 #ifndef BTA_AG_SCO_PKT_TYPES
237 #define BTA_AG_SCO_PKT_TYPES (BTM_SCO_LINK_ONLY_MASK | BTM_SCO_PKT_TYPES_MASK_EV3 | BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 | BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 | BTM_SCO_PKT_TYPES_MASK_NO_3_EV5)
240 #ifndef BTA_AV_RET_TOUT
241 #define BTA_AV_RET_TOUT 15
244 #ifndef PORCHE_PAIRING_CONFLICT
245 #define PORCHE_PAIRING_CONFLICT TRUE
248 #ifndef BTA_AV_CO_CP_SCMS_T
249 #define BTA_AV_CO_CP_SCMS_T FALSE
252 #ifndef AVDT_CONNECT_CP_ONLY
253 #define AVDT_CONNECT_CP_ONLY FALSE
256 /* This feature is used to eanble interleaved scan*/
257 #ifndef BTA_HOST_INTERLEAVE_SEARCH
258 #define BTA_HOST_INTERLEAVE_SEARCH FALSE
261 /* This feature is used to skip query of ble read remote features*/
262 #ifndef BTA_SKIP_BLE_READ_REMOTE_FEAT
263 #define BTA_SKIP_BLE_READ_REMOTE_FEAT FALSE
266 #ifndef BT_TRACE_PROTOCOL
267 #define BT_TRACE_PROTOCOL TRUE
270 #ifndef BT_USE_TRACES
271 #define BT_USE_TRACES TRUE
274 #ifndef BT_TRACE_BTIF
275 #define BT_TRACE_BTIF TRUE
278 #ifndef BTTRC_INCLUDED
279 #define BTTRC_INCLUDED FALSE
282 #ifndef BT_TRACE_VERBOSE
283 #define BT_TRACE_VERBOSE FALSE
286 #ifndef BTTRC_PARSER_INCLUDED
287 #define BTTRC_PARSER_INCLUDED FALSE
290 #ifndef MAX_TRACE_RAM_SIZE
291 #define MAX_TRACE_RAM_SIZE 10000
294 #ifndef OBX_INITIAL_TRACE_LEVEL
295 #define OBX_INITIAL_TRACE_LEVEL BT_TRACE_LEVEL_ERROR
298 #ifndef PBAP_ZERO_VCARD_IN_DB
299 #define PBAP_ZERO_VCARD_IN_DB FALSE
302 #ifndef BTA_DM_SDP_DB_SIZE
303 #define BTA_DM_SDP_DB_SIZE 8000
307 #define HL_INCLUDED TRUE
310 #ifndef NO_GKI_RUN_RETURN
311 #define NO_GKI_RUN_RETURN TRUE
314 #ifndef AG_VOICE_SETTINGS
315 #define AG_VOICE_SETTINGS HCI_DEFAULT_VOICE_SETTINGS
318 #ifndef BTIF_DM_OOB_TEST
319 #define BTIF_DM_OOB_TEST TRUE
322 //------------------End added from bdroid_buildcfg.h---------------------
326 /******************************************************************************
330 ******************************************************************************/
332 /* API macros for simulator */
336 #ifndef BTE_BSE_WRAPPER
339 #define BTAPI __declspec(dllexport)
344 #define BTU_API BTAPI
345 #define A2D_API BTAPI
346 #define VDP_API BTAPI
347 #define AVDT_API BTAPI
348 #define AVCT_API BTAPI
349 #define AVRC_API BTAPI
350 #define BIP_API BTAPI
351 #define BNEP_API BTAPI
352 #define BPP_API BTAPI
353 #define BTM_API BTAPI
354 #define CTP_API BTAPI
355 #define DUN_API BTAPI
356 #define FTP_API BTAPI
357 #define GAP_API BTAPI
358 #define GOEP_API BTAPI
359 #define HCI_API BTAPI
360 #define HCRP_API BTAPI
361 #define HID_API BTAPI
362 #define HFP_API BTAPI
363 #define HSP2_API BTAPI
364 #define ICP_API BTAPI
365 #define L2C_API BTAPI
366 #define OBX_API BTAPI
367 #define OPP_API BTAPI
368 #define PAN_API BTAPI
369 #define RFC_API BTAPI
370 #define RPC_API BTAPI
371 #define SDP_API BTAPI
372 #define SPP_API BTAPI
373 #define TCS_API BTAPI
374 #define XML_API BTAPI
375 #define BTA_API BTAPI
376 #define SBC_API BTAPI
377 #define MCE_API BTAPI
378 #define MCA_API BTAPI
379 #define GATT_API BTAPI
380 #define SMP_API BTAPI
383 /******************************************************************************
387 ******************************************************************************/
389 /* Receives HCI events from the lower-layer. */
390 #ifndef HCI_CMD_POOL_ID
391 #define HCI_CMD_POOL_ID GKI_POOL_ID_2
394 #ifndef HCI_CMD_POOL_BUF_SIZE
395 #define HCI_CMD_POOL_BUF_SIZE GKI_BUF2_SIZE
398 /* Receives ACL data packets from thelower-layer. */
399 #ifndef HCI_ACL_POOL_ID
400 #define HCI_ACL_POOL_ID GKI_POOL_ID_3
403 #ifndef HCI_ACL_POOL_BUF_SIZE
404 #define HCI_ACL_POOL_BUF_SIZE GKI_BUF3_SIZE
407 /* Maximum number of buffers available for ACL receive data. */
408 #ifndef HCI_ACL_BUF_MAX
409 #define HCI_ACL_BUF_MAX GKI_BUF3_MAX
412 /* Receives SCO data packets from the lower-layer. */
413 #ifndef HCI_SCO_POOL_ID
414 #define HCI_SCO_POOL_ID GKI_POOL_ID_6
418 #ifndef HCI_DATA_DESCR_POOL_ID
419 #define HCI_DATA_DESCR_POOL_ID GKI_POOL_ID_0
422 /* Sends SDP data packets. */
424 #define SDP_POOL_ID 3
427 /* Sends RFCOMM command packets. */
428 #ifndef RFCOMM_CMD_POOL_ID
429 #define RFCOMM_CMD_POOL_ID GKI_POOL_ID_2
432 #ifndef RFCOMM_CMD_POOL_BUF_SIZE
433 #define RFCOMM_CMD_POOL_BUF_SIZE GKI_BUF2_SIZE
436 /* Sends RFCOMM data packets. */
437 #ifndef RFCOMM_DATA_POOL_ID
438 #define RFCOMM_DATA_POOL_ID GKI_POOL_ID_3
441 #ifndef RFCOMM_DATA_POOL_BUF_SIZE
442 #define RFCOMM_DATA_POOL_BUF_SIZE GKI_BUF3_SIZE
445 /* Sends L2CAP packets to the peer and HCI messages to the controller. */
446 #ifndef L2CAP_CMD_POOL_ID
447 #define L2CAP_CMD_POOL_ID GKI_POOL_ID_2
450 /* Sends L2CAP segmented packets in ERTM mode */
451 #ifndef L2CAP_FCR_TX_POOL_ID
452 #define L2CAP_FCR_TX_POOL_ID HCI_ACL_POOL_ID
455 /* Receives L2CAP segmented packets in ERTM mode */
456 #ifndef L2CAP_FCR_RX_POOL_ID
457 #define L2CAP_FCR_RX_POOL_ID HCI_ACL_POOL_ID
460 /* Number of ACL buffers to assign to LE
461 if the HCI buffer pool is shared with BR/EDR */
462 #ifndef L2C_DEF_NUM_BLE_BUF_SHARED
463 #define L2C_DEF_NUM_BLE_BUF_SHARED 1
466 /* Used by BTM when it sends HCI commands to the controller. */
467 #ifndef BTM_CMD_POOL_ID
468 #define BTM_CMD_POOL_ID GKI_POOL_ID_2
471 #ifndef OBX_CMD_POOL_SIZE
472 #define OBX_CMD_POOL_SIZE GKI_BUF2_SIZE
475 #ifndef OBX_LRG_DATA_POOL_SIZE
476 #define OBX_LRG_DATA_POOL_SIZE GKI_BUF4_SIZE
479 #ifndef OBX_LRG_DATA_POOL_ID
480 #define OBX_LRG_DATA_POOL_ID GKI_POOL_ID_4
483 /* Used for CTP discovery database. */
484 #ifndef CTP_SDP_DB_POOL_ID
485 #define CTP_SDP_DB_POOL_ID GKI_POOL_ID_3
488 /* Used to send data to L2CAP. */
489 #ifndef GAP_DATA_POOL_ID
490 #define GAP_DATA_POOL_ID GKI_POOL_ID_3
493 /* Used for SPP inquiry and discovery databases. */
494 #ifndef SPP_DB_POOL_ID
495 #define SPP_DB_POOL_ID GKI_POOL_ID_3
499 #define SPP_DB_SIZE GKI_BUF3_SIZE
502 /* BNEP data and protocol messages. */
504 #define BNEP_POOL_ID GKI_POOL_ID_3
507 /* RPC pool for temporary trace message buffers. */
508 #ifndef RPC_SCRATCH_POOL_ID
509 #define RPC_SCRATCH_POOL_ID GKI_POOL_ID_2
512 /* RPC scratch buffer size (not related to RPC_SCRATCH_POOL_ID) */
513 #ifndef RPC_SCRATCH_BUF_SIZE
514 #define RPC_SCRATCH_BUF_SIZE GKI_BUF3_SIZE
517 /* RPC pool for protocol messages */
518 #ifndef RPC_MSG_POOL_ID
519 #define RPC_MSG_POOL_ID GKI_POOL_ID_3
522 #ifndef RPC_MSG_POOL_SIZE
523 #define RPC_MSG_POOL_SIZE GKI_BUF3_SIZE
526 /* AVDTP pool for protocol messages */
527 #ifndef AVDT_CMD_POOL_ID
528 #define AVDT_CMD_POOL_ID GKI_POOL_ID_2
531 /* AVDTP pool size for media packets in case of fragmentation */
532 #ifndef AVDT_DATA_POOL_SIZE
533 #define AVDT_DATA_POOL_SIZE GKI_BUF3_SIZE
537 #define PAN_POOL_ID GKI_POOL_ID_3
540 /* UNV pool for read/write serialization */
541 #ifndef UNV_MSG_POOL_ID
542 #define UNV_MSG_POOL_ID GKI_POOL_ID_2
545 #ifndef UNV_MSG_POOL_SIZE
546 #define UNV_MSG_POOL_SIZE GKI_BUF2_SIZE
549 /* AVCTP pool for protocol messages */
550 #ifndef AVCT_CMD_POOL_ID
551 #define AVCT_CMD_POOL_ID GKI_POOL_ID_1
554 #ifndef AVCT_META_CMD_POOL_ID
555 #define AVCT_META_CMD_POOL_ID GKI_POOL_ID_2
558 /* AVRCP pool for protocol messages */
559 #ifndef AVRC_CMD_POOL_ID
560 #define AVRC_CMD_POOL_ID GKI_POOL_ID_1
563 /* AVRCP pool size for protocol messages */
564 #ifndef AVRC_CMD_POOL_SIZE
565 #define AVRC_CMD_POOL_SIZE GKI_BUF1_SIZE
568 /* AVRCP Metadata pool for protocol messages */
569 #ifndef AVRC_META_CMD_POOL_ID
570 #define AVRC_META_CMD_POOL_ID GKI_POOL_ID_2
573 /* AVRCP Metadata pool size for protocol messages */
574 #ifndef AVRC_META_CMD_POOL_SIZE
575 #define AVRC_META_CMD_POOL_SIZE GKI_BUF2_SIZE
579 /* AVRCP buffer size for browsing channel messages */
580 #ifndef AVRC_BROWSE_POOL_SIZE
581 #define AVRC_BROWSE_POOL_SIZE GKI_MAX_BUF_SIZE
584 /* HDP buffer size for the Pulse Oximeter */
585 #ifndef BTA_HL_LRG_DATA_POOL_SIZE
586 #define BTA_HL_LRG_DATA_POOL_SIZE GKI_BUF7_SIZE
589 #ifndef BTA_HL_LRG_DATA_POOL_ID
590 #define BTA_HL_LRG_DATA_POOL_ID GKI_POOL_ID_7
593 /* GATT Server Database pool ID */
594 #ifndef GATT_DB_POOL_ID
595 #define GATT_DB_POOL_ID GKI_POOL_ID_8
598 /* GATT Data sending buffer pool ID, use default ACL pool for fix channel data */
599 #ifndef GATT_BUF_POOL_ID
600 #define GATT_BUF_POOL_ID HCI_ACL_POOL_ID
603 /******************************************************************************
605 ** Lower Layer Interface
607 ******************************************************************************/
609 /* Sends ACL data received over HCI to the upper stack. */
610 #ifndef HCI_ACL_DATA_TO_UPPER
611 #define HCI_ACL_DATA_TO_UPPER(p) {((BT_HDR *)p)->event = BT_EVT_TO_BTU_HCI_ACL; GKI_send_msg (BTU_TASK, BTU_HCI_RCV_MBOX, p);}
614 /* Sends SCO data received over HCI to the upper stack. */
615 #ifndef HCI_SCO_DATA_TO_UPPER
616 #define HCI_SCO_DATA_TO_UPPER(p) {((BT_HDR *)p)->event = BT_EVT_TO_BTU_HCI_SCO; GKI_send_msg (BTU_TASK, BTU_HCI_RCV_MBOX, p);}
619 /* Sends an HCI event received over HCI to theupper stack. */
620 #ifndef HCI_EVT_TO_UPPER
621 #define HCI_EVT_TO_UPPER(p) {((BT_HDR *)p)->event = BT_EVT_TO_BTU_HCI_EVT; GKI_send_msg (BTU_TASK, BTU_HCI_RCV_MBOX, p);}
624 /* Macro for allocating buffer for HCI commands */
625 #ifndef HCI_GET_CMD_BUF
626 #if (!defined(HCI_USE_VARIABLE_SIZE_CMD_BUF) || (HCI_USE_VARIABLE_SIZE_CMD_BUF == FALSE))
627 /* Allocate fixed-size buffer from HCI_CMD_POOL (default case) */
628 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getpoolbuf (HCI_CMD_POOL_ID))
630 /* Allocate smallest possible buffer (for platforms with limited RAM) */
631 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getbuf ((UINT16)(BT_HDR_SIZE + HCIC_PREAMBLE_SIZE + (paramlen))))
633 #endif /* HCI_GET_CMD_BUF */
635 /******************************************************************************
639 ******************************************************************************/
640 #ifndef HCISU_H4_INCLUDED
641 #define HCISU_H4_INCLUDED TRUE
648 BT_API extern void bte_main_hci_send (BT_HDR *p_msg, UINT16 event);
649 #if (HCISU_H4_INCLUDED == TRUE)
650 BT_API extern void bte_main_lpm_allow_bt_device_sleep(void);
657 /* Sends ACL data received from the upper stack to the BD/EDR HCI transport. */
658 #ifndef HCI_ACL_DATA_TO_LOWER
659 #define HCI_ACL_DATA_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_ACL);
662 #ifndef HCI_BLE_ACL_DATA_TO_LOWER
663 #define HCI_BLE_ACL_DATA_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), (UINT16)(BT_EVT_TO_LM_HCI_ACL|LOCAL_BLE_CONTROLLER_ID));
666 /* Sends SCO data received from the upper stack to the HCI transport. */
667 #ifndef HCI_SCO_DATA_TO_LOWER
668 #define HCI_SCO_DATA_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_SCO);
671 /* Sends an HCI command received from the upper stack to the BD/EDR HCI transport. */
672 #ifndef HCI_CMD_TO_LOWER
673 #define HCI_CMD_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_CMD);
676 /* Sends an LM Diagnosic command received from the upper stack to the HCI transport. */
677 #ifndef HCI_LM_DIAG_TO_LOWER
678 #define HCI_LM_DIAG_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_DIAG);
681 /* Send HCISU a message to allow BT sleep */
682 #ifndef HCI_LP_ALLOW_BT_DEVICE_SLEEP
683 #define HCI_LP_ALLOW_BT_DEVICE_SLEEP() bte_main_lpm_allow_bt_device_sleep()
686 /* If nonzero, the upper-layer sends at most this number of HCI commands to the lower-layer. */
687 #ifndef HCI_MAX_SIMUL_CMDS
688 #define HCI_MAX_SIMUL_CMDS 0
691 /* Timeout for receiving response to HCI command */
692 #ifndef BTU_CMD_CMPL_TIMEOUT
693 #define BTU_CMD_CMPL_TIMEOUT 8
696 /* If TRUE, BTU task will check HCISU again when HCI command timer expires */
697 #ifndef BTU_CMD_CMPL_TOUT_DOUBLE_CHECK
698 #define BTU_CMD_CMPL_TOUT_DOUBLE_CHECK FALSE
701 /* Use 2 second for low-resolution systems, override to 1 for high-resolution systems */
702 #ifndef BT_1SEC_TIMEOUT
703 #define BT_1SEC_TIMEOUT (2)
707 /* if L2CAP_FCR_INCLUDED is TRUE then it should have 100 millisecond resolution */
708 /* if none of them is included then QUICK_TIMER_TICKS_PER_SEC is set to 0 to exclude quick timer */
709 #ifndef QUICK_TIMER_TICKS_PER_SEC
710 #define QUICK_TIMER_TICKS_PER_SEC 10 /* 10ms timer */
713 /******************************************************************************
717 ******************************************************************************/
718 /* if set to TRUE, stack will automatically send an HCI reset at start-up. To be
719 set to FALSE for advanced start-up / shut-down procedures using USER_HW_ENABLE_API
720 and USER_HW_DISABLE_API macros */
721 #ifndef BTM_AUTOMATIC_HCI_RESET
722 #define BTM_AUTOMATIC_HCI_RESET FALSE
725 /* Include BTM Discovery database and code. */
726 #ifndef BTM_DISCOVERY_INCLUDED
727 #define BTM_DISCOVERY_INCLUDED TRUE
730 /* Include inquiry code. */
731 #ifndef BTM_INQUIRY_INCLUDED
732 #define BTM_INQUIRY_INCLUDED TRUE
735 /* Cancel Inquiry on incoming SSP */
736 #ifndef BTM_NO_SSP_ON_INQUIRY
737 #define BTM_NO_SSP_ON_INQUIRY FALSE
740 /* Include periodic inquiry code (used when BTM_INQUIRY_INCLUDED is TRUE). */
741 #ifndef BTM_PERIODIC_INQ_INCLUDED
742 #define BTM_PERIODIC_INQ_INCLUDED TRUE
745 /* Include security authorization code */
746 #ifndef BTM_AUTHORIZATION_INCLUDED
747 #define BTM_AUTHORIZATION_INCLUDED TRUE
750 /* Includes SCO if TRUE */
751 #ifndef BTM_SCO_INCLUDED
752 #define BTM_SCO_INCLUDED TRUE /* TRUE includes SCO code */
755 /* Includes SCO if TRUE */
756 #ifndef BTM_SCO_HCI_INCLUDED
757 #define BTM_SCO_HCI_INCLUDED FALSE /* TRUE includes SCO over HCI code */
760 /* Includes WBS if TRUE */
761 #ifndef BTM_WBS_INCLUDED
762 #define BTM_WBS_INCLUDED FALSE /* TRUE includes WBS code */
765 /* Includes PCM2 support if TRUE */
766 #ifndef BTM_PCM2_INCLUDED
767 #define BTM_PCM2_INCLUDED FALSE
770 /* This is used to work around a controller bug that doesn't like Disconnect
771 ** issued while there is a role switch in progress
773 #ifndef BTM_DISC_DURING_RS
774 #define BTM_DISC_DURING_RS TRUE
777 /**************************
778 ** Initial SCO TX credit
779 *************************/
780 /* max TX SCO data packet size */
781 #ifndef BTM_SCO_DATA_SIZE_MAX
782 #define BTM_SCO_DATA_SIZE_MAX 240
785 /* maximum BTM buffering capacity */
786 #ifndef BTM_SCO_MAX_BUF_CAP
787 #define BTM_SCO_MAX_BUF_CAP (BTM_SCO_INIT_XMIT_CREDIT * 4)
790 /* The size in bytes of the BTM inquiry database. */
791 #ifndef BTM_INQ_DB_SIZE
792 #define BTM_INQ_DB_SIZE 40
795 /* This is set to enable automatic periodic inquiry at startup. */
796 #ifndef BTM_ENABLE_AUTO_INQUIRY
797 #define BTM_ENABLE_AUTO_INQUIRY FALSE
800 /* This is set to always try to acquire the remote device name. */
801 #ifndef BTM_INQ_GET_REMOTE_NAME
802 #define BTM_INQ_GET_REMOTE_NAME FALSE
805 /* The inquiry duration in 1.28 second units when auto inquiry is enabled. */
806 #ifndef BTM_DEFAULT_INQ_DUR
807 #define BTM_DEFAULT_INQ_DUR 5
810 /* The inquiry mode when auto inquiry is enabled. */
811 #ifndef BTM_DEFAULT_INQ_MODE
812 #define BTM_DEFAULT_INQ_MODE BTM_GENERAL_INQUIRY
815 /* The default periodic inquiry maximum delay when auto inquiry is enabled, in 1.28 second units. */
816 #ifndef BTM_DEFAULT_INQ_MAX_DELAY
817 #define BTM_DEFAULT_INQ_MAX_DELAY 30
820 /* The default periodic inquiry minimum delay when auto inquiry is enabled, in 1.28 second units. */
821 #ifndef BTM_DEFAULT_INQ_MIN_DELAY
822 #define BTM_DEFAULT_INQ_MIN_DELAY 20
825 /* The maximum age of entries in inquiry database in seconds ('0' disables feature). */
826 #ifndef BTM_INQ_MAX_AGE
827 #define BTM_INQ_MAX_AGE 0
830 /* The maximum age of entries in inquiry database based on inquiry response failure ('0' disables feature). */
831 #ifndef BTM_INQ_AGE_BY_COUNT
832 #define BTM_INQ_AGE_BY_COUNT 0
835 /* TRUE if controller does not support inquiry event filtering. */
836 #ifndef BTM_BYPASS_EVENT_FILTERING
837 #define BTM_BYPASS_EVENT_FILTERING FALSE
840 /* TRUE if inquiry filtering is desired from BTM. */
841 #ifndef BTM_USE_INQ_RESULTS_FILTER
842 #define BTM_USE_INQ_RESULTS_FILTER TRUE
845 /* The default scan mode */
846 #ifndef BTM_DEFAULT_SCAN_TYPE
847 #define BTM_DEFAULT_SCAN_TYPE BTM_SCAN_TYPE_INTERLACED
850 /* Should connections to unknown devices be allowed when not discoverable? */
851 #ifndef BTM_ALLOW_CONN_IF_NONDISCOVER
852 #define BTM_ALLOW_CONN_IF_NONDISCOVER TRUE
855 /* When connectable mode is set to TRUE, the device will respond to paging. */
856 #ifndef BTM_IS_CONNECTABLE
857 #define BTM_IS_CONNECTABLE FALSE
860 /* Sets the Page_Scan_Window: the length of time that the device is performing a page scan. */
861 #ifndef BTM_DEFAULT_CONN_WINDOW
862 #define BTM_DEFAULT_CONN_WINDOW 0x0012
865 /* Sets the Page_Scan_Activity: the interval between the start of two consecutive page scans. */
866 #ifndef BTM_DEFAULT_CONN_INTERVAL
867 #define BTM_DEFAULT_CONN_INTERVAL 0x0800
870 /* This is set to automatically perform inquiry scan on startup. */
871 #ifndef BTM_IS_DISCOVERABLE
872 #define BTM_IS_DISCOVERABLE FALSE
875 /* When automatic inquiry scan is enabled, this sets the discovery mode. */
876 #ifndef BTM_DEFAULT_DISC_MODE
877 #define BTM_DEFAULT_DISC_MODE BTM_GENERAL_DISCOVERABLE
880 /* When automatic inquiry scan is enabled, this sets the inquiry scan window. */
881 #ifndef BTM_DEFAULT_DISC_WINDOW
882 #define BTM_DEFAULT_DISC_WINDOW 0x0012
885 /* When automatic inquiry scan is enabled, this sets the inquiry scan interval. */
886 #ifndef BTM_DEFAULT_DISC_INTERVAL
887 #define BTM_DEFAULT_DISC_INTERVAL 0x0800
890 /* Sets the period, in seconds, to automatically perform service discovery. */
891 #ifndef BTM_AUTO_DISCOVERY_PERIOD
892 #define BTM_AUTO_DISCOVERY_PERIOD 0
895 /* The size in bytes of the BTM discovery database (if discovery is included). */
896 #ifndef BTM_DISCOVERY_DB_SIZE
897 #define BTM_DISCOVERY_DB_SIZE 4000
900 /* Number of milliseconds to delay BTU task startup upon device initialization. */
901 #ifndef BTU_STARTUP_DELAY
902 #define BTU_STARTUP_DELAY 0
905 /* Whether BTA is included in BTU task. */
906 #ifndef BTU_BTA_INCLUDED
907 #define BTU_BTA_INCLUDED TRUE
910 /* Number of seconds to wait to send an HCI Reset command upon device initialization. */
911 #ifndef BTM_FIRST_RESET_DELAY
912 #define BTM_FIRST_RESET_DELAY 0
915 /* The number of seconds to wait for controller module to reset after issuing an HCI Reset command. */
916 #ifndef BTM_AFTER_RESET_TIMEOUT
917 #define BTM_AFTER_RESET_TIMEOUT 0
920 /* Default class of device
921 * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
923 * SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony)
924 * MAJOR_CLASS:0x02 - PHONE
925 * MINOR_CLASS:0x0C - SMART_PHONE
929 #define BTA_DM_COD {0x5A, 0x02, 0x0C}
932 /* The number of SCO links. */
933 #ifndef BTM_MAX_SCO_LINKS
934 #define BTM_MAX_SCO_LINKS 3
937 /* The preferred type of SCO links (2-eSCO, 0-SCO). */
938 #ifndef BTM_DEFAULT_SCO_MODE
939 #define BTM_DEFAULT_SCO_MODE 2
942 /* The number of security records for peer devices. */
943 #ifndef BTM_SEC_MAX_DEVICE_RECORDS
944 #define BTM_SEC_MAX_DEVICE_RECORDS 100
947 /* The number of security records for services. */
948 #ifndef BTM_SEC_MAX_SERVICE_RECORDS
949 #define BTM_SEC_MAX_SERVICE_RECORDS 32
952 /* If True, force a retrieval of remote device name for each bond in case it's changed */
953 #ifndef BTM_SEC_FORCE_RNR_FOR_DBOND
954 #define BTM_SEC_FORCE_RNR_FOR_DBOND FALSE
957 /* Maximum device name length used in btm database. */
958 #ifndef BTM_MAX_REM_BD_NAME_LEN
959 #define BTM_MAX_REM_BD_NAME_LEN 248
962 /* Maximum local device name length stored btm database.
963 '0' disables storage of the local name in BTM */
964 #ifndef BTM_MAX_LOC_BD_NAME_LEN
965 #define BTM_MAX_LOC_BD_NAME_LEN 248
968 /* Fixed Default String. When this is defined as null string, the device's
969 * product model name is used as the default local name.
971 #ifndef BTM_DEF_LOCAL_NAME
972 #define BTM_DEF_LOCAL_NAME ""
975 /* Maximum service name stored with security authorization (0 if not needed) */
976 #ifndef BTM_SEC_SERVICE_NAME_LEN
977 #define BTM_SEC_SERVICE_NAME_LEN BT_MAX_SERVICE_NAME_LEN
980 /* Maximum number of pending security callback */
981 #ifndef BTM_SEC_MAX_CALLBACKS
982 #define BTM_SEC_MAX_CALLBACKS 7
985 /* Maximum length of the service name. */
986 #ifndef BT_MAX_SERVICE_NAME_LEN
987 #define BT_MAX_SERVICE_NAME_LEN 21
990 /* ACL buffer size in HCI Host Buffer Size command. */
991 #ifndef BTM_ACL_BUF_SIZE
992 #define BTM_ACL_BUF_SIZE 0
995 /* This is set to use the BTM power manager. */
996 #ifndef BTM_PWR_MGR_INCLUDED
997 #define BTM_PWR_MGR_INCLUDED TRUE
1000 /* The maximum number of clients that can register with the power manager. */
1001 #ifndef BTM_MAX_PM_RECORDS
1002 #define BTM_MAX_PM_RECORDS 2
1005 /* This is set to show debug trace messages for the power manager. */
1006 #ifndef BTM_PM_DEBUG
1007 #define BTM_PM_DEBUG FALSE
1010 /* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */
1011 #ifndef BTM_SCO_WAKE_PARKED_LINK
1012 #define BTM_SCO_WAKE_PARKED_LINK TRUE
1015 /* May be set to the the name of a function used for vendor specific chip initialization */
1016 #ifndef BTM_APP_DEV_INIT
1017 /* #define BTM_APP_DEV_INIT myInitFunction() */
1020 /* This is set to TRUE if the busy level change event is desired. (replace ACL change event) */
1021 #ifndef BTM_BUSY_LEVEL_CHANGE_INCLUDED
1022 #define BTM_BUSY_LEVEL_CHANGE_INCLUDED TRUE
1025 /* If the user does not respond to security process requests within this many seconds,
1026 * a negative response would be sent automatically.
1027 * It's recommended to use a value between 30 and OBX_TIMEOUT_VALUE
1028 * 30 is LMP response timeout value */
1029 #ifndef BTM_SEC_TIMEOUT_VALUE
1030 #define BTM_SEC_TIMEOUT_VALUE 35
1033 /* Maximum number of callbacks that can be registered using BTM_RegisterForVSEvents */
1034 #ifndef BTM_MAX_VSE_CALLBACKS
1035 #define BTM_MAX_VSE_CALLBACKS 3
1038 /******************************************
1040 *******************************************/
1041 /* This is set to TRUE if the server Extended Inquiry Response feature is desired. */
1042 /* server sends EIR to client */
1043 #ifndef BTM_EIR_SERVER_INCLUDED
1044 #define BTM_EIR_SERVER_INCLUDED TRUE
1047 /* This is set to TRUE if the client Extended Inquiry Response feature is desired. */
1048 /* client inquiry to server */
1049 #ifndef BTM_EIR_CLIENT_INCLUDED
1050 #define BTM_EIR_CLIENT_INCLUDED TRUE
1053 /* This is set to TRUE if the FEC is required for EIR packet. */
1054 #ifndef BTM_EIR_DEFAULT_FEC_REQUIRED
1055 #define BTM_EIR_DEFAULT_FEC_REQUIRED TRUE
1058 /* User defined UUID look up table */
1059 #ifndef BTM_EIR_UUID_LKUP_TBL
1062 /* The IO capability of the local device (for Simple Pairing) */
1063 #ifndef BTM_LOCAL_IO_CAPS
1064 #define BTM_LOCAL_IO_CAPS BTM_IO_CAP_IO
1067 /* The default MITM Protection Requirement (for Simple Pairing)
1068 * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */
1069 #ifndef BTM_DEFAULT_AUTH_REQ
1070 #define BTM_DEFAULT_AUTH_REQ BTM_AUTH_SP_NO
1073 /* The default MITM Protection Requirement for dedicated bonding using Simple Pairing
1074 * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */
1075 #ifndef BTM_DEFAULT_DD_AUTH_REQ
1076 #define BTM_DEFAULT_DD_AUTH_REQ BTM_AUTH_AP_YES
1079 /* Include Out-of-Band implementation for Simple Pairing */
1080 #ifndef BTM_OOB_INCLUDED
1081 #define BTM_OOB_INCLUDED TRUE
1084 /* TRUE to include Sniff Subrating */
1085 #ifndef BTM_SSR_INCLUDED
1086 #define BTM_SSR_INCLUDED TRUE
1089 /*************************
1090 ** End of Lisbon Features
1091 **************************/
1093 /* Used for conformance testing ONLY */
1094 #ifndef BTM_BLE_CONFORMANCE_TESTING
1095 #define BTM_BLE_CONFORMANCE_TESTING FALSE
1098 /* Maximum number of consecutive HCI commands that can time out
1099 * before it gets treated as H/w error*/
1100 #ifndef BTM_MAX_HCI_CMD_TOUT_BEFORE_RESTART
1101 #define BTM_MAX_HCI_CMD_TOUT_BEFORE_RESTART 2
1104 /******************************************************************************
1108 ******************************************************************************/
1110 /* Flow control and retransmission mode */
1112 #ifndef L2CAP_FCR_INCLUDED
1113 #define L2CAP_FCR_INCLUDED TRUE
1116 /* The maximum number of simultaneous links that L2CAP can support. */
1117 #ifndef MAX_ACL_CONNECTIONS
1118 #define MAX_L2CAP_LINKS 7
1120 #define MAX_L2CAP_LINKS MAX_ACL_CONNECTIONS
1123 /* The maximum number of simultaneous channels that L2CAP can support. */
1124 #ifndef MAX_L2CAP_CHANNELS
1125 #define MAX_L2CAP_CHANNELS 16
1128 /* The maximum number of simultaneous applications that can register with L2CAP. */
1129 #ifndef MAX_L2CAP_CLIENTS
1130 #define MAX_L2CAP_CLIENTS 15
1133 /* The number of seconds of link inactivity before a link is disconnected. */
1134 #ifndef L2CAP_LINK_INACTIVITY_TOUT
1135 #define L2CAP_LINK_INACTIVITY_TOUT 4
1138 /* The number of seconds of link inactivity after bonding before a link is disconnected. */
1139 #ifndef L2CAP_BONDING_TIMEOUT
1140 #define L2CAP_BONDING_TIMEOUT 3
1143 /* The time from the HCI connection complete to disconnect if no channel is established. */
1144 #ifndef L2CAP_LINK_STARTUP_TOUT
1145 #define L2CAP_LINK_STARTUP_TOUT 60
1148 /* The L2CAP MTU; must be in accord with the HCI ACL pool size. */
1149 #ifndef L2CAP_MTU_SIZE
1150 #define L2CAP_MTU_SIZE 1691
1153 /* The L2CAP MPS over Bluetooth; must be in accord with the FCR tx pool size and ACL down buffer size. */
1154 #ifndef L2CAP_MPS_OVER_BR_EDR
1155 #define L2CAP_MPS_OVER_BR_EDR 1010
1158 /* This is set to enable host flow control. */
1159 #ifndef L2CAP_HOST_FLOW_CTRL
1160 #define L2CAP_HOST_FLOW_CTRL FALSE
1163 /* If host flow control enabled, this is the number of buffers the controller can have unacknowledged. */
1164 #ifndef L2CAP_HOST_FC_ACL_BUFS
1165 #define L2CAP_HOST_FC_ACL_BUFS 20
1168 /* The percentage of the queue size allowed before a congestion event is sent to the L2CAP client (typically 120%). */
1169 #ifndef L2CAP_FWD_CONG_THRESH
1170 #define L2CAP_FWD_CONG_THRESH 120
1173 /* This is set to enable L2CAP to take the ACL link out of park mode when ACL data is to be sent. */
1174 #ifndef L2CAP_WAKE_PARKED_LINK
1175 #define L2CAP_WAKE_PARKED_LINK TRUE
1178 /* Whether link wants to be the master or the slave. */
1179 #ifndef L2CAP_DESIRED_LINK_ROLE
1180 #define L2CAP_DESIRED_LINK_ROLE HCI_ROLE_SLAVE
1183 /* Include Non-Flushable Packet Boundary Flag feature of Lisbon */
1184 #ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED
1185 #define L2CAP_NON_FLUSHABLE_PB_INCLUDED TRUE
1188 /* Minimum number of ACL credit for high priority link */
1189 #ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
1190 #define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 5
1193 /* used for monitoring HCI ACL credit management */
1194 #ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG
1195 #define L2CAP_HCI_FLOW_CONTROL_DEBUG TRUE
1198 /* Used for calculating transmit buffers off of */
1199 #ifndef L2CAP_NUM_XMIT_BUFFS
1200 #define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX
1203 /* Unicast Connectionless Data */
1204 #ifndef L2CAP_UCD_INCLUDED
1205 #define L2CAP_UCD_INCLUDED FALSE
1208 /* Unicast Connectionless Data MTU */
1209 #ifndef L2CAP_UCD_MTU
1210 #define L2CAP_UCD_MTU L2CAP_MTU_SIZE
1213 /* Unicast Connectionless Data Idle Timeout */
1214 #ifndef L2CAP_UCD_IDLE_TIMEOUT
1215 #define L2CAP_UCD_IDLE_TIMEOUT 2
1218 /* Unicast Connectionless Data Idle Timeout */
1219 #ifndef L2CAP_UCD_CH_PRIORITY
1220 #define L2CAP_UCD_CH_PRIORITY L2CAP_CHNL_PRIORITY_MEDIUM
1223 /* Max clients on Unicast Connectionless Data */
1224 #ifndef L2CAP_MAX_UCD_CLIENTS
1225 #define L2CAP_MAX_UCD_CLIENTS 5
1228 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
1229 /* Excluding L2CAP signaling channel and UCD */
1230 #ifndef L2CAP_NUM_FIXED_CHNLS
1231 #define L2CAP_NUM_FIXED_CHNLS 4
1234 /* First fixed channel supported */
1235 #ifndef L2CAP_FIRST_FIXED_CHNL
1236 #define L2CAP_FIRST_FIXED_CHNL 3
1239 #ifndef L2CAP_LAST_FIXED_CHNL
1240 #define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
1243 /* Round Robin service channels in link */
1244 #ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
1245 #define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE TRUE
1248 /* Used for calculating transmit buffers off of */
1249 #ifndef L2CAP_NUM_XMIT_BUFFS
1250 #define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX
1253 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
1254 #ifndef L2CAP_NUM_FIXED_CHNLS
1255 #define L2CAP_NUM_FIXED_CHNLS 1
1258 /* First fixed channel supported */
1259 #ifndef L2CAP_FIRST_FIXED_CHNL
1260 #define L2CAP_FIRST_FIXED_CHNL 3
1263 #ifndef L2CAP_LAST_FIXED_CHNL
1264 #define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
1267 /* used for monitoring eL2CAP data flow */
1268 #ifndef L2CAP_ERTM_STATS
1269 #define L2CAP_ERTM_STATS FALSE
1272 /* USED FOR FCR TEST ONLY: When TRUE generates bad tx and rx packets */
1273 #ifndef L2CAP_CORRUPT_ERTM_PKTS
1274 #define L2CAP_CORRUPT_ERTM_PKTS FALSE
1277 /* Used for conformance testing ONLY: When TRUE lets scriptwrapper overwrite info response */
1278 #ifndef L2CAP_CONFORMANCE_TESTING
1279 #define L2CAP_CONFORMANCE_TESTING FALSE
1283 #ifndef TIMER_PARAM_TYPE
1285 #define TIMER_PARAM_TYPE void *
1287 #define TIMER_PARAM_TYPE UINT32
1291 /******************************************************************************
1295 ******************************************************************************/
1297 #ifndef BLE_INCLUDED
1298 #define BLE_INCLUDED TRUE
1301 #ifndef BLE_ANDROID_CONTROLLER_SCAN_FILTER
1302 #define BLE_ANDROID_CONTROLLER_SCAN_FILTER TRUE
1305 #ifndef LOCAL_BLE_CONTROLLER_ID
1306 #define LOCAL_BLE_CONTROLLER_ID (1)
1309 #ifndef BLE_PRIVACY_SPT
1310 #define BLE_PRIVACY_SPT TRUE
1313 #ifndef BLE_MULTI_ADV_INCLUDED
1314 #define BLE_MULTI_ADV_INCLUDED TRUE
1317 #ifndef BLE_VND_INCLUDED
1318 #define BLE_VND_INCLUDED TRUE
1321 #ifndef BLE_BATCH_SCAN_INCLUDED
1322 #define BLE_BATCH_SCAN_INCLUDED TRUE
1325 /******************************************************************************
1327 ** ATT/GATT Protocol/Profile Settings
1329 ******************************************************************************/
1330 #ifndef BTA_GATT_INCLUDED
1331 #if BLE_INCLUDED == TRUE
1332 #define BTA_GATT_INCLUDED TRUE
1334 #define BTA_GATT_INCLUDED FALSE
1338 #if BTA_GATT_INCLUDED == TRUE && BLE_INCLUDED == FALSE
1339 #error "can't have GATT without BLE"
1342 #ifndef BLE_LLT_INCLUDED
1343 #define BLE_LLT_INCLUDED TRUE
1345 #ifndef BTM_DUMO_ADDR_CENTRAL_ENABLED
1346 #define BTM_DUMO_ADDR_CENTRAL_ENABLED FALSE
1348 #ifndef ATT_INCLUDED
1349 #define ATT_INCLUDED TRUE
1353 #define ATT_DEBUG TRUE
1356 #ifndef GATT_SERVER_ENABLED
1357 #define GATT_SERVER_ENABLED TRUE
1360 #ifndef GATT_CLIENT_ENABLED
1361 #define GATT_CLIENT_ENABLED TRUE
1364 #ifndef BLE_PERIPHERAL_MODE_SUPPORT
1365 #define BLE_PERIPHERAL_MODE_SUPPORT TRUE
1368 #ifndef BLE_PERIPHERAL_DISPLAYONLY
1369 #define BLE_PERIPHERAL_DISPLAYONLY FALSE
1372 #ifndef BLE_PERIPHERAL_ADV_NAME
1373 #define BLE_PERIPHERAL_ADV_NAME FALSE
1376 #ifndef BLE_DELAY_REQUEST_ENC
1377 /* This flag is to work around IPHONE problem, We need to wait for iPhone ready
1378 before send encryption request to iPhone */
1379 #define BLE_DELAY_REQUEST_ENC FALSE
1382 #ifndef GAP_TRANSPORT_SUPPORTED
1383 #define GAP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
1386 #ifndef GATTP_TRANSPORT_SUPPORTED
1387 #define GATTP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
1390 #ifndef GATT_MAX_SR_PROFILES
1391 #define GATT_MAX_SR_PROFILES 32 /* max is 32 */
1394 #ifndef GATT_MAX_APPS
1395 #define GATT_MAX_APPS 10 /* note: 2 apps used internally GATT and GAP */
1398 #ifndef GATT_MAX_CL_PROFILES
1399 #define GATT_MAX_CL_PROFILES 4
1402 #ifndef GATT_MAX_PHY_CHANNEL
1403 #define GATT_MAX_PHY_CHANNEL 7
1406 /* Used for conformance testing ONLY */
1407 #ifndef GATT_CONFORMANCE_TESTING
1408 #define GATT_CONFORMANCE_TESTING FALSE
1411 /* number of background connection device allowence, ideally to be the same as WL size
1413 #ifndef GATT_MAX_BG_CONN_DEV
1414 #define GATT_MAX_BG_CONN_DEV 32
1417 /******************************************************************************
1421 ******************************************************************************/
1422 #ifndef SMP_INCLUDED
1423 #if BLE_INCLUDED == TRUE
1424 #define SMP_INCLUDED TRUE
1426 #define SMP_INCLUDED FALSE
1430 #if SMP_INCLUDED == TRUE && BLE_INCLUDED == FALSE
1431 #error "can't have SMP without BLE"
1435 #define SMP_DEBUG TRUE
1438 #ifndef SMP_DEFAULT_AUTH_REQ
1439 #define SMP_DEFAULT_AUTH_REQ SMP_AUTH_NB_ENC_ONLY
1442 #ifndef SMP_MAX_ENC_KEY_SIZE
1443 #define SMP_MAX_ENC_KEY_SIZE 16
1446 #ifndef SMP_MIN_ENC_KEY_SIZE
1447 #define SMP_MIN_ENC_KEY_SIZE 7
1450 /* Used for conformance testing ONLY */
1451 #ifndef SMP_CONFORMANCE_TESTING
1452 #define SMP_CONFORMANCE_TESTING FALSE
1455 /******************************************************************************
1459 ******************************************************************************/
1461 /* This is set to enable SDP server functionality. */
1462 #ifndef SDP_SERVER_ENABLED
1463 #define SDP_SERVER_ENABLED TRUE
1466 /* The maximum number of SDP records the server can support. */
1467 #ifndef SDP_MAX_RECORDS
1468 #define SDP_MAX_RECORDS 20
1471 /* The maximum number of attributes in each record. */
1472 #ifndef SDP_MAX_REC_ATTR
1473 //#if defined(HID_DEV_INCLUDED) && (HID_DEV_INCLUDED==TRUE)
1474 #define SDP_MAX_REC_ATTR 25
1476 //#define SDP_MAX_REC_ATTR 13
1480 #ifndef SDP_MAX_PAD_LEN
1481 #define SDP_MAX_PAD_LEN 600
1484 /* The maximum length, in bytes, of an attribute. */
1485 #ifndef SDP_MAX_ATTR_LEN
1486 //#if defined(HID_DEV_INCLUDED) && (HID_DEV_INCLUDED==TRUE)
1487 //#define SDP_MAX_ATTR_LEN 80
1489 //#define SDP_MAX_ATTR_LEN 100
1491 #define SDP_MAX_ATTR_LEN 400
1494 /* The maximum number of attribute filters supported by SDP databases. */
1495 #ifndef SDP_MAX_ATTR_FILTERS
1496 #define SDP_MAX_ATTR_FILTERS 15
1499 /* The maximum number of UUID filters supported by SDP databases. */
1500 #ifndef SDP_MAX_UUID_FILTERS
1501 #define SDP_MAX_UUID_FILTERS 3
1504 /* This is set to enable SDP client functionality. */
1505 #ifndef SDP_CLIENT_ENABLED
1506 #define SDP_CLIENT_ENABLED TRUE
1509 /* The maximum number of record handles retrieved in a search. */
1510 #ifndef SDP_MAX_DISC_SERVER_RECS
1511 #define SDP_MAX_DISC_SERVER_RECS 21
1514 /* The size of a scratchpad buffer, in bytes, for storing the response to an attribute request. */
1515 #ifndef SDP_MAX_LIST_BYTE_COUNT
1516 #define SDP_MAX_LIST_BYTE_COUNT 4096
1519 /* The maximum number of parameters in an SDP protocol element. */
1520 #ifndef SDP_MAX_PROTOCOL_PARAMS
1521 #define SDP_MAX_PROTOCOL_PARAMS 2
1524 /* The maximum number of simultaneous client and server connections. */
1525 #ifndef SDP_MAX_CONNECTIONS
1526 #define SDP_MAX_CONNECTIONS 4
1529 /* The MTU size for the L2CAP configuration. */
1530 #ifndef SDP_MTU_SIZE
1531 #define SDP_MTU_SIZE 672
1534 /* The flush timeout for the L2CAP configuration. */
1535 #ifndef SDP_FLUSH_TO
1536 #define SDP_FLUSH_TO 0xFFFF
1539 /* The name for security authorization. */
1540 #ifndef SDP_SERVICE_NAME
1541 #define SDP_SERVICE_NAME "Service Discovery"
1544 /* The security level for BTM. */
1545 #ifndef SDP_SECURITY_LEVEL
1546 #define SDP_SECURITY_LEVEL BTM_SEC_NONE
1549 /* Device identification feature. */
1550 #ifndef SDP_DI_INCLUDED
1551 #define SDP_DI_INCLUDED TRUE
1554 /******************************************************************************
1558 ******************************************************************************/
1560 #ifndef RFCOMM_INCLUDED
1561 #define RFCOMM_INCLUDED TRUE
1564 /* The maximum number of ports supported. */
1565 #ifndef MAX_RFC_PORTS
1566 #define MAX_RFC_PORTS 30
1569 /* The maximum simultaneous links to different devices. */
1570 #ifndef MAX_ACL_CONNECTIONS
1571 #define MAX_BD_CONNECTIONS 7
1573 #define MAX_BD_CONNECTIONS MAX_ACL_CONNECTIONS
1576 /* The port receive queue low watermark level, in bytes. */
1577 #ifndef PORT_RX_LOW_WM
1578 #define PORT_RX_LOW_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM)
1581 /* The port receive queue high watermark level, in bytes. */
1582 #ifndef PORT_RX_HIGH_WM
1583 #define PORT_RX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM)
1586 /* The port receive queue critical watermark level, in bytes. */
1587 #ifndef PORT_RX_CRITICAL_WM
1588 #define PORT_RX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM)
1591 /* The port receive queue low watermark level, in number of buffers. */
1592 #ifndef PORT_RX_BUF_LOW_WM
1593 #define PORT_RX_BUF_LOW_WM 4
1596 /* The port receive queue high watermark level, in number of buffers. */
1597 #ifndef PORT_RX_BUF_HIGH_WM
1598 #define PORT_RX_BUF_HIGH_WM 10
1601 /* The port receive queue critical watermark level, in number of buffers. */
1602 #ifndef PORT_RX_BUF_CRITICAL_WM
1603 #define PORT_RX_BUF_CRITICAL_WM 15
1606 /* The port transmit queue high watermark level, in bytes. */
1607 #ifndef PORT_TX_HIGH_WM
1608 #define PORT_TX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM)
1611 /* The port transmit queue critical watermark level, in bytes. */
1612 #ifndef PORT_TX_CRITICAL_WM
1613 #define PORT_TX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM)
1616 /* The port transmit queue high watermark level, in number of buffers. */
1617 #ifndef PORT_TX_BUF_HIGH_WM
1618 #define PORT_TX_BUF_HIGH_WM 10
1621 /* The port transmit queue high watermark level, in number of buffers. */
1622 #ifndef PORT_TX_BUF_CRITICAL_WM
1623 #define PORT_TX_BUF_CRITICAL_WM 15
1626 /* The RFCOMM multiplexer preferred flow control mechanism. */
1627 #ifndef PORT_FC_DEFAULT
1628 #define PORT_FC_DEFAULT PORT_FC_CREDIT
1631 /* The maximum number of credits receiver sends to peer when using credit-based flow control. */
1632 #ifndef PORT_CREDIT_RX_MAX
1633 #define PORT_CREDIT_RX_MAX 16
1636 /* The credit low watermark level. */
1637 #ifndef PORT_CREDIT_RX_LOW
1638 #define PORT_CREDIT_RX_LOW 8
1641 /* Test code allowing l2cap FEC on RFCOMM.*/
1642 #ifndef PORT_ENABLE_L2CAP_FCR_TEST
1643 #define PORT_ENABLE_L2CAP_FCR_TEST FALSE
1646 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1647 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_lock() or GKI_disable() */
1648 #ifndef PORT_SCHEDULE_LOCK
1649 #define PORT_SCHEDULE_LOCK GKI_disable()
1652 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1653 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_unlock() or GKI_enable() */
1654 #ifndef PORT_SCHEDULE_UNLOCK
1655 #define PORT_SCHEDULE_UNLOCK GKI_enable()
1658 /******************************************************************************
1662 ******************************************************************************/
1664 #ifndef TCS_INCLUDED
1665 #define TCS_INCLUDED FALSE
1668 /* If set to TRUE, gives lean TCS state machine configuration. */
1670 #define TCS_LEAN FALSE
1673 /* To include/exclude point-to-multipoint broadcast SETUP configuration. */
1674 #ifndef TCS_BCST_SETUP_INCLUDED
1675 #define TCS_BCST_SETUP_INCLUDED TRUE
1678 /* To include/exclude supplementary services. */
1679 #ifndef TCS_SUPP_SVCS_INCLUDED
1680 #define TCS_SUPP_SVCS_INCLUDED TRUE
1683 /* To include/exclude WUG master role. */
1684 #ifndef TCS_WUG_MASTER_INCLUDED
1685 #define TCS_WUG_MASTER_INCLUDED TRUE
1688 /* To include/exclude WUG member role. */
1689 #ifndef TCS_WUG_MEMBER_INCLUDED
1690 #define TCS_WUG_MEMBER_INCLUDED TRUE
1693 /* Maximum number of WUG members. */
1694 #ifndef TCS_MAX_WUG_MEMBERS
1695 #define TCS_MAX_WUG_MEMBERS 7
1698 /* Broadcom specific acknowledgement message to ensure fast and robust operation of WUG FIMA procedure. */
1699 #ifndef TCS_WUG_LISTEN_ACPT_ACK_INCLUDED
1700 #define TCS_WUG_LISTEN_ACPT_ACK_INCLUDED TRUE
1703 /* The number of simultaneous calls supported. */
1704 #ifndef TCS_MAX_NUM_SIMUL_CALLS
1705 #define TCS_MAX_NUM_SIMUL_CALLS 3
1708 /* The number of devices the device can connect to. */
1709 #ifndef TCS_MAX_NUM_ACL_CONNS
1710 #define TCS_MAX_NUM_ACL_CONNS 7
1713 /* The maximum length, in bytes, of the company specific information element. */
1714 #ifndef TCS_MAX_CO_SPEC_LEN
1715 #define TCS_MAX_CO_SPEC_LEN 40
1718 /* The maximum length, in bytes, of the audio control information element . */
1719 #ifndef TCS_MAX_AUDIO_CTL_LEN
1720 #define TCS_MAX_AUDIO_CTL_LEN 40
1723 /* (Dis)allow EDR ESCO */
1724 #ifndef TCS_AUDIO_USE_ESCO_EDR
1725 #define TCS_AUDIO_USE_ESCO_EDR FALSE
1728 /******************************************************************************
1732 ******************************************************************************/
1733 #ifndef OBX_INCLUDED
1734 #define OBX_INCLUDED FALSE
1737 #ifndef OBX_CLIENT_INCLUDED
1738 #define OBX_CLIENT_INCLUDED TRUE
1741 #ifndef OBX_SERVER_INCLUDED
1742 #define OBX_SERVER_INCLUDED TRUE
1745 /* TRUE to include OBEX authentication/MD5 code */
1746 #ifndef OBX_MD5_INCLUDED
1747 #define OBX_MD5_INCLUDED TRUE
1750 /* TRUE to include OBEX authentication/MD5 test code */
1751 #ifndef OBX_MD5_TEST_INCLUDED
1752 #define OBX_MD5_TEST_INCLUDED FALSE
1755 /* TRUE to include OBEX 1.4 enhancement (including Obex Over L2CAP) */
1756 #ifndef OBX_14_INCLUDED
1757 #define OBX_14_INCLUDED FALSE
1759 /* MD5 code is required to use OBEX 1.4 features (Reliable session) */
1760 #if (OBX_MD5_INCLUDED == FALSE)
1761 #undef OBX_14_INCLUDED
1762 #define OBX_14_INCLUDED FALSE
1765 /* L2CAP FCR/eRTM mode is required to use OBEX Over L2CAP */
1766 #if (L2CAP_FCR_INCLUDED == FALSE)
1767 #undef OBX_14_INCLUDED
1768 #define OBX_14_INCLUDED FALSE
1771 /* The timeout value (in seconds) for reliable sessions to remain in suspend. 0xFFFFFFFF for no timeout event. */
1772 #ifndef OBX_SESS_TIMEOUT_VALUE
1773 #define OBX_SESS_TIMEOUT_VALUE 600
1776 /* The idle timeout value. 0 for no timeout event. */
1777 #ifndef OBX_TIMEOUT_VALUE
1778 #define OBX_TIMEOUT_VALUE 60
1781 /* Timeout value used for disconnect */
1782 #ifndef OBX_DISC_TOUT_VALUE
1783 #define OBX_DISC_TOUT_VALUE 5
1786 /* The maximum number of registered servers. */
1787 #ifndef OBX_NUM_SERVERS
1788 #define OBX_NUM_SERVERS 12
1791 /* The maximum number of sessions per registered server. */
1792 #ifndef OBX_MAX_SR_SESSION
1793 #define OBX_MAX_SR_SESSION 4
1796 /* The maximum number of sessions for all registered servers.
1797 * (must be equal or bigger than OBX_NUM_SERVERS) */
1798 #ifndef OBX_NUM_SR_SESSIONS
1799 #define OBX_NUM_SR_SESSIONS 26
1802 /* The maximum number of sessions per registered server.
1803 * must be less than MAX_BD_CONNECTIONS */
1804 #ifndef OBX_MAX_SR_SESSION
1805 #define OBX_MAX_SR_SESSION 4
1808 /* The maximum number of suspended sessions per registered servers. */
1809 #ifndef OBX_MAX_SUSPEND_SESSIONS
1810 #define OBX_MAX_SUSPEND_SESSIONS 4
1813 /* The maximum number of active clients. */
1814 #ifndef OBX_NUM_CLIENTS
1815 #define OBX_NUM_CLIENTS 8
1818 /* The maximum length of OBEX target header.*/
1819 #ifndef OBX_MAX_TARGET_LEN
1820 #define OBX_MAX_TARGET_LEN 16
1823 /* The maximum length of authentication challenge realm.*/
1824 #ifndef OBX_MAX_REALM_LEN
1825 #define OBX_MAX_REALM_LEN 30
1828 /* The maximum of GKI buffer queued at OBX before flow control L2CAP */
1829 #ifndef OBX_MAX_RX_QUEUE_COUNT
1830 #define OBX_MAX_RX_QUEUE_COUNT 3
1833 /* This option is application when OBX_14_INCLUDED=TRUE
1834 Pool ID where to reassemble the SDU.
1835 This Pool will allow buffers to be used that are larger than
1836 the L2CAP_MAX_MTU. */
1837 #ifndef OBX_USER_RX_POOL_ID
1838 #define OBX_USER_RX_POOL_ID OBX_LRG_DATA_POOL_ID
1841 /* This option is application when OBX_14_INCLUDED=TRUE
1842 Pool ID where to hold the SDU.
1843 This Pool will allow buffers to be used that are larger than
1844 the L2CAP_MAX_MTU. */
1845 #ifndef OBX_USER_TX_POOL_ID
1846 #define OBX_USER_TX_POOL_ID OBX_LRG_DATA_POOL_ID
1849 /* This option is application when OBX_14_INCLUDED=TRUE
1850 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
1852 #ifndef OBX_FCR_RX_POOL_ID
1853 #define OBX_FCR_RX_POOL_ID HCI_ACL_POOL_ID
1856 /* This option is application when OBX_14_INCLUDED=TRUE
1857 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
1858 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
1859 Note: This pool needs to have enough buffers to hold two times the window size negotiated
1860 in the L2CA_SetFCROptions (2 * tx_win_size) to allow for retransmissions.
1861 The size of each buffer must be able to hold the maximum MPS segment size passed in
1862 L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1864 #ifndef OBX_FCR_TX_POOL_ID
1865 #define OBX_FCR_TX_POOL_ID HCI_ACL_POOL_ID
1868 /* This option is application when OBX_14_INCLUDED=TRUE
1869 Size of the transmission window when using enhanced retransmission mode. Not used
1870 in basic and streaming modes. Range: 1 - 63
1872 #ifndef OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR
1873 #define OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR 20
1876 /* This option is application when OBX_14_INCLUDED=TRUE
1877 Number of transmission attempts for a single I-Frame before taking
1878 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1881 0 - infinite retransmissions
1882 1 - single transmission
1884 #ifndef OBX_FCR_OPT_MAX_TX_B4_DISCNT
1885 #define OBX_FCR_OPT_MAX_TX_B4_DISCNT 20
1888 /* This option is application when OBX_14_INCLUDED=TRUE
1889 Retransmission Timeout
1890 Range: Minimum 2000 (2 secs) on BR/EDR when supporting PBF.
1892 #ifndef OBX_FCR_OPT_RETX_TOUT
1893 #define OBX_FCR_OPT_RETX_TOUT 2000
1896 /* This option is application when OBX_14_INCLUDED=TRUE
1898 Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
1900 #ifndef OBX_FCR_OPT_MONITOR_TOUT
1901 #define OBX_FCR_OPT_MONITOR_TOUT 12000
1904 /******************************************************************************
1908 ******************************************************************************/
1910 #ifndef BNEP_INCLUDED
1911 #define BNEP_INCLUDED TRUE
1914 /* Protocol filtering is an optional feature. Bydefault it will be turned on */
1915 #ifndef BNEP_SUPPORTS_PROT_FILTERS
1916 #define BNEP_SUPPORTS_PROT_FILTERS TRUE
1919 /* Multicast filtering is an optional feature. Bydefault it will be turned on */
1920 #ifndef BNEP_SUPPORTS_MULTI_FILTERS
1921 #define BNEP_SUPPORTS_MULTI_FILTERS TRUE
1924 /* BNEP status API call is used mainly to get the L2CAP handle */
1925 #ifndef BNEP_SUPPORTS_STATUS_API
1926 #define BNEP_SUPPORTS_STATUS_API TRUE
1929 /* This is just a debug function */
1930 #ifndef BNEP_SUPPORTS_DEBUG_DUMP
1931 #define BNEP_SUPPORTS_DEBUG_DUMP TRUE
1934 #ifndef BNEP_SUPPORTS_ALL_UUID_LENGTHS
1935 #define BNEP_SUPPORTS_ALL_UUID_LENGTHS TRUE /* Otherwise it will support only 16bit UUIDs */
1939 ** When BNEP connection changes roles after the connection is established
1940 ** we will do an authentication check again on the new role
1942 #ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH
1943 #define BNEP_DO_AUTH_FOR_ROLE_SWITCH TRUE
1947 /* Maximum number of protocol filters supported. */
1948 #ifndef BNEP_MAX_PROT_FILTERS
1949 #define BNEP_MAX_PROT_FILTERS 5
1952 /* Maximum number of multicast filters supported. */
1953 #ifndef BNEP_MAX_MULTI_FILTERS
1954 #define BNEP_MAX_MULTI_FILTERS 5
1957 /* Minimum MTU size. */
1958 #ifndef BNEP_MIN_MTU_SIZE
1959 #define BNEP_MIN_MTU_SIZE L2CAP_MTU_SIZE
1962 /* Preferred MTU size. */
1963 #ifndef BNEP_MTU_SIZE
1964 #define BNEP_MTU_SIZE BNEP_MIN_MTU_SIZE
1967 /* Maximum size of user data, in bytes. */
1968 #ifndef BNEP_MAX_USER_DATA_SIZE
1969 #define BNEP_MAX_USER_DATA_SIZE 1500
1972 /* Maximum number of buffers allowed in transmit data queue. */
1973 #ifndef BNEP_MAX_XMITQ_DEPTH
1974 #define BNEP_MAX_XMITQ_DEPTH 20
1977 /* Maximum number BNEP of connections supported. */
1978 #ifndef BNEP_MAX_CONNECTIONS
1979 #define BNEP_MAX_CONNECTIONS 7
1983 /******************************************************************************
1987 ******************************************************************************/
1989 #ifndef AVDT_INCLUDED
1990 #define AVDT_INCLUDED TRUE
1993 /* Include reporting capability in AVDTP */
1994 #ifndef AVDT_REPORTING
1995 #define AVDT_REPORTING TRUE
1998 /* Include multiplexing capability in AVDTP */
1999 #ifndef AVDT_MULTIPLEXING
2000 #define AVDT_MULTIPLEXING TRUE
2003 /* Number of simultaneous links to different peer devices. */
2004 #ifndef AVDT_NUM_LINKS
2005 #define AVDT_NUM_LINKS 2
2008 /* Number of simultaneous stream endpoints. */
2009 #ifndef AVDT_NUM_SEPS
2010 #define AVDT_NUM_SEPS 3
2013 /* Number of transport channels setup per media stream(audio or video) */
2014 #ifndef AVDT_NUM_CHANNELS
2016 #if AVDT_REPORTING == TRUE
2017 /* signaling, media and reporting channels */
2018 #define AVDT_NUM_CHANNELS 3
2020 /* signaling and media channels */
2021 #define AVDT_NUM_CHANNELS 2
2026 /* Number of transport channels setup by AVDT for all media streams
2027 * AVDT_NUM_CHANNELS * Number of simultaneous streams.
2029 #ifndef AVDT_NUM_TC_TBL
2030 #define AVDT_NUM_TC_TBL 6
2034 /* Maximum size in bytes of the codec capabilities information element. */
2035 #ifndef AVDT_CODEC_SIZE
2036 #define AVDT_CODEC_SIZE 10
2039 /* Maximum size in bytes of the content protection information element. */
2040 #ifndef AVDT_PROTECT_SIZE
2041 #define AVDT_PROTECT_SIZE 90
2044 /* Maximum number of GKI buffers in the fragment queue (for video frames).
2045 * Must be less than the number of buffers in the buffer pool of size AVDT_DATA_POOL_SIZE */
2046 #ifndef AVDT_MAX_FRAG_COUNT
2047 #define AVDT_MAX_FRAG_COUNT 15
2050 /******************************************************************************
2054 ******************************************************************************/
2056 #ifndef PAN_INCLUDED
2057 #define PAN_INCLUDED TRUE
2060 /* This will enable the PANU role */
2061 #ifndef PAN_SUPPORTS_ROLE_PANU
2062 #define PAN_SUPPORTS_ROLE_PANU TRUE
2065 /* This will enable the GN role */
2066 #ifndef PAN_SUPPORTS_ROLE_GN
2067 #define PAN_SUPPORTS_ROLE_GN TRUE
2070 /* This will enable the NAP role */
2071 #ifndef PAN_SUPPORTS_ROLE_NAP
2072 #define PAN_SUPPORTS_ROLE_NAP TRUE
2075 /* This is just for debugging purposes */
2076 #ifndef PAN_SUPPORTS_DEBUG_DUMP
2077 #define PAN_SUPPORTS_DEBUG_DUMP TRUE
2081 /* Maximum number of PAN connections allowed */
2082 #ifndef MAX_PAN_CONNS
2083 #define MAX_PAN_CONNS 7
2086 /* Default service name for NAP role */
2087 #ifndef PAN_NAP_DEFAULT_SERVICE_NAME
2088 #define PAN_NAP_DEFAULT_SERVICE_NAME "Network Access Point Service"
2091 /* Default service name for GN role */
2092 #ifndef PAN_GN_DEFAULT_SERVICE_NAME
2093 #define PAN_GN_DEFAULT_SERVICE_NAME "Group Network Service"
2096 /* Default service name for PANU role */
2097 #ifndef PAN_PANU_DEFAULT_SERVICE_NAME
2098 #define PAN_PANU_DEFAULT_SERVICE_NAME "PAN User Service"
2101 /* Default description for NAP role service */
2102 #ifndef PAN_NAP_DEFAULT_DESCRIPTION
2103 #define PAN_NAP_DEFAULT_DESCRIPTION "NAP"
2106 /* Default description for GN role service */
2107 #ifndef PAN_GN_DEFAULT_DESCRIPTION
2108 #define PAN_GN_DEFAULT_DESCRIPTION "GN"
2111 /* Default description for PANU role service */
2112 #ifndef PAN_PANU_DEFAULT_DESCRIPTION
2113 #define PAN_PANU_DEFAULT_DESCRIPTION "PANU"
2116 /* Default Security level for PANU role. */
2117 #ifndef PAN_PANU_SECURITY_LEVEL
2118 #define PAN_PANU_SECURITY_LEVEL 0
2121 /* Default Security level for GN role. */
2122 #ifndef PAN_GN_SECURITY_LEVEL
2123 #define PAN_GN_SECURITY_LEVEL 0
2126 /* Default Security level for NAP role. */
2127 #ifndef PAN_NAP_SECURITY_LEVEL
2128 #define PAN_NAP_SECURITY_LEVEL 0
2134 /******************************************************************************
2138 ******************************************************************************/
2140 #ifndef GAP_INCLUDED
2141 #define GAP_INCLUDED TRUE
2144 /* This is set to enable use of GAP L2CAP connections. */
2145 #ifndef GAP_CONN_INCLUDED
2146 #define GAP_CONN_INCLUDED TRUE
2149 /* This is set to enable posting event for data write */
2150 #ifndef GAP_CONN_POST_EVT_INCLUDED
2151 #define GAP_CONN_POST_EVT_INCLUDED FALSE
2154 /* The maximum number of simultaneous GAP L2CAP connections. */
2155 #ifndef GAP_MAX_CONNECTIONS
2156 #define GAP_MAX_CONNECTIONS 8
2159 /******************************************************************************
2163 ******************************************************************************/
2165 #ifndef CTP_INCLUDED
2166 #define CTP_INCLUDED FALSE
2169 /* To include CTP gateway functionality or not. */
2170 #ifndef CTP_GW_INCLUDED
2171 #define CTP_GW_INCLUDED TRUE
2174 /* The number of terminals supported. */
2175 #ifndef CTP_MAX_NUM_TLS
2176 #define CTP_MAX_NUM_TLS 7
2179 /* If the controller can not support sniff mode when the SCO is up, set this to FALSE. */
2180 #ifndef CTP_USE_SNIFF_ON_SCO
2181 #define CTP_USE_SNIFF_ON_SCO FALSE
2184 /* When ACL link between TL and GW is idle for more than this amount of seconds, the ACL may be put to low power mode. */
2185 #ifndef CTP_TL_IDLE_TIMEOUT
2186 #define CTP_TL_IDLE_TIMEOUT 90
2189 /* To include CTP terminal functionality or not. */
2190 #ifndef CTP_TL_INCLUDED
2191 #define CTP_TL_INCLUDED TRUE
2194 /* To include CTP device discovery functionality or not. */
2195 #ifndef CTP_DISCOVERY_INCLUDED
2196 #define CTP_DISCOVERY_INCLUDED TRUE
2199 /* set to TRUE for controllers that do not support multi-point */
2200 #ifndef CTP_TL_WAIT_DISC
2201 #define CTP_TL_WAIT_DISC TRUE
2204 /* The CTP inquiry database size. */
2205 #ifndef CTP_INQ_DB_SIZE
2206 #define CTP_INQ_DB_SIZE CTP_DISC_REC_SIZE
2209 /* The CTP discovery record size. */
2210 #ifndef CTP_DISC_REC_SIZE
2211 #define CTP_DISC_REC_SIZE 60
2214 /* CTP TL would try to re-establish L2CAP channel after channel is disconnected for this amount of seconds. */
2215 #ifndef CTP_GUARD_LINK_LOST
2216 #define CTP_GUARD_LINK_LOST 1
2219 /* The link policy bitmap. */
2220 #ifndef CTP_DEFAULT_LINK_POLICY
2221 #define CTP_DEFAULT_LINK_POLICY 0x000F
2224 /* The minimum period interval used for the sniff and park modes. */
2225 #ifndef CTP_DEF_LOWPWR_MIN_PERIOD
2226 #define CTP_DEF_LOWPWR_MIN_PERIOD 0x100
2229 /* The maximum period interval used for the sniff and park modes. */
2230 #ifndef CTP_DEF_LOWPWR_MAX_PERIOD
2231 #define CTP_DEF_LOWPWR_MAX_PERIOD 0x1E0
2234 /* The number of baseband receive slot sniff attempts. */
2235 #ifndef CTP_DEF_LOWPWR_ATTEMPT
2236 #define CTP_DEF_LOWPWR_ATTEMPT 0x200
2239 /* The number of baseband receive slots for sniff timeout. */
2240 #ifndef CTP_DEF_LOWPWR_TIMEOUT
2241 #define CTP_DEF_LOWPWR_TIMEOUT 0x200
2244 /* This is set if CTP is to use park mode. */
2245 #ifndef CTP_PARK_INCLUDED
2246 #define CTP_PARK_INCLUDED TRUE
2249 /* This is set if CTP is to use sniff mode. */
2250 #ifndef CTP_SNIFF_INCLUDED
2251 #define CTP_SNIFF_INCLUDED TRUE
2254 /* To include CTP data exchange functionality or not. */
2255 #ifndef CTP_DATA_EXCHG_FEATURE
2256 #define CTP_DATA_EXCHG_FEATURE FALSE
2259 /* To include CTP GW intercom functionality or not. */
2260 #ifndef CTP_GW_INTERCOM_FEATURE
2261 #define CTP_GW_INTERCOM_FEATURE FALSE
2264 /* The MTU size for L2CAP channel. */
2265 #ifndef CTP_MTU_SIZE
2266 #define CTP_MTU_SIZE 200
2269 /* The L2CAP PSM for the data exchange feature. */
2270 #ifndef CTP_DATA_EXCHG_PSM
2271 #define CTP_DATA_EXCHG_PSM 13
2274 /* The flush timeout for L2CAP channels. */
2275 #ifndef CTP_FLUSH_TO
2276 #define CTP_FLUSH_TO 0xFFFF
2279 /* The default service name for CTP. */
2280 #ifndef CTP_DEFAULT_SERVICE_NAME
2281 #define CTP_DEFAULT_SERVICE_NAME "Cordless Telephony"
2284 /* The CTP security level. */
2285 #ifndef CTP_SECURITY_LEVEL
2286 #define CTP_SECURITY_LEVEL (BTM_SEC_IN_AUTHORIZE | BTM_SEC_IN_AUTHENTICATE | BTM_SEC_IN_ENCRYPT)
2289 /* The number of lines to the external network. */
2290 #ifndef CTP_MAX_LINES
2291 #define CTP_MAX_LINES 1
2294 /* Test if the number of resources in TCS is consistent with CTP setting. */
2295 #ifndef CTP_TEST_FULL_TCS
2296 #define CTP_TEST_FULL_TCS TRUE
2299 /* The default inquiry mode. */
2300 #ifndef CTP_DEFAULT_INQUIRY_MODE
2301 #define CTP_DEFAULT_INQUIRY_MODE BTM_GENERAL_INQUIRY
2304 /* The default inquiry duration. */
2305 #ifndef CTP_DEFAULT_INQ_DURATION
2306 #define CTP_DEFAULT_INQ_DURATION 4
2309 /* The maximum number of inquiry responses. */
2310 #ifndef CTP_DEFAULT_INQ_MAX_RESP
2311 #define CTP_DEFAULT_INQ_MAX_RESP 3
2314 /* When TL does not create another L2CAP channel within this period of time GW declares that it's "Connected Limited". */
2315 #ifndef CTP_TL_CONN_TIMEOUT
2316 #define CTP_TL_CONN_TIMEOUT 5
2319 /* The delay for ACL to completely disconnect (for intercom) before sending the connect request to GW. */
2320 #ifndef CTP_RECONNECT_DELAY
2321 #define CTP_RECONNECT_DELAY 5
2324 /* How many times to retry connection when it has failed. */
2325 #ifndef CTP_RETRY_ON_CONN_ERR
2326 #define CTP_RETRY_ON_CONN_ERR 5
2329 /******************************************************************************
2333 ******************************************************************************/
2335 #ifndef ICP_INCLUDED
2336 #define ICP_INCLUDED FALSE
2339 /* The ICP default MTU. */
2340 #ifndef ICP_MTU_SIZE
2341 #define ICP_MTU_SIZE 100
2344 /* The ICP security level. */
2345 #ifndef ICP_SECURITY_LEVEL
2346 #define ICP_SECURITY_LEVEL BTM_SEC_NONE
2349 /* The default service name for ICP. */
2350 #ifndef ICP_DEFAULT_SERVICE_NAME
2351 #define ICP_DEFAULT_SERVICE_NAME "Intercom"
2354 /* The flush timeout for L2CAP channels. */
2355 #ifndef ICP_FLUSH_TO
2356 #define ICP_FLUSH_TO 0xFFFF
2359 /******************************************************************************
2363 ******************************************************************************/
2365 #ifndef SPP_INCLUDED
2366 #define SPP_INCLUDED FALSE
2369 /* The SPP default MTU. */
2370 #ifndef SPP_DEFAULT_MTU
2371 #define SPP_DEFAULT_MTU 127
2374 /* The interval, in seconds, that a client tries to reconnect to a service. */
2375 #ifndef SPP_RETRY_CONN_INTERVAL
2376 #define SPP_RETRY_CONN_INTERVAL 1
2379 /* The SPP discoverable mode: limited or general. */
2380 #ifndef SPP_DISCOVERABLE_MODE
2381 #define SPP_DISCOVERABLE_MODE BTM_GENERAL_DISCOVERABLE
2384 /* The maximum number of inquiry results returned in by inquiry procedure. */
2385 #ifndef SPP_DEF_INQ_MAX_RESP
2386 #define SPP_DEF_INQ_MAX_RESP 10
2389 /* The SPP discovery record size. */
2390 #ifndef SPP_DISC_REC_SIZE
2391 #define SPP_DISC_REC_SIZE 60
2394 #ifndef SPP_MAX_RECS_PER_DEVICE
2395 #define SPP_MAX_RECS_PER_DEVICE (SPP_DB_SIZE / SPP_DISC_REC_SIZE)
2398 /* Inquiry duration in 1.28 second units. */
2399 #ifndef SPP_DEF_INQ_DURATION
2400 #define SPP_DEF_INQ_DURATION 9
2403 /* keep the raw data received from SDP server in database. */
2404 #ifndef SDP_RAW_DATA_INCLUDED
2405 #define SDP_RAW_DATA_INCLUDED TRUE
2408 /* TRUE, to allow JV to create L2CAP connection on SDP PSM. */
2409 #ifndef SDP_FOR_JV_INCLUDED
2410 #define SDP_FOR_JV_INCLUDED FALSE
2413 /* Inquiry duration in 1.28 second units. */
2415 #define SDP_DEBUG TRUE
2418 /******************************************************************************
2422 ******************************************************************************/
2424 #ifndef HSP2_INCLUDED
2425 #define HSP2_INCLUDED FALSE
2428 /* Include the ability to perform inquiry for peer devices. */
2429 #ifndef HSP2_INQUIRY_INCLUDED
2430 #define HSP2_INQUIRY_INCLUDED TRUE
2433 /* Include Audio Gateway specific code. */
2434 #ifndef HSP2_AG_INCLUDED
2435 #define HSP2_AG_INCLUDED TRUE
2438 /* Include Headset Specific Code. */
2439 #ifndef HSP2_HS_INCLUDED
2440 #define HSP2_HS_INCLUDED TRUE
2443 /* Include the ability to open an SCO connection for In-Band Ringing. */
2444 #ifndef HSP2_IB_RING_INCLUDED
2445 #define HSP2_IB_RING_INCLUDED TRUE
2448 /* Include the ability to repeat a ring. */
2449 #ifndef HSP2_AG_REPEAT_RING
2450 #define HSP2_AG_REPEAT_RING TRUE
2453 #ifndef HSP2_APP_CLOSES_ON_CKPD
2454 #define HSP2_APP_CLOSES_ON_CKPD FALSE
2458 /* Include the ability to park a connection. */
2459 #ifndef HSP2_PARK_INCLUDED
2460 #define HSP2_PARK_INCLUDED TRUE
2463 /* Include HSP State Machine debug trace messages. */
2464 #ifndef HSP2_FSM_DEBUG
2465 #define HSP2_FSM_DEBUG TRUE
2468 /* The Module's Inquiry Scan Window. */
2469 #ifndef HSP2_INQ_SCAN_WINDOW
2470 #define HSP2_INQ_SCAN_WINDOW 0
2473 /* The Module's Inquiry Scan Interval. */
2474 #ifndef HSP2_INQ_SCAN_INTERVAL
2475 #define HSP2_INQ_SCAN_INTERVAL 0
2478 /* The Module's Page Scan Interval. */
2479 #ifndef HSP2_PAGE_SCAN_INTERVAL
2480 #define HSP2_PAGE_SCAN_INTERVAL 0
2483 /* The Module's Page Scan Window. */
2484 #ifndef HSP2_PAGE_SCAN_WINDOW
2485 #define HSP2_PAGE_SCAN_WINDOW 0
2488 /* The Park Mode's Minimum Beacon Period. */
2489 #ifndef HSP2_BEACON_MIN_PERIOD
2490 #define HSP2_BEACON_MIN_PERIOD 450
2493 /* The Park Mode's Maximum Beacon Period. */
2494 #ifndef HSP2_BEACON_MAX_PERIOD
2495 #define HSP2_BEACON_MAX_PERIOD 500
2498 /* The duration of the inquiry in seconds. */
2499 #ifndef HSP2_INQ_DURATION
2500 #define HSP2_INQ_DURATION 4
2503 /* Maximum number of peer responses during an inquiry. */
2504 #ifndef HSP2_INQ_MAX_NUM_RESPS
2505 #define HSP2_INQ_MAX_NUM_RESPS 3
2508 /* Maximum number of times to retry an inquiry prior to failure. */
2509 #ifndef HSP2_MAX_INQ_RETRY
2510 #define HSP2_MAX_INQ_RETRY 6
2513 /* Maximum number of times to retry an RFCOMM connection prior to failure. */
2514 #ifndef HSP2_MAX_CONN_RETRY
2515 #define HSP2_MAX_CONN_RETRY 3
2518 /* If the connect request failed for authentication reasons, do not retry */
2519 #ifndef HSP2_NO_RETRY_ON_AUTH_FAIL
2520 #define HSP2_NO_RETRY_ON_AUTH_FAIL TRUE
2523 /* Maximum number of characters in an HSP2 device name. */
2524 #ifndef HSP2_MAX_NAME_LEN
2525 #define HSP2_MAX_NAME_LEN 32
2528 /* The minimum speaker and/or microphone gain setting. */
2529 #ifndef HSP2_MIN_GAIN
2530 #define HSP2_MIN_GAIN 0
2533 /* The maximum speaker and/or microphone setting. */
2534 #ifndef HSP2_MAX_GAIN
2535 #define HSP2_MAX_GAIN 15
2538 /* The default value to send on an AT+CKPD. */
2539 #ifndef HSP2_KEYPRESS_DEFAULT
2540 #define HSP2_KEYPRESS_DEFAULT 200
2543 /* Maximum amount a data that can be received per RFCOMM frame. */
2544 #ifndef HSP2_MAX_RFC_READ_LEN
2545 #define HSP2_MAX_RFC_READ_LEN 128
2548 /* The time in seconds to wait for completion of a partial AT command or response from the peer. */
2549 #ifndef HSP2_AT_TO_INTERVAL
2550 #define HSP2_AT_TO_INTERVAL 30
2553 /* The time to wait before repeating a ring to a peer Headset. */
2554 #ifndef HSP2_REPEAT_RING_TO
2555 #define HSP2_REPEAT_RING_TO 4
2558 /* Time to wait for a response for an AT command */
2559 #ifndef HSP2_AT_RSP_TO
2560 #define HSP2_AT_RSP_TO 20
2563 /* SCO packet type(s) to use (bitmask: see spec), 0 - device default (recommended) */
2564 #ifndef HSP2_SCO_PKT_TYPES
2565 #define HSP2_SCO_PKT_TYPES ((UINT16)0x0000)
2568 /* The default settings of the SCO voice link. */
2569 #ifndef HSP2_DEFAULT_VOICE_SETTINGS
2570 #define HSP2_DEFAULT_VOICE_SETTINGS (HCI_INP_CODING_LINEAR | HCI_INP_DATA_FMT_2S_COMPLEMENT | HCI_INP_SAMPLE_SIZE_16BIT | HCI_AIR_CODING_FORMAT_CVSD)
2573 #ifndef HSP2_MAX_AT_CMD_LENGTH
2574 #define HSP2_MAX_AT_CMD_LENGTH 16
2577 #ifndef HSP2_MAX_AT_VAL_LENGTH
2578 #if (defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE)
2579 #define HSP2_MAX_AT_VAL_LENGTH 310
2581 #define HSP2_MAX_AT_VAL_LENGTH 5
2586 #ifndef HSP2_SDP_DB_SIZE
2587 #define HSP2_SDP_DB_SIZE 300
2591 /******************************************************************************
2595 ******************************************************************************/
2597 #ifndef HFP_INCLUDED
2598 #define HFP_INCLUDED FALSE
2601 /* Include Audio Gateway specific code. */
2602 #ifndef HFP_AG_INCLUDED
2603 #define HFP_AG_INCLUDED TRUE
2606 /* Include Hand Free Specific Code. */
2607 #ifndef HFP_HF_INCLUDED
2608 #define HFP_HF_INCLUDED TRUE
2611 /* Use AT interface instead of full blown API */
2612 #ifndef AT_INTERFACE
2613 #define AT_INTERFACE FALSE
2616 /* HFP Manages SCO establishement for various procedures */
2617 #ifndef HFP_SCO_MGMT_INCLUDED
2618 #define HFP_SCO_MGMT_INCLUDED TRUE
2621 /* CCAP compliant features and behavior desired */
2622 #ifndef CCAP_COMPLIANCE
2623 #define CCAP_COMPLIANCE TRUE
2626 /* Caller ID string, part of +CLIP result code */
2627 #ifndef HFP_MAX_CLIP_INFO
2628 #define HFP_MAX_CLIP_INFO 45
2631 #ifndef HFP_RPT_PEER_INFO_INCLUDED
2632 #define HFP_RPT_PEER_INFO_INCLUDED TRUE /* Reporting of peer features enabled */
2635 /******************************************************************************
2639 ******************************************************************************/
2641 /* HID Device Role Included */
2642 #ifndef HID_DEV_INCLUDED
2643 #define HID_DEV_INCLUDED FALSE
2646 #ifndef HID_DEV_PM_INCLUDED
2647 #define HID_DEV_PM_INCLUDED TRUE
2650 /* The HID Device is a virtual cable */
2651 #ifndef HID_DEV_VIRTUAL_CABLE
2652 #define HID_DEV_VIRTUAL_CABLE TRUE
2655 /* The HID device initiates the reconnections */
2656 #ifndef HID_DEV_RECONN_INITIATE
2657 #define HID_DEV_RECONN_INITIATE TRUE
2660 /* THe HID device is normally connectable */
2661 #ifndef HID_DEV_NORMALLY_CONN
2662 #define HID_DEV_NORMALLY_CONN FALSE
2665 /* The device is battery powered */
2666 #ifndef HID_DEV_BATTERY_POW
2667 #define HID_DEV_BATTERY_POW TRUE
2670 /* Device is capable of waking up the host */
2671 #ifndef HID_DEV_REMOTE_WAKE
2672 #define HID_DEV_REMOTE_WAKE TRUE
2675 /* Device needs host to close SDP channel after SDP is over */
2676 #ifndef HID_DEV_SDP_DISABLE
2677 #define HID_DEV_SDP_DISABLE TRUE
2680 #ifndef HID_DEV_MTU_SIZE
2681 #define HID_DEV_MTU_SIZE 64
2684 #ifndef HID_DEV_FLUSH_TO
2685 #define HID_DEV_FLUSH_TO 0xffff
2688 #ifndef HID_DEV_PAGE_SCAN_WIN
2689 #define HID_DEV_PAGE_SCAN_WIN (0)
2692 #ifndef HID_DEV_PAGE_SCAN_INT
2693 #define HID_DEV_PAGE_SCAN_INT (0)
2696 #ifndef HID_DEV_MAX_CONN_RETRY
2697 #define HID_DEV_MAX_CONN_RETRY (15)
2700 #ifndef HID_DEV_REPAGE_WIN
2701 #define HID_DEV_REPAGE_WIN (1)
2704 #ifndef HID_DEV_SVC_NAME
2705 #define HID_DEV_SVC_NAME "HID"
2708 #ifndef HID_DEV_SVC_DESCR
2709 #define HID_DEV_SVC_DESCR "3-button mouse and keyboard"
2712 #ifndef HID_DEV_PROVIDER_NAME
2713 #define HID_DEV_PROVIDER_NAME "Widcomm"
2716 #ifndef HID_DEV_REL_NUM
2717 #define HID_DEV_REL_NUM 0x0100
2720 #ifndef HID_DEV_PARSER_VER
2721 #define HID_DEV_PARSER_VER 0x0111
2724 #ifndef HID_DEV_SUBCLASS
2725 #define HID_DEV_SUBCLASS COD_MINOR_POINTING
2728 #ifndef HID_DEV_COUNTRY_CODE
2729 #define HID_DEV_COUNTRY_CODE 0x33
2732 #ifndef HID_DEV_SUP_TOUT
2733 #define HID_DEV_SUP_TOUT 0x8000
2736 #ifndef HID_DEV_NUM_LANGS
2737 #define HID_DEV_NUM_LANGS 1
2740 #ifndef HID_DEV_INACT_TIMEOUT
2741 #define HID_DEV_INACT_TIMEOUT 60
2744 #ifndef HID_DEV_BUSY_MODE_PARAMS
2745 #define HID_DEV_BUSY_MODE_PARAMS { 320, 160, 10, 20, HCI_MODE_ACTIVE }
2748 #ifndef HID_DEV_IDLE_MODE_PARAMS
2749 #define HID_DEV_IDLE_MODE_PARAMS { 320, 160, 10, 20, HCI_MODE_SNIFF }
2752 #ifndef HID_DEV_SUSP_MODE_PARAMS
2753 #define HID_DEV_SUSP_MODE_PARAMS { 640, 320, 0, 0, HCI_MODE_PARK }
2756 #ifndef HID_DEV_MAX_DESCRIPTOR_SIZE
2757 #define HID_DEV_MAX_DESCRIPTOR_SIZE 128 /* Max descriptor size */
2760 #ifndef HID_DEV_LANGUAGELIST
2761 #define HID_DEV_LANGUAGELIST {0x35, 0x06, 0x09, 0x04, 0x09, 0x09, 0x01, 0x00}
2764 #ifndef HID_DEV_LINK_SUPERVISION_TO
2765 #define HID_DEV_LINK_SUPERVISION_TO 0x8000
2768 #ifndef HID_CONTROL_POOL_ID
2769 #define HID_CONTROL_POOL_ID 2
2772 #ifndef HID_INTERRUPT_POOL_ID
2773 #define HID_INTERRUPT_POOL_ID 2
2776 /*************************************************************************
2777 ** Definitions for Both HID-Host & Device
2779 #ifndef HID_MAX_SVC_NAME_LEN
2780 #define HID_MAX_SVC_NAME_LEN 32
2783 #ifndef HID_MAX_SVC_DESCR_LEN
2784 #define HID_MAX_SVC_DESCR_LEN 32
2787 #ifndef HID_MAX_PROV_NAME_LEN
2788 #define HID_MAX_PROV_NAME_LEN 32
2791 /*************************************************************************
2792 ** Definitions for HID-Host
2794 #ifndef HID_HOST_INCLUDED
2795 #define HID_HOST_INCLUDED TRUE
2798 #ifndef HID_HOST_MAX_DEVICES
2799 #define HID_HOST_MAX_DEVICES 7
2802 #ifndef HID_HOST_MTU
2803 #define HID_HOST_MTU 640
2806 #ifndef HID_HOST_FLUSH_TO
2807 #define HID_HOST_FLUSH_TO 0xffff
2810 #ifndef HID_HOST_MAX_CONN_RETRY
2811 #define HID_HOST_MAX_CONN_RETRY (3)
2814 #ifndef HID_HOST_REPAGE_WIN
2815 #define HID_HOST_REPAGE_WIN (2)
2819 /******************************************************************************
2823 ******************************************************************************/
2825 #ifndef DUN_INCLUDED
2826 #define DUN_INCLUDED FALSE
2830 /******************************************************************************
2834 ******************************************************************************/
2836 #ifndef GOEP_INCLUDED
2837 #define GOEP_INCLUDED FALSE
2840 /* This is set to enable GOEP non-blocking file system access functions. */
2841 #ifndef GOEP_FS_INCLUDED
2842 #define GOEP_FS_INCLUDED FALSE
2845 /* GOEP authentication key size. */
2846 #ifndef GOEP_MAX_AUTH_KEY_SIZE
2847 #define GOEP_MAX_AUTH_KEY_SIZE 16
2850 /* Maximum size of the realm authentication string. */
2851 #ifndef GOEP_MAX_AUTH_REALM_SIZE
2852 #define GOEP_MAX_AUTH_REALM_SIZE 16
2855 /* Realm Character Set */
2856 #ifndef GOEP_REALM_CHARSET
2857 #define GOEP_REALM_CHARSET 0 /* ASCII */
2860 /* This is set to the maximum length of path name allowed in the system (_MAX_PATH). */
2861 #ifndef GOEP_MAX_PATH_SIZE
2862 #define GOEP_MAX_PATH_SIZE 255
2865 /* Specifies whether or not client's user id is required during obex authentication */
2866 #ifndef GOEP_SERVER_USERID_REQUIRED
2867 #define GOEP_SERVER_USERID_REQUIRED FALSE
2870 /* This is set to the maximum length of file name allowed in the system (_MAX_FNAME). */
2871 #ifndef GOEP_MAX_FILE_SIZE
2872 #define GOEP_MAX_FILE_SIZE 128
2875 /* Character used as path separator */
2876 #ifndef GOEP_PATH_SEPARATOR
2877 #define GOEP_PATH_SEPARATOR ((char) 0x5c) /* 0x2f ('/'), or 0x5c ('\') */
2880 /******************************************************************************
2884 ******************************************************************************/
2886 #ifndef OPP_INCLUDED
2887 #define OPP_INCLUDED FALSE
2890 /* This is set to enable OPP client capabilities. */
2891 #ifndef OPP_CLIENT_INCLUDED
2892 #define OPP_CLIENT_INCLUDED FALSE
2895 /* This is set to enable OPP server capabilities. */
2896 #ifndef OPP_SERVER_INCLUDED
2897 #define OPP_SERVER_INCLUDED FALSE
2900 /* if the optional formating functions are to be included or not */
2901 #ifndef OPP_FORMAT_INCLUDED
2902 #define OPP_FORMAT_INCLUDED FALSE
2905 /* Maximum number of client sessions allowed by server */
2906 #ifndef OPP_MAX_SRVR_SESS
2907 #define OPP_MAX_SRVR_SESS 3
2910 /******************************************************************************
2914 ******************************************************************************/
2916 #ifndef FTP_INCLUDED
2917 #define FTP_INCLUDED FALSE
2920 /* This is set to enable FTP client capabilities. */
2921 #ifndef FTP_CLIENT_INCLUDED
2922 #define FTP_CLIENT_INCLUDED TRUE
2925 /* This is set to enable FTP server capabilities. */
2926 #ifndef FTP_SERVER_INCLUDED
2927 #define FTP_SERVER_INCLUDED TRUE
2930 /******************************************************************************
2934 ******************************************************************************/
2936 #ifndef XML_STACK_SIZE
2937 #define XML_STACK_SIZE 7
2940 /******************************************************************************
2944 ******************************************************************************/
2946 #define BPP_DEBUG FALSE
2949 #ifndef BPP_INCLUDED
2950 #define BPP_INCLUDED FALSE
2953 #ifndef BPP_SND_INCLUDED
2954 #define BPP_SND_INCLUDED FALSE
2957 /* Maximum number of senders allowed to connect simultaneously
2958 ** The maximum is 6 or (OBX_NUM_SERVERS / 2), whichever is smaller
2960 #ifndef BPP_PR_MAX_CON
2961 #define BPP_PR_MAX_CON 3
2964 /* Service Name. maximum length: 248
2965 #ifndef BPP_SERVICE_NAME
2966 #define BPP_SERVICE_NAME "Basic Printing"
2969 /* Document Format Supported. ASCII comma-delimited list of MIME type:version string
2970 #ifndef BPP_DOC_FORMAT_SUPPORTED
2971 #define BPP_DOC_FORMAT_SUPPORTED "application/vnd.pwg-xhtml-print:1.0,application/vnd.hp-PCL:5E,application/PDF"
2974 #ifndef BPP_DOC_FORMAT_SUPPORTED_LEN
2975 #define BPP_DOC_FORMAT_SUPPORTED_LEN 77
2978 /* Character repertoires.
2979 #ifndef BPP_CHARACTER_REPERTOIRES
2980 #define BPP_CHARACTER_REPERTOIRES {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}
2984 #ifndef BPP_XHTML_PRINT_FORMATS
2985 #define BPP_XHTML_PRINT_FORMATS "image/gif:89A,image/jpeg"
2988 #ifndef BPP_XHTML_PRINT_FORMATS_LEN
2989 #define BPP_XHTML_PRINT_FORMATS_LEN 24
2993 #ifndef BPP_COLOR_SUPORTED
2994 #define BPP_COLOR_SUPORTED FALSE
2997 /* 1284 ID string. First 2 bytes are the length.
2999 #define BPP_1284ID "\x00\x48MANUFACTURER:ACME Manufacturing;COMMAND SET:PCL,MPL;MODEL:LaserBeam \?;"
3002 #ifndef BPP_1284ID_LEN
3003 #define BPP_1284ID_LEN 72
3007 #ifndef BPP_PRINTER_NAME
3008 #define BPP_PRINTER_NAME "My Printer"
3011 #ifndef BPP_PRINTER_NAME_LEN
3012 #define BPP_PRINTER_NAME_LEN 10
3016 /* Printer location.
3017 #ifndef BPP_PRINTER_LOCATION
3018 #define BPP_PRINTER_LOCATION "Hotel Lobby"
3021 #ifndef BPP_PRINTER_LOCATION_LEN
3022 #define BPP_PRINTER_LOCATION_LEN 11
3025 /* Duplex printing supported.
3026 #ifndef BPP_DUPLEX_SUPPORTED
3027 #define BPP_DUPLEX_SUPPORTED TRUE
3031 /* Media types supported.
3032 #ifndef BPP_MEDIA_TYPES_SUPPORTED
3033 #define BPP_MEDIA_TYPES_SUPPORTED "stationary,continuous-long,photographic-high-gloss,cardstock"
3036 #ifndef BPP_MEDIA_TYPES_SUPPORTED_LEN
3037 #define BPP_MEDIA_TYPES_SUPPORTED_LEN 60
3040 /* Maximum media with supported.
3041 #ifndef BPP_MAX_MEDIA_WIDTH
3042 #define BPP_MAX_MEDIA_WIDTH 205
3045 /* Maximum media length supported.
3046 #ifndef BPP_MAX_MEDIA_LENGTH
3047 #define BPP_MAX_MEDIA_LENGTH 285
3050 /* the maximum string len for the media size of medium loaded */
3051 #ifndef BPP_MEDIA_SIZE_LEN
3052 #define BPP_MEDIA_SIZE_LEN 33
3055 /* Debug Trace the SOAP object, if TRUE */
3056 #ifndef BPP_TRACE_XML
3057 #define BPP_TRACE_XML TRUE
3060 /* in case that the SOAP object does not all come in one OBEX packet,
3061 * this size of data may be kept in the BPP control block for continuing parsing.
3062 * The maximum is the size of the biggest GKI buffer (GKI_MAX_BUF_SIZE) */
3063 #ifndef BPP_SOAP_KEEP_SIZE
3064 #define BPP_SOAP_KEEP_SIZE 200
3068 /******************************************************************************
3072 ******************************************************************************/
3073 #ifndef BIP_INCLUDED
3074 #define BIP_INCLUDED FALSE
3077 /* TRUE to include imaging initiator */
3078 #ifndef BIP_INITR_INCLUDED
3079 #define BIP_INITR_INCLUDED FALSE
3082 /* TRUE to include imaging responder */
3083 #ifndef BIP_RSPDR_INCLUDED
3084 #define BIP_RSPDR_INCLUDED FALSE
3087 /* TRUE to include image push feature */
3088 #ifndef BIP_PUSH_INCLUDED
3089 #define BIP_PUSH_INCLUDED TRUE
3092 /* TRUE to include image pull feature */
3093 #ifndef BIP_PULL_INCLUDED
3094 #define BIP_PULL_INCLUDED TRUE
3097 /* TRUE to include advanced image printing feature */
3098 #ifndef BIP_PRINTING_INCLUDED
3099 #define BIP_PRINTING_INCLUDED TRUE
3102 /* TRUE to include automatic archive feature */
3103 #ifndef BIP_ARCHIVE_INCLUDED
3104 #define BIP_ARCHIVE_INCLUDED TRUE
3107 /* TRUE to include remote camera feature */
3108 #ifndef BIP_CAMERA_INCLUDED
3109 #define BIP_CAMERA_INCLUDED TRUE
3112 /* TRUE to include remote display feature */
3113 #ifndef BIP_DISPLAY_INCLUDED
3114 #define BIP_DISPLAY_INCLUDED TRUE
3117 /* TRUE to include sanity check code for API functions */
3118 #ifndef BIP_SANITY_CHECKS
3119 #define BIP_SANITY_CHECKS TRUE
3122 /* TRUE to show the received XML object in trace for conformance tests */
3123 #ifndef BIP_TRACE_XML
3124 #define BIP_TRACE_XML TRUE
3127 /* in case that the received XML object is not complete, the XML parser state machine needs
3128 * to keep a copy of the data from the last '<'
3129 * This macro specifies the maximun amount of data for this purpose */
3130 #ifndef BIP_XML_CARRY_OVER_LEN
3131 #define BIP_XML_CARRY_OVER_LEN 100
3134 /* minimum 4, maximum is 255. The value should be set to the maximum size of encoding string + 1. JPEG2000.
3135 * If vendor specific format is supported, it might be bigger than 9 */
3136 #ifndef BIP_IMG_ENCODE_SIZE
3137 #define BIP_IMG_ENCODE_SIZE 9
3140 /* MIME type: text/plain */
3141 #ifndef BIP_TYPE_SIZE
3142 #define BIP_TYPE_SIZE 20
3145 /* example: iso-8895-1 */
3146 #ifndef BIP_CHARSET_SIZE
3147 #define BIP_CHARSET_SIZE 10
3151 #ifndef BIP_FNAME_SIZE
3152 #define BIP_FNAME_SIZE 20
3156 #ifndef BIP_SNAME_SIZE
3157 #define BIP_SNAME_SIZE 60
3160 /* temporary storage file name(for file system access, may include path) */
3161 #ifndef BIP_TEMP_NAME_SIZE
3162 #define BIP_TEMP_NAME_SIZE 200
3165 /* image file name */
3166 #ifndef BIP_IMG_NAME_SIZE
3167 #define BIP_IMG_NAME_SIZE 200
3170 /* attachment file name */
3171 #ifndef BIP_ATT_NAME_SIZE
3172 #define BIP_ATT_NAME_SIZE 200
3175 /* object (image, attachment, thumbnail) file name (may be used for file system) */
3176 #ifndef BIP_OBJ_NAME_SIZE
3177 #define BIP_OBJ_NAME_SIZE 200
3182 /******************************************************************************
3186 ******************************************************************************/
3188 #ifndef HCRP_INCLUDED
3189 #define HCRP_INCLUDED FALSE
3192 /* This is set to enable server. */
3193 #ifndef HCRP_SERVER_INCLUDED
3194 #define HCRP_SERVER_INCLUDED FALSE
3197 /* This is set to enable client. */
3198 #ifndef HCRP_CLIENT_INCLUDED
3199 #define HCRP_CLIENT_INCLUDED FALSE
3202 /* TRUE enables the notification option of the profile. */
3203 #ifndef HCRP_NOTIFICATION_INCLUDED
3204 #define HCRP_NOTIFICATION_INCLUDED TRUE
3207 /* TRUE enables the vendor specific option of the profile. */
3208 #ifndef HCRP_VENDOR_SPEC_INCLUDED
3209 #define HCRP_VENDOR_SPEC_INCLUDED TRUE
3212 /* TRUE enables state machine traces. */
3213 #ifndef HCRP_FSM_DEBUG
3214 #define HCRP_FSM_DEBUG FALSE
3217 /* TRUE enables protocol message traces. */
3218 #ifndef HCRP_PROTO_DEBUG
3219 #define HCRP_PROTO_DEBUG FALSE
3222 /* Maximum length used to store the service name (Minimum 1). */
3223 #ifndef HCRP_MAX_SERVICE_NAME_LEN
3224 #define HCRP_MAX_SERVICE_NAME_LEN 32
3227 /* Maximum length used to store the device name (Minimum 1). */
3228 #ifndef HCRP_MAX_DEVICE_NAME_LEN
3229 #define HCRP_MAX_DEVICE_NAME_LEN 32
3232 /* Maximum length of device location (Minimum 1) */
3233 #ifndef HCRP_MAX_DEVICE_LOC_LEN
3234 #define HCRP_MAX_DEVICE_LOC_LEN 32
3237 /* Maximum length used to store the friendly name (Minimum 1). */
3238 #ifndef HCRP_MAX_FRIENDLY_NAME_LEN
3239 #define HCRP_MAX_FRIENDLY_NAME_LEN 32
3242 /* Maximum length used to store the 1284 id string (Minimum 2 byte length field). */
3243 #ifndef HCRP_MAX_SDP_1284_ID_LEN
3244 #define HCRP_MAX_SDP_1284_ID_LEN 128
3247 /* Maximum length for parameters to be processed for vendor specific commands. */
3248 #ifndef HCRP_MAX_VEND_SPEC_LEN
3249 #define HCRP_MAX_VEND_SPEC_LEN 4
3252 /* Number of seconds to wait for 2nd GAP to open. */
3253 #ifndef HCRP_OPEN_CHAN_TOUT
3254 #define HCRP_OPEN_CHAN_TOUT 5
3257 /* Number of seconds to wait for 2nd GAP to close. */
3258 #ifndef HCRP_CLOSE_CHAN_TOUT
3259 #define HCRP_CLOSE_CHAN_TOUT 3
3262 /* Number of seconds to wait for the application to respond to a protocol request. */
3263 #ifndef HCRP_APPL_RSP_TOUT
3264 #define HCRP_APPL_RSP_TOUT 5
3267 /* Number of seconds to wait for the peer device to respond to a protocol request. */
3268 #ifndef HCRP_CMD_RSP_TOUT
3269 #define HCRP_CMD_RSP_TOUT 7
3272 /* Number of seconds between subsequent credit requests to the server when the send watermark has been exceeded. */
3273 #ifndef HCRP_CREDIT_REQ_UPDATES
3274 #define HCRP_CREDIT_REQ_UPDATES 1
3277 /* Maximum number of results to return in a HCRP_FindServices search. */
3278 #ifndef HCRP_MAX_SEARCH_RESULTS
3279 #define HCRP_MAX_SEARCH_RESULTS 1
3282 /* Maximum number of bytes to be reserved for searching for the client's notification record. */
3283 #ifndef HCRP_MAX_NOTIF_DISC_BUF
3284 #define HCRP_MAX_NOTIF_DISC_BUF 300
3287 /* Maximum number of clients the server will allow to be registered for notifications. */
3288 #ifndef HCRP_MAX_NOTIF_CLIENTS
3289 #define HCRP_MAX_NOTIF_CLIENTS 3
3292 /* Spec says minimum of two notification retries. */
3293 #ifndef HCRP_NOTIF_NUM_RETRIES
3294 #define HCRP_NOTIF_NUM_RETRIES 4
3297 /*************************************************************************
3298 ** Definitions for Multi-Client Server HCRP
3299 ** Note: Many of the above HCRP definitions are also used
3300 ** Maximum number of clients allowed to connect simultaneously
3301 ** Must be less than ((GAP_MAX_CONNECTIONS - 1) / 2)
3303 #ifndef HCRPM_MAX_CLIENTS
3304 #define HCRPM_MAX_CLIENTS 3
3308 /******************************************************************************
3312 ******************************************************************************/
3314 #ifndef PAN_INCLUDED
3315 #define PAN_INCLUDED FALSE
3319 /******************************************************************************
3323 ******************************************************************************/
3325 #ifndef SAP_SERVER_INCLUDED
3326 #define SAP_SERVER_INCLUDED FALSE
3330 /*************************************************************************
3333 #ifndef A2D_INCLUDED
3334 #define A2D_INCLUDED TRUE
3337 /* TRUE to include SBC utility functions */
3338 #ifndef A2D_SBC_INCLUDED
3339 #define A2D_SBC_INCLUDED A2D_INCLUDED
3342 /* TRUE to include MPEG-1,2 (mp3) utility functions */
3343 #ifndef A2D_M12_INCLUDED
3344 #define A2D_M12_INCLUDED A2D_INCLUDED
3347 /* TRUE to include MPEG-2,4 (aac) utility functions */
3348 #ifndef A2D_M24_INCLUDED
3349 #define A2D_M24_INCLUDED A2D_INCLUDED
3352 /******************************************************************************
3356 ******************************************************************************/
3358 #ifndef AVCT_INCLUDED
3359 #define AVCT_INCLUDED TRUE
3362 /* Number of simultaneous ACL links to different peer devices. */
3363 #ifndef AVCT_NUM_LINKS
3364 #define AVCT_NUM_LINKS 2
3367 /* Number of simultaneous AVCTP connections. */
3368 #ifndef AVCT_NUM_CONN
3369 #define AVCT_NUM_CONN 3
3372 /* Pool ID where to reassemble the SDU.
3373 This Pool allows buffers to be used that are larger than
3374 the L2CAP_MAX_MTU. */
3375 #ifndef AVCT_BR_USER_RX_POOL_ID
3376 #define AVCT_BR_USER_RX_POOL_ID HCI_ACL_POOL_ID
3379 /* Pool ID where to hold the SDU.
3380 This Pool allows buffers to be used that are larger than
3381 the L2CAP_MAX_MTU. */
3382 #ifndef AVCT_BR_USER_TX_POOL_ID
3383 #define AVCT_BR_USER_TX_POOL_ID HCI_ACL_POOL_ID
3387 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
3389 #ifndef AVCT_BR_FCR_RX_POOL_ID
3390 #define AVCT_BR_FCR_RX_POOL_ID HCI_ACL_POOL_ID
3394 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
3395 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
3396 Note: This pool needs to have enough buffers to hold two times the window size negotiated
3397 in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions.
3398 The size of each buffer must be able to hold the maximum MPS segment size passed in
3399 tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
3401 #ifndef AVCT_BR_FCR_TX_POOL_ID
3402 #define AVCT_BR_FCR_TX_POOL_ID HCI_ACL_POOL_ID
3405 /* AVCTP Browsing channel FCR Option:
3406 Size of the transmission window when using enhanced retransmission mode. Not used
3407 in basic and streaming modes. Range: 1 - 63
3409 #ifndef AVCT_BR_FCR_OPT_TX_WINDOW_SIZE
3410 #define AVCT_BR_FCR_OPT_TX_WINDOW_SIZE 10
3413 /* AVCTP Browsing channel FCR Option:
3414 Number of transmission attempts for a single I-Frame before taking
3415 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
3418 0 - infinite retransmissions
3419 1 - single transmission
3421 #ifndef AVCT_BR_FCR_OPT_MAX_TX_B4_DISCNT
3422 #define AVCT_BR_FCR_OPT_MAX_TX_B4_DISCNT 20
3425 /* AVCTP Browsing channel FCR Option: Retransmission Timeout
3426 The AVRCP specification set a value in the range of 300 - 2000 ms
3427 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
3428 Range: Minimum 2000 (2 secs) when supporting PBF.
3430 #ifndef AVCT_BR_FCR_OPT_RETX_TOUT
3431 #define AVCT_BR_FCR_OPT_RETX_TOUT 2000
3434 /* AVCTP Browsing channel FCR Option: Monitor Timeout
3435 The AVRCP specification set a value in the range of 300 - 2000 ms
3436 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
3437 Range: Minimum 12000 (12 secs) when supporting PBF.
3439 #ifndef AVCT_BR_FCR_OPT_MONITOR_TOUT
3440 #define AVCT_BR_FCR_OPT_MONITOR_TOUT 12000
3443 /******************************************************************************
3447 ******************************************************************************/
3449 #ifndef AVRC_INCLUDED
3450 #define AVRC_INCLUDED TRUE
3453 #ifndef AVRC_METADATA_INCLUDED
3454 #define AVRC_METADATA_INCLUDED TRUE
3457 #ifndef AVRC_ADV_CTRL_INCLUDED
3458 #define AVRC_ADV_CTRL_INCLUDED TRUE
3461 #ifndef AVRC_CTLR_INCLUDED
3462 #define AVRC_CTLR_INCLUDED TRUE
3465 /******************************************************************************
3469 ******************************************************************************/
3470 #ifndef MCA_INCLUDED
3471 #define MCA_INCLUDED FALSE
3474 /* TRUE to support Clock Synchronization OpCodes */
3475 #ifndef MCA_SYNC_INCLUDED
3476 #define MCA_SYNC_INCLUDED FALSE
3479 /* The MTU size for the L2CAP configuration on control channel. 48 is the minimal */
3480 #ifndef MCA_CTRL_MTU
3481 #define MCA_CTRL_MTU 60
3484 /* The maximum number of registered MCAP instances. */
3485 #ifndef MCA_NUM_REGS
3486 #define MCA_NUM_REGS 12
3489 /* The maximum number of control channels (to difference devices) per registered MCAP instances. */
3490 #ifndef MCA_NUM_LINKS
3491 #define MCA_NUM_LINKS 3
3494 /* The maximum number of MDEP (including HDP echo) per registered MCAP instances. */
3495 #ifndef MCA_NUM_DEPS
3496 #define MCA_NUM_DEPS 13
3499 /* The maximum number of MDL link per control channel. */
3500 #ifndef MCA_NUM_MDLS
3501 #define MCA_NUM_MDLS 4
3504 /* Pool ID where to reassemble the SDU. */
3505 #ifndef MCA_USER_RX_POOL_ID
3506 #define MCA_USER_RX_POOL_ID HCI_ACL_POOL_ID
3509 /* Pool ID where to hold the SDU. */
3510 #ifndef MCA_USER_TX_POOL_ID
3511 #define MCA_USER_TX_POOL_ID HCI_ACL_POOL_ID
3515 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
3517 #ifndef MCA_FCR_RX_POOL_ID
3518 #define MCA_FCR_RX_POOL_ID HCI_ACL_POOL_ID
3522 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
3523 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
3524 Note: This pool needs to have enough buffers to hold two times the window size negotiated
3525 in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions.
3526 The size of each buffer must be able to hold the maximum MPS segment size passed in
3527 tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
3529 #ifndef MCA_FCR_TX_POOL_ID
3530 #define MCA_FCR_TX_POOL_ID HCI_ACL_POOL_ID
3533 /* MCAP control channel FCR Option:
3534 Size of the transmission window when using enhanced retransmission mode.
3535 1 is defined by HDP specification for control channel.
3537 #ifndef MCA_FCR_OPT_TX_WINDOW_SIZE
3538 #define MCA_FCR_OPT_TX_WINDOW_SIZE 1
3541 /* MCAP control channel FCR Option:
3542 Number of transmission attempts for a single I-Frame before taking
3543 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
3546 0 - infinite retransmissions
3547 1 - single transmission
3549 #ifndef MCA_FCR_OPT_MAX_TX_B4_DISCNT
3550 #define MCA_FCR_OPT_MAX_TX_B4_DISCNT 20
3553 /* MCAP control channel FCR Option: Retransmission Timeout
3554 The AVRCP specification set a value in the range of 300 - 2000 ms
3555 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
3556 Range: Minimum 2000 (2 secs) when supporting PBF.
3558 #ifndef MCA_FCR_OPT_RETX_TOUT
3559 #define MCA_FCR_OPT_RETX_TOUT 2000
3562 /* MCAP control channel FCR Option: Monitor Timeout
3563 The AVRCP specification set a value in the range of 300 - 2000 ms
3564 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
3565 Range: Minimum 12000 (12 secs) when supporting PBF.
3567 #ifndef MCA_FCR_OPT_MONITOR_TOUT
3568 #define MCA_FCR_OPT_MONITOR_TOUT 12000
3571 /* MCAP control channel FCR Option: Maximum PDU payload size.
3572 The maximum number of payload octets that the local device can receive in a single PDU.
3574 #ifndef MCA_FCR_OPT_MPS_SIZE
3575 #define MCA_FCR_OPT_MPS_SIZE 1000
3578 /* Shared transport */
3579 #ifndef NFC_SHARED_TRANSPORT_ENABLED
3580 #define NFC_SHARED_TRANSPORT_ENABLED FALSE
3583 /******************************************************************************
3587 ******************************************************************************/
3589 #ifndef SER_INCLUDED
3590 #define SER_INCLUDED FALSE
3593 /* Task which runs the serial application. */
3595 #define SER_TASK BTE_APPL_TASK
3598 /* Mailbox used by serial application. */
3600 #define SER_MBOX TASK_MBOX_1
3604 #ifndef SER_MBOX_MASK
3605 #define SER_MBOX_MASK TASK_MBOX_1_EVT_MASK
3608 /* TX path application event. */
3609 #ifndef SER_TX_PATH_APPL_EVT
3610 #define SER_TX_PATH_APPL_EVT EVENT_MASK(APPL_EVT_3)
3613 /* RX path application event. */
3614 #ifndef SER_RX_PATH_APPL_EVT
3615 #define SER_RX_PATH_APPL_EVT EVENT_MASK(APPL_EVT_4)
3618 /******************************************************************************
3620 ** Sleep Mode (Low Power Mode)
3622 ******************************************************************************/
3624 #ifndef HCILP_INCLUDED
3625 #define HCILP_INCLUDED TRUE
3628 /******************************************************************************
3632 ******************************************************************************/
3634 #ifndef RPC_INCLUDED
3635 #define RPC_INCLUDED FALSE
3638 /* RPCT task mailbox ID for messages coming from rpcgen code. */
3640 #define RPCT_MBOX TASK_MBOX_0
3643 /* RPCT task event for mailbox. */
3644 #ifndef RPCT_RPC_MBOX_EVT
3645 #define RPCT_RPC_MBOX_EVT TASK_MBOX_0_EVT_MASK
3648 /* RPCT task event from driver indicating RX data is ready. */
3649 #ifndef RPCT_RX_READY_EVT
3650 #define RPCT_RX_READY_EVT APPL_EVT_0
3653 /* RPCT task event from driver indicating data TX is done. */
3654 #ifndef RPCT_TX_DONE_EVT
3655 #define RPCT_TX_DONE_EVT APPL_EVT_1
3658 /* RPCT task event indicating data is in the circular buffer. */
3659 #ifndef RPCT_UCBUF_EVT
3660 #define RPCT_UCBUF_EVT APPL_EVT_2
3663 /* Task ID of RPCGEN task. */
3665 #define RPCGEN_TASK BTU_TASK
3668 /* RPCGEN task event for messages coming from RPCT. */
3669 #ifndef RPCGEN_MSG_EVT
3670 #define RPCGEN_MSG_EVT TASK_MBOX_1_EVT_MASK
3673 #ifndef RPCGEN_MSG_MBOX
3674 #define RPCGEN_MSG_MBOX TASK_MBOX_1
3677 /* Size of circular buffer used to store diagnostic messages. */
3678 #ifndef RPCT_UCBUF_SIZE
3679 #define RPCT_UCBUF_SIZE 2000
3682 /******************************************************************************
3684 ** SAP - Sample applications
3686 ******************************************************************************/
3688 #ifndef MMI_INCLUDED
3689 #define MMI_INCLUDED FALSE
3692 /******************************************************************************
3694 ** APPL - Application Task
3696 ******************************************************************************/
3697 /* When TRUE indicates that an application task is to be run */
3698 #ifndef APPL_INCLUDED
3699 #define APPL_INCLUDED TRUE
3702 /* When TRUE remote terminal code included (RPC MUST be included) */
3703 #ifndef RSI_INCLUDED
3704 #define RSI_INCLUDED TRUE
3709 #define L2CAP_FEATURE_REQ_ID 73
3710 #define L2CAP_FEATURE_RSP_ID 173
3713 /******************************************************************************
3717 ******************************************************************************/
3718 /* BTA EIR canned UUID list (default is dynamic) */
3719 #ifndef BTA_EIR_CANNED_UUID_LIST
3720 #define BTA_EIR_CANNED_UUID_LIST FALSE
3723 /* Number of supported customer UUID in EIR */
3724 #ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID
3725 #define BTA_EIR_SERVER_NUM_CUSTOM_UUID 8
3728 /* CHLD override for bluedroid */
3729 #ifndef BTA_AG_CHLD_VAL_ECC
3730 #define BTA_AG_CHLD_VAL_ECC "(0,1,1x,2,2x,3)"
3733 #ifndef BTA_AG_CHLD_VAL
3734 #define BTA_AG_CHLD_VAL "(0,1,2,3)"
3737 /* Set the CIND to match HFP 1.5 */
3738 #ifndef BTA_AG_CIND_INFO
3739 #define BTA_AG_CIND_INFO "(\"call\",(0,1)),(\"callsetup\",(0-3)),(\"service\",(0-1)),(\"signal\",(0-5)),(\"roam\",(0,1)),(\"battchg\",(0-5)),(\"callheld\",(0-2))"
3742 #ifndef BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY
3743 #define BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY TRUE
3746 /******************************************************************************
3750 ******************************************************************************/
3751 #ifndef BTE_PLATFORM_IDLE
3752 #define BTE_PLATFORM_IDLE
3755 #ifndef BTE_IDLE_TASK_INCLUDED
3756 #define BTE_IDLE_TASK_INCLUDED FALSE
3759 #ifndef BTE_PLATFORM_INITHW
3760 #define BTE_PLATFORM_INITHW
3763 #ifndef BTE_BTA_CODE_INCLUDED
3764 #define BTE_BTA_CODE_INCLUDED FALSE
3767 /******************************************************************************
3771 ******************************************************************************/
3772 /* Whether to parse and display traces-> Platform specific implementation */
3774 #define BTTRC_DISP BTTRC_DispOnInsight
3777 /******************************************************************************
3779 ** Tracing: Include trace header file here.
3781 ******************************************************************************/
3783 #include "bt_trace.h"
3785 #endif /* BT_TARGET_H */