1 /******************************************************************************
3 * Copyright (C) 1999-2012 Broadcom Corporation
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 ******************************************************************************/
25 #include "data_types.h"
28 #ifndef BTIF_HSAG_SERVICE_NAME
29 #define BTIF_HSAG_SERVICE_NAME ("Headset Gateway")
32 #ifndef BTIF_HFAG_SERVICE_NAME
33 #define BTIF_HFAG_SERVICE_NAME ("Handsfree Gateway")
39 #if !defined(HAS_BDROID_BUILDCFG) && !defined(HAS_NO_BDROID_BUILDCFG)
40 #error "An Android.mk file did not include bdroid_CFLAGS and possibly not bdorid_C_INCLUDES"
43 #ifdef HAS_BDROID_BUILDCFG
44 #include "bdroid_buildcfg.h"
49 /* Include common GKI definitions used by this platform */
50 #include "gki_target.h"
52 #include "bt_types.h" /* This must be defined AFTER buildcfg.h */
53 #include "dyn_mem.h" /* defines static and/or dynamic memory for components */
56 //------------------Added from Bluedroid buildcfg.h---------------------
58 #define UNV_INCLUDED FALSE
62 #define GATT_PTS FALSE
65 #ifndef L2CAP_INCLUDED
66 #define L2CAP_INCLUDED TRUE
69 #ifndef L2CAP_EXTFEA_SUPPORTED_MASK
70 #define L2CAP_EXTFEA_SUPPORTED_MASK (L2CAP_EXTFEA_ENH_RETRANS | L2CAP_EXTFEA_STREAM_MODE | L2CAP_EXTFEA_NO_CRC | L2CAP_EXTFEA_FIXED_CHNLS)
73 #ifndef BTUI_OPS_FORMATS
74 #define BTUI_OPS_FORMATS (BTA_OP_VCARD21_MASK | BTA_OP_ANY_MASK)
77 #ifndef BTA_RFC_MTU_SIZE
78 #define BTA_RFC_MTU_SIZE (L2CAP_MTU_SIZE-L2CAP_MIN_OFFSET-RFCOMM_DATA_OVERHEAD)
82 #define BTA_DUN_MTU BTA_RFC_MTU_SIZE
86 #define BTA_SPP_MTU BTA_RFC_MTU_SIZE
90 #define BTA_FAX_MTU BTA_RFC_MTU_SIZE
93 #ifndef SDP_RAW_PDU_INCLUDED
94 #define SDP_RAW_PDU_INCLUDED TRUE
97 #ifndef GATTS_APPU_USE_GATT_TRACE
98 #define GATTS_APPU_USE_GATT_TRACE FALSE
101 #ifndef SMP_HOST_ENCRYPT_INCLUDED
102 #define SMP_HOST_ENCRYPT_INCLUDED FALSE
106 #define SAP_INCLUDED FALSE
109 #ifndef SBC_NO_PCM_CPY_OPTION
110 #define SBC_NO_PCM_CPY_OPTION FALSE
114 #define SBC_IPAQ_OPT FALSE
117 #ifndef SBC_IS_64_MULT_IN_QUANTIZER
118 #define SBC_IS_64_MULT_IN_QUANTIZER FALSE
122 #define BTA_INCLUDED TRUE
125 #ifndef BTA_AG_INCLUDED
126 #define BTA_AG_INCLUDED TRUE
129 #ifndef BTA_CT_INCLUDED
130 #define BTA_CT_INCLUDED FALSE
133 #ifndef BTA_CG_INCLUDED
134 #define BTA_CG_INCLUDED FALSE
137 #ifndef BTA_DG_INCLUDED
138 #define BTA_DG_INCLUDED FALSE
141 #ifndef BTA_FT_INCLUDED
142 #define BTA_FT_INCLUDED FALSE
145 #ifndef BTA_OP_INCLUDED
146 #define BTA_OP_INCLUDED FALSE
149 #ifndef BTA_PR_INCLUDED
150 #define BTA_PR_INCLUDED FALSE
153 #ifndef BTA_SS_INCLUDED
154 #define BTA_SS_INCLUDED FALSE
157 #ifndef BTA_DM_INCLUDED
158 #define BTA_DM_INCLUDED TRUE
162 #ifndef BTA_DI_INCLUDED
163 #define BTA_DI_INCLUDED FALSE
166 #ifndef BTA_BI_INCLUDED
167 #define BTA_BI_INCLUDED FALSE
170 #ifndef BTA_SC_INCLUDED
171 #define BTA_SC_INCLUDED FALSE
174 #ifndef BTA_PAN_INCLUDED
175 #define BTA_PAN_INCLUDED TRUE
178 #ifndef BTA_FS_INCLUDED
179 #define BTA_FS_INCLUDED TRUE
182 #ifndef BTA_AC_INCLUDED
183 #define BTA_AC_INCLUDED FALSE
186 #ifndef BTA_HD_INCLUDED
187 #define BTA_HD_INCLUDED FALSE
190 #ifndef BTA_HH_INCLUDED
191 #define BTA_HH_INCLUDED TRUE
195 #define BTA_HH_ROLE BTA_MASTER_ROLE_PREF
198 #ifndef BTA_AR_INCLUDED
199 #define BTA_AR_INCLUDED TRUE
202 #ifndef BTA_AV_INCLUDED
203 #define BTA_AV_INCLUDED TRUE
206 #ifndef BTA_AV_VDP_INCLUDED
207 #define BTA_AV_VDP_INCLUDED FALSE
210 #ifndef BTA_AVK_INCLUDED
211 #define BTA_AVK_INCLUDED FALSE
214 #ifndef BTA_PBS_INCLUDED
215 #define BTA_PBS_INCLUDED FALSE
218 #ifndef BTA_PBC_INCLUDED
219 #define BTA_PBC_INCLUDED FALSE
222 #ifndef BTA_FM_INCLUDED
223 #define BTA_FM_INCLUDED FALSE
227 #define BTA_FM_DEBUG FALSE
230 #ifndef BTA_FMTX_INCLUDED
231 #define BTA_FMTX_INCLUDED FALSE
234 #ifndef BTA_FMTX_DEBUG
235 #define BTA_FMTX_DEBUG FALSE
238 #ifndef BTA_FMTX_FMRX_SWITCH_WORKAROUND
239 #define BTA_FMTX_FMRX_SWITCH_WORKAROUND FALSE
242 #ifndef BTA_FMTX_US_FCC_RULES
243 #define BTA_FMTX_US_FCC_RULES FALSE
246 #ifndef BTA_HS_INCLUDED
247 #define BTA_HS_INCLUDED FALSE
250 #ifndef BTA_MSE_INCLUDED
251 #define BTA_MSE_INCLUDED FALSE
254 #ifndef BTA_MCE_INCLUDED
255 #define BTA_MCE_INCLUDED FALSE
258 #ifndef BTA_PLAYBACK_INCLUDED
259 #define BTA_PLAYBACK_INCLUDED FALSE
262 #ifndef BTA_SSR_INCLUDED
263 #define BTA_SSR_INCLUDED FALSE
266 #ifndef BTA_JV_INCLUDED
267 #define BTA_JV_INCLUDED FALSE
270 #ifndef BTA_GATT_INCLUDED
271 #define BTA_GATT_INCLUDED FALSE
274 #ifndef BTA_DISABLE_DELAY
275 #define BTA_DISABLE_DELAY 200 /* in milliseconds */
278 #ifndef RPC_TRACE_ONLY
279 #define RPC_TRACE_ONLY FALSE
282 #ifndef ANDROID_APP_INCLUDED
283 #define ANDROID_APP_INCLUDED TRUE
286 #ifndef ANDROID_USE_LOGCAT
287 #define ANDROID_USE_LOGCAT TRUE
290 #ifndef LINUX_GKI_INCLUDED
291 #define LINUX_GKI_INCLUDED TRUE
294 #ifndef BTA_SYS_TIMER_PERIOD
295 #define BTA_SYS_TIMER_PERIOD 100
298 #ifndef GKI_SHUTDOWN_EVT
299 #define GKI_SHUTDOWN_EVT APPL_EVT_7
302 #ifndef GKI_PTHREAD_JOINABLE
303 #define GKI_PTHREAD_JOINABLE TRUE
306 #ifndef LINUX_DRV_INCLUDED
307 #define LINUX_DRV_INCLUDED TRUE
311 #define LINUX_OS TRUE
314 #ifndef BTM_APP_DEV_INIT
315 #define BTM_APP_DEV_INIT bte_main_post_reset_init
318 #ifndef SBC_FOR_EMBEDDED_LINUX
319 #define SBC_FOR_EMBEDDED_LINUX TRUE
322 #ifndef BTA_DM_REMOTE_DEVICE_NAME_LENGTH
323 #define BTA_DM_REMOTE_DEVICE_NAME_LENGTH 248
327 #define AVDT_VERSION 0x0102
330 #ifndef BTA_AG_AT_MAX_LEN
331 #define BTA_AG_AT_MAX_LEN 512
334 #ifndef BTA_AVRCP_FF_RW_SUPPORT
335 #define BTA_AVRCP_FF_RW_SUPPORT TRUE
338 #ifndef BTA_AG_SCO_PKT_TYPES
339 #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)
342 #ifndef BTA_AV_MAX_A2DP_MTU
343 #define BTA_AV_MAX_A2DP_MTU 668
346 #ifndef BTA_AV_RET_TOUT
347 #define BTA_AV_RET_TOUT 15
350 #ifndef PORCHE_PAIRING_CONFLICT
351 #define PORCHE_PAIRING_CONFLICT TRUE
354 #ifndef BTA_AV_CO_CP_SCMS_T
355 #define BTA_AV_CO_CP_SCMS_T FALSE
358 #ifndef AVDT_CONNECT_CP_ONLY
359 #define AVDT_CONNECT_CP_ONLY FALSE
362 #ifndef BT_TRACE_PROTOCOL
363 #define BT_TRACE_PROTOCOL TRUE
366 #ifndef BT_USE_TRACES
367 #define BT_USE_TRACES TRUE
370 #ifndef BT_TRACE_BTIF
371 #define BT_TRACE_BTIF TRUE
374 #ifndef BTTRC_INCLUDED
375 #define BTTRC_INCLUDED FALSE
378 #ifndef BT_TRACE_VERBOSE
379 #define BT_TRACE_VERBOSE FALSE
382 #ifndef BTTRC_PARSER_INCLUDED
383 #define BTTRC_PARSER_INCLUDED FALSE
386 #ifndef MAX_TRACE_RAM_SIZE
387 #define MAX_TRACE_RAM_SIZE 10000
390 #ifndef OBX_INITIAL_TRACE_LEVEL
391 #define OBX_INITIAL_TRACE_LEVEL BT_TRACE_LEVEL_ERROR
394 #ifndef PBAP_ZERO_VCARD_IN_DB
395 #define PBAP_ZERO_VCARD_IN_DB FALSE
398 #ifndef BTA_DM_SDP_DB_SIZE
399 #define BTA_DM_SDP_DB_SIZE 8000
402 #ifndef FTS_REJECT_INVALID_OBEX_SET_PATH_REQ
403 #define FTS_REJECT_INVALID_OBEX_SET_PATH_REQ FALSE
407 #define HL_INCLUDED TRUE
410 #ifndef NO_GKI_RUN_RETURN
411 #define NO_GKI_RUN_RETURN TRUE
414 #ifndef AG_VOICE_SETTINGS
415 #define AG_VOICE_SETTINGS HCI_DEFAULT_VOICE_SETTINGS
418 #ifndef BTIF_DM_OOB_TEST
419 #define BTIF_DM_OOB_TEST TRUE
421 //------------------End added from Bluedroid buildcfg.h---------------------
425 /* #define BYPASS_AVDATATRACE */
427 /******************************************************************************
431 ******************************************************************************/
433 /* API macros for simulator */
437 #ifndef BTE_BSE_WRAPPER
440 #define BTAPI __declspec(dllexport)
445 #define BTU_API BTAPI
446 #define A2D_API BTAPI
447 #define VDP_API BTAPI
448 #define AVDT_API BTAPI
449 #define AVCT_API BTAPI
450 #define AVRC_API BTAPI
451 #define BIP_API BTAPI
452 #define BNEP_API BTAPI
453 #define BPP_API BTAPI
454 #define BTM_API BTAPI
455 #define CTP_API BTAPI
456 #define DUN_API BTAPI
457 #define FTP_API BTAPI
458 #define GAP_API BTAPI
459 #define GOEP_API BTAPI
460 #define HCI_API BTAPI
461 #define HCRP_API BTAPI
462 #define HID_API BTAPI
463 #define HFP_API BTAPI
464 #define HSP2_API BTAPI
465 #define ICP_API BTAPI
466 #define L2C_API BTAPI
467 #define OBX_API BTAPI
468 #define OPP_API BTAPI
469 #define PAN_API BTAPI
470 #define RFC_API BTAPI
471 #define RPC_API BTAPI
472 #define SDP_API BTAPI
473 #define SPP_API BTAPI
474 #define TCS_API BTAPI
475 #define XML_API BTAPI
476 #define BTA_API BTAPI
477 #define SBC_API BTAPI
478 #define MCE_API BTAPI
479 #define MCA_API BTAPI
480 #define GATT_API BTAPI
481 #define SMP_API BTAPI
484 /******************************************************************************
488 ******************************************************************************/
490 /* Receives HCI events from the lower-layer. */
491 #ifndef HCI_CMD_POOL_ID
492 #define HCI_CMD_POOL_ID GKI_POOL_ID_2
495 #ifndef HCI_CMD_POOL_BUF_SIZE
496 #define HCI_CMD_POOL_BUF_SIZE GKI_BUF2_SIZE
499 /* Receives ACL data packets from thelower-layer. */
500 #ifndef HCI_ACL_POOL_ID
501 #define HCI_ACL_POOL_ID GKI_POOL_ID_3
504 #ifndef HCI_ACL_POOL_BUF_SIZE
505 #define HCI_ACL_POOL_BUF_SIZE GKI_BUF3_SIZE
508 /* Maximum number of buffers available for ACL receive data. */
509 #ifndef HCI_ACL_BUF_MAX
510 #define HCI_ACL_BUF_MAX GKI_BUF3_MAX
513 /* Receives SCO data packets from the lower-layer. */
514 #ifndef HCI_SCO_POOL_ID
515 #define HCI_SCO_POOL_ID GKI_POOL_ID_6
519 #ifndef HCI_DATA_DESCR_POOL_ID
520 #define HCI_DATA_DESCR_POOL_ID GKI_POOL_ID_0
523 /* Sends SDP data packets. */
525 #define SDP_POOL_ID 3
528 /* Sends RFCOMM command packets. */
529 #ifndef RFCOMM_CMD_POOL_ID
530 #define RFCOMM_CMD_POOL_ID GKI_POOL_ID_2
533 #ifndef RFCOMM_CMD_POOL_BUF_SIZE
534 #define RFCOMM_CMD_POOL_BUF_SIZE GKI_BUF2_SIZE
537 /* Sends RFCOMM data packets. */
538 #ifndef RFCOMM_DATA_POOL_ID
539 #define RFCOMM_DATA_POOL_ID GKI_POOL_ID_3
542 #ifndef RFCOMM_DATA_POOL_BUF_SIZE
543 #define RFCOMM_DATA_POOL_BUF_SIZE GKI_BUF3_SIZE
546 /* Sends L2CAP packets to the peer and HCI messages to the controller. */
547 #ifndef L2CAP_CMD_POOL_ID
548 #define L2CAP_CMD_POOL_ID GKI_POOL_ID_2
551 /* Sends L2CAP segmented packets in ERTM mode */
552 #ifndef L2CAP_FCR_TX_POOL_ID
553 #define L2CAP_FCR_TX_POOL_ID HCI_ACL_POOL_ID
556 /* Receives L2CAP segmented packets in ERTM mode */
557 #ifndef L2CAP_FCR_RX_POOL_ID
558 #define L2CAP_FCR_RX_POOL_ID HCI_ACL_POOL_ID
561 /* Used by BTM when it sends HCI commands to the controller. */
562 #ifndef BTM_CMD_POOL_ID
563 #define BTM_CMD_POOL_ID GKI_POOL_ID_2
566 /* Sends TCS messages. */
567 #ifndef TCS_MSG_POOL_ID
568 #define TCS_MSG_POOL_ID GKI_POOL_ID_2
571 #ifndef OBX_CMD_POOL_SIZE
572 #define OBX_CMD_POOL_SIZE GKI_BUF2_SIZE
575 #ifndef OBX_LRG_DATA_POOL_SIZE
576 #define OBX_LRG_DATA_POOL_SIZE GKI_BUF4_SIZE
579 #ifndef OBX_LRG_DATA_POOL_ID
580 #define OBX_LRG_DATA_POOL_ID GKI_POOL_ID_4
583 /* Used for CTP discovery database. */
584 #ifndef CTP_SDP_DB_POOL_ID
585 #define CTP_SDP_DB_POOL_ID GKI_POOL_ID_3
588 /* Used for CTP data exchange feature. */
589 #ifndef CTP_DATA_EXCHG_POOL_ID
590 #define CTP_DATA_EXCHG_POOL_ID GKI_POOL_ID_2
593 /* Used to send data to L2CAP. */
594 #ifndef GAP_DATA_POOL_ID
595 #define GAP_DATA_POOL_ID GKI_POOL_ID_3
598 /* Used for SPP inquiry and discovery databases. */
599 #ifndef SPP_DB_POOL_ID
600 #define SPP_DB_POOL_ID GKI_POOL_ID_3
604 #define SPP_DB_SIZE GKI_BUF3_SIZE
607 /* HCRP protocol and internal commands. */
608 #ifndef HCRP_CMD_POOL_ID
609 #define HCRP_CMD_POOL_ID GKI_POOL_ID_2
612 #ifndef HCRP_CMD_POOL_SIZE
613 #define HCRP_CMD_POOL_SIZE GKI_BUF2_SIZE
616 #ifndef BIP_EVT_POOL_SIZE
617 #define BIP_EVT_POOL_SIZE GKI_BUF3_SIZE
621 #define BIP_DB_SIZE GKI_BUF3_SIZE
625 /* BNEP data and protocol messages. */
627 #define BNEP_POOL_ID GKI_POOL_ID_3
630 /* RPC pool for temporary trace message buffers. */
631 #ifndef RPC_SCRATCH_POOL_ID
632 #define RPC_SCRATCH_POOL_ID GKI_POOL_ID_2
635 /* RPC scratch buffer size (not related to RPC_SCRATCH_POOL_ID) */
636 #ifndef RPC_SCRATCH_BUF_SIZE
637 #define RPC_SCRATCH_BUF_SIZE GKI_BUF3_SIZE
640 /* RPC pool for protocol messages */
641 #ifndef RPC_MSG_POOL_ID
642 #define RPC_MSG_POOL_ID GKI_POOL_ID_3
645 #ifndef RPC_MSG_POOL_SIZE
646 #define RPC_MSG_POOL_SIZE GKI_BUF3_SIZE
649 /* AVDTP pool for protocol messages */
650 #ifndef AVDT_CMD_POOL_ID
651 #define AVDT_CMD_POOL_ID GKI_POOL_ID_2
654 /* AVDTP pool size for media packets in case of fragmentation */
655 #ifndef AVDT_DATA_POOL_SIZE
656 #define AVDT_DATA_POOL_SIZE GKI_BUF3_SIZE
660 #define PAN_POOL_ID GKI_POOL_ID_3
663 /* UNV pool for read/write serialization */
664 #ifndef UNV_MSG_POOL_ID
665 #define UNV_MSG_POOL_ID GKI_POOL_ID_2
668 #ifndef UNV_MSG_POOL_SIZE
669 #define UNV_MSG_POOL_SIZE GKI_BUF2_SIZE
672 /* AVCTP pool for protocol messages */
673 #ifndef AVCT_CMD_POOL_ID
674 #define AVCT_CMD_POOL_ID GKI_POOL_ID_1
677 #ifndef AVCT_META_CMD_POOL_ID
678 #define AVCT_META_CMD_POOL_ID GKI_POOL_ID_2
681 /* AVRCP pool for protocol messages */
682 #ifndef AVRC_CMD_POOL_ID
683 #define AVRC_CMD_POOL_ID GKI_POOL_ID_1
686 /* AVRCP pool size for protocol messages */
687 #ifndef AVRC_CMD_POOL_SIZE
688 #define AVRC_CMD_POOL_SIZE GKI_BUF1_SIZE
691 /* AVRCP Metadata pool for protocol messages */
692 #ifndef AVRC_META_CMD_POOL_ID
693 #define AVRC_META_CMD_POOL_ID GKI_POOL_ID_2
696 /* AVRCP Metadata pool size for protocol messages */
697 #ifndef AVRC_META_CMD_POOL_SIZE
698 #define AVRC_META_CMD_POOL_SIZE GKI_BUF2_SIZE
702 /* AVRCP buffer size for browsing channel messages */
703 #ifndef AVRC_BROWSE_POOL_SIZE
704 #define AVRC_BROWSE_POOL_SIZE GKI_MAX_BUF_SIZE
707 /* HDP buffer size for the Pulse Oximeter */
708 #ifndef BTA_HL_LRG_DATA_POOL_SIZE
709 #define BTA_HL_LRG_DATA_POOL_SIZE GKI_BUF7_SIZE
712 #ifndef BTA_HL_LRG_DATA_POOL_ID
713 #define BTA_HL_LRG_DATA_POOL_ID GKI_POOL_ID_7
716 /* GATT Server Database pool ID */
717 #ifndef GATT_DB_POOL_ID
718 #define GATT_DB_POOL_ID GKI_POOL_ID_8
721 /******************************************************************************
723 ** Lower Layer Interface
725 ******************************************************************************/
727 /* Sends ACL data received over HCI to the upper stack. */
728 #ifndef HCI_ACL_DATA_TO_UPPER
729 #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);}
732 /* Sends SCO data received over HCI to the upper stack. */
733 #ifndef HCI_SCO_DATA_TO_UPPER
734 #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);}
737 /* Sends an HCI event received over HCI to theupper stack. */
738 #ifndef HCI_EVT_TO_UPPER
739 #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);}
742 /* Macro for allocating buffer for HCI commands */
743 #ifndef HCI_GET_CMD_BUF
744 #if (!defined(HCI_USE_VARIABLE_SIZE_CMD_BUF) || (HCI_USE_VARIABLE_SIZE_CMD_BUF == FALSE))
745 /* Allocate fixed-size buffer from HCI_CMD_POOL (default case) */
746 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getpoolbuf (HCI_CMD_POOL_ID))
748 /* Allocate smallest possible buffer (for platforms with limited RAM) */
749 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getbuf ((UINT16)(BT_HDR_SIZE + HCIC_PREAMBLE_SIZE + (paramlen))))
751 #endif /* HCI_GET_CMD_BUF */
753 /******************************************************************************
757 ******************************************************************************/
758 #ifndef HCISU_H4_INCLUDED
759 #define HCISU_H4_INCLUDED TRUE
766 BT_API extern void bte_main_hci_send (BT_HDR *p_msg, UINT16 event);
767 #if (HCISU_H4_INCLUDED == TRUE)
768 BT_API extern void bte_main_lpm_allow_bt_device_sleep(void);
775 /* Sends ACL data received from the upper stack to the BD/EDR HCI transport. */
776 #ifndef HCI_ACL_DATA_TO_LOWER
777 #define HCI_ACL_DATA_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_ACL);
780 #ifndef HCI_BLE_ACL_DATA_TO_LOWER
781 #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));
784 /* Sends SCO data received from the upper stack to the HCI transport. */
785 #ifndef HCI_SCO_DATA_TO_LOWER
786 #define HCI_SCO_DATA_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_SCO);
789 /* Sends an HCI command received from the upper stack to the BD/EDR HCI transport. */
790 #ifndef HCI_CMD_TO_LOWER
791 #define HCI_CMD_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_CMD);
794 /* Sends an LM Diagnosic command received from the upper stack to the HCI transport. */
795 #ifndef HCI_LM_DIAG_TO_LOWER
796 #define HCI_LM_DIAG_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_DIAG);
799 /* Send HCISU a message to allow BT sleep */
800 #ifndef HCI_LP_ALLOW_BT_DEVICE_SLEEP
801 #define HCI_LP_ALLOW_BT_DEVICE_SLEEP() bte_main_lpm_allow_bt_device_sleep()
804 /* If nonzero, the upper-layer sends at most this number of HCI commands to the lower-layer. */
805 #ifndef HCI_MAX_SIMUL_CMDS
806 #define HCI_MAX_SIMUL_CMDS 0
809 /* Timeout for receiving response to HCI command */
810 #ifndef BTU_CMD_CMPL_TIMEOUT
811 #define BTU_CMD_CMPL_TIMEOUT 8
814 /* If TRUE, BTU task will check HCISU again when HCI command timer expires */
815 #ifndef BTU_CMD_CMPL_TOUT_DOUBLE_CHECK
816 #define BTU_CMD_CMPL_TOUT_DOUBLE_CHECK FALSE
819 /* Use 2 second for low-resolution systems, override to 1 for high-resolution systems */
820 #ifndef BT_1SEC_TIMEOUT
821 #define BT_1SEC_TIMEOUT (2)
825 /* if L2CAP_FCR_INCLUDED is TRUE then it should have 100 millisecond resolution */
826 /* if none of them is included then QUICK_TIMER_TICKS_PER_SEC is set to 0 to exclude quick timer */
827 #ifndef QUICK_TIMER_TICKS_PER_SEC
828 #define QUICK_TIMER_TICKS_PER_SEC 10 /* 10ms timer */
831 /******************************************************************************
835 ******************************************************************************/
836 /* if set to TRUE, stack will automatically send an HCI reset at start-up. To be
837 set to FALSE for advanced start-up / shut-down procedures using USER_HW_ENABLE_API
838 and USER_HW_DISABLE_API macros */
839 #ifndef BTM_AUTOMATIC_HCI_RESET
840 #define BTM_AUTOMATIC_HCI_RESET FALSE
843 /* Include BTM Discovery database and code. */
844 #ifndef BTM_DISCOVERY_INCLUDED
845 #define BTM_DISCOVERY_INCLUDED TRUE
848 /* Include inquiry code. */
849 #ifndef BTM_INQUIRY_INCLUDED
850 #define BTM_INQUIRY_INCLUDED TRUE
853 /* Cancel Inquiry on incoming SSP */
854 #ifndef BTM_NO_SSP_ON_INQUIRY
855 #define BTM_NO_SSP_ON_INQUIRY FALSE
858 /* Include periodic inquiry code (used when BTM_INQUIRY_INCLUDED is TRUE). */
859 #ifndef BTM_PERIODIC_INQ_INCLUDED
860 #define BTM_PERIODIC_INQ_INCLUDED TRUE
863 /* Include security authorization code */
864 #ifndef BTM_AUTHORIZATION_INCLUDED
865 #define BTM_AUTHORIZATION_INCLUDED TRUE
868 /* Includes SCO if TRUE */
869 #ifndef BTM_SCO_INCLUDED
870 #define BTM_SCO_INCLUDED TRUE /* TRUE includes SCO code */
873 /* Includes SCO if TRUE */
874 #ifndef BTM_SCO_HCI_INCLUDED
875 #define BTM_SCO_HCI_INCLUDED FALSE /* TRUE includes SCO over HCI code */
878 /* Includes WBS if TRUE */
879 #ifndef BTM_WBS_INCLUDED
880 #define BTM_WBS_INCLUDED FALSE /* TRUE includes WBS code */
883 /* Includes PCM2 support if TRUE */
884 #ifndef BTM_PCM2_INCLUDED
885 #define BTM_PCM2_INCLUDED FALSE
888 /* This is used to work around a controller bug that doesn't like Disconnect
889 ** issued while there is a role switch in progress
891 #ifndef BTM_DISC_DURING_RS
892 #define BTM_DISC_DURING_RS TRUE
895 /**************************
896 ** Initial SCO TX credit
897 *************************/
898 /* max TX SCO data packet size */
899 #ifndef BTM_SCO_DATA_SIZE_MAX
900 #define BTM_SCO_DATA_SIZE_MAX 240
903 /* maximum BTM buffering capacity */
904 #ifndef BTM_SCO_MAX_BUF_CAP
905 #define BTM_SCO_MAX_BUF_CAP (BTM_SCO_INIT_XMIT_CREDIT * 4)
908 /* The size in bytes of the BTM inquiry database. */
909 #ifndef BTM_INQ_DB_SIZE
910 #define BTM_INQ_DB_SIZE 40
913 /* This is set to enable automatic periodic inquiry at startup. */
914 #ifndef BTM_ENABLE_AUTO_INQUIRY
915 #define BTM_ENABLE_AUTO_INQUIRY FALSE
918 /* This is set to always try to acquire the remote device name. */
919 #ifndef BTM_INQ_GET_REMOTE_NAME
920 #define BTM_INQ_GET_REMOTE_NAME FALSE
923 /* The inquiry duration in 1.28 second units when auto inquiry is enabled. */
924 #ifndef BTM_DEFAULT_INQ_DUR
925 #define BTM_DEFAULT_INQ_DUR 5
928 /* The inquiry mode when auto inquiry is enabled. */
929 #ifndef BTM_DEFAULT_INQ_MODE
930 #define BTM_DEFAULT_INQ_MODE BTM_GENERAL_INQUIRY
933 /* The default periodic inquiry maximum delay when auto inquiry is enabled, in 1.28 second units. */
934 #ifndef BTM_DEFAULT_INQ_MAX_DELAY
935 #define BTM_DEFAULT_INQ_MAX_DELAY 30
938 /* The default periodic inquiry minimum delay when auto inquiry is enabled, in 1.28 second units. */
939 #ifndef BTM_DEFAULT_INQ_MIN_DELAY
940 #define BTM_DEFAULT_INQ_MIN_DELAY 20
943 /* The maximum age of entries in inquiry database in seconds ('0' disables feature). */
944 #ifndef BTM_INQ_MAX_AGE
945 #define BTM_INQ_MAX_AGE 0
948 /* The maximum age of entries in inquiry database based on inquiry response failure ('0' disables feature). */
949 #ifndef BTM_INQ_AGE_BY_COUNT
950 #define BTM_INQ_AGE_BY_COUNT 0
953 /* TRUE if controller does not support inquiry event filtering. */
954 #ifndef BTM_BYPASS_EVENT_FILTERING
955 #define BTM_BYPASS_EVENT_FILTERING FALSE
958 /* TRUE if inquiry filtering is desired from BTM. */
959 #ifndef BTM_USE_INQ_RESULTS_FILTER
960 #define BTM_USE_INQ_RESULTS_FILTER TRUE
963 /* The default scan mode */
964 #ifndef BTM_DEFAULT_SCAN_TYPE
965 #define BTM_DEFAULT_SCAN_TYPE BTM_SCAN_TYPE_INTERLACED
968 /* Should connections to unknown devices be allowed when not discoverable? */
969 #ifndef BTM_ALLOW_CONN_IF_NONDISCOVER
970 #define BTM_ALLOW_CONN_IF_NONDISCOVER TRUE
973 /* When connectable mode is set to TRUE, the device will respond to paging. */
974 #ifndef BTM_IS_CONNECTABLE
975 #define BTM_IS_CONNECTABLE FALSE
978 /* Sets the Page_Scan_Window: the length of time that the device is performing a page scan. */
979 #ifndef BTM_DEFAULT_CONN_WINDOW
980 #define BTM_DEFAULT_CONN_WINDOW 0x0012
983 /* Sets the Page_Scan_Activity: the interval between the start of two consecutive page scans. */
984 #ifndef BTM_DEFAULT_CONN_INTERVAL
985 #define BTM_DEFAULT_CONN_INTERVAL 0x0800
988 /* This is set to automatically perform inquiry scan on startup. */
989 #ifndef BTM_IS_DISCOVERABLE
990 #define BTM_IS_DISCOVERABLE FALSE
993 /* When automatic inquiry scan is enabled, this sets the discovery mode. */
994 #ifndef BTM_DEFAULT_DISC_MODE
995 #define BTM_DEFAULT_DISC_MODE BTM_GENERAL_DISCOVERABLE
998 /* When automatic inquiry scan is enabled, this sets the inquiry scan window. */
999 #ifndef BTM_DEFAULT_DISC_WINDOW
1000 #define BTM_DEFAULT_DISC_WINDOW 0x0012
1003 /* When automatic inquiry scan is enabled, this sets the inquiry scan interval. */
1004 #ifndef BTM_DEFAULT_DISC_INTERVAL
1005 #define BTM_DEFAULT_DISC_INTERVAL 0x0800
1008 /* Sets the period, in seconds, to automatically perform service discovery. */
1009 #ifndef BTM_AUTO_DISCOVERY_PERIOD
1010 #define BTM_AUTO_DISCOVERY_PERIOD 0
1013 /* The size in bytes of the BTM discovery database (if discovery is included). */
1014 #ifndef BTM_DISCOVERY_DB_SIZE
1015 #define BTM_DISCOVERY_DB_SIZE 4000
1018 /* Number of milliseconds to delay BTU task startup upon device initialization. */
1019 #ifndef BTU_STARTUP_DELAY
1020 #define BTU_STARTUP_DELAY 0
1023 /* Whether BTA is included in BTU task. */
1024 #ifndef BTU_BTA_INCLUDED
1025 #define BTU_BTA_INCLUDED TRUE
1028 /* Number of seconds to wait to send an HCI Reset command upon device initialization. */
1029 #ifndef BTM_FIRST_RESET_DELAY
1030 #define BTM_FIRST_RESET_DELAY 0
1033 /* The number of seconds to wait for controller module to reset after issuing an HCI Reset command. */
1034 #ifndef BTM_AFTER_RESET_TIMEOUT
1035 #define BTM_AFTER_RESET_TIMEOUT 0
1038 /* Default class of device
1039 * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
1041 * SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony)
1042 * MAJOR_CLASS:0x02 - PHONE
1043 * MINOR_CLASS:0x0C - SMART_PHONE
1047 #define BTA_DM_COD {0x5A, 0x02, 0x0C}
1050 /* The number of SCO links. */
1051 #ifndef BTM_MAX_SCO_LINKS
1052 #define BTM_MAX_SCO_LINKS 2
1055 /* The preferred type of SCO links (2-eSCO, 0-SCO). */
1056 #ifndef BTM_DEFAULT_SCO_MODE
1057 #define BTM_DEFAULT_SCO_MODE 2
1060 /* The number of security records for peer devices. */
1061 #ifndef BTM_SEC_MAX_DEVICE_RECORDS
1062 #define BTM_SEC_MAX_DEVICE_RECORDS 100
1065 /* The number of security records for services. */
1066 #ifndef BTM_SEC_MAX_SERVICE_RECORDS
1067 #define BTM_SEC_MAX_SERVICE_RECORDS 32
1070 /* If True, force a retrieval of remote device name for each bond in case it's changed */
1071 #ifndef BTM_SEC_FORCE_RNR_FOR_DBOND
1072 #define BTM_SEC_FORCE_RNR_FOR_DBOND FALSE
1075 /* Maximum device name length used in btm database. */
1076 #ifndef BTM_MAX_REM_BD_NAME_LEN
1077 #define BTM_MAX_REM_BD_NAME_LEN 248
1080 /* Maximum local device name length stored btm database.
1081 '0' disables storage of the local name in BTM */
1082 #ifndef BTM_MAX_LOC_BD_NAME_LEN
1083 #define BTM_MAX_LOC_BD_NAME_LEN 248
1086 /* TRUE if default string is used, FALSE if device name is set in the application */
1087 #ifndef BTM_USE_DEF_LOCAL_NAME
1088 #define BTM_USE_DEF_LOCAL_NAME TRUE
1091 /* Fixed Default String (Ignored if BTM_USE_DEF_LOCAL_NAME is FALSE) */
1092 #ifndef BTM_DEF_LOCAL_NAME
1093 #define BTM_DEF_LOCAL_NAME ""
1096 /* Maximum service name stored with security authorization (0 if not needed) */
1097 #ifndef BTM_SEC_SERVICE_NAME_LEN
1098 #define BTM_SEC_SERVICE_NAME_LEN BT_MAX_SERVICE_NAME_LEN
1101 /* Maximum number of pending security callback */
1102 #ifndef BTM_SEC_MAX_CALLBACKS
1103 #define BTM_SEC_MAX_CALLBACKS 7
1106 /* Maximum length of the service name. */
1107 #ifndef BT_MAX_SERVICE_NAME_LEN
1108 #define BT_MAX_SERVICE_NAME_LEN 21
1111 /* ACL buffer size in HCI Host Buffer Size command. */
1112 #ifndef BTM_ACL_BUF_SIZE
1113 #define BTM_ACL_BUF_SIZE 0
1116 /* This is set to use the BTM power manager. */
1117 #ifndef BTM_PWR_MGR_INCLUDED
1118 #define BTM_PWR_MGR_INCLUDED TRUE
1121 /* The maximum number of clients that can register with the power manager. */
1122 #ifndef BTM_MAX_PM_RECORDS
1123 #define BTM_MAX_PM_RECORDS 2
1126 /* This is set to show debug trace messages for the power manager. */
1127 #ifndef BTM_PM_DEBUG
1128 #define BTM_PM_DEBUG FALSE
1131 /* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */
1132 #ifndef BTM_SCO_WAKE_PARKED_LINK
1133 #define BTM_SCO_WAKE_PARKED_LINK TRUE
1136 /* May be set to the the name of a function used for vendor specific chip initialization */
1137 #ifndef BTM_APP_DEV_INIT
1138 /* #define BTM_APP_DEV_INIT myInitFunction() */
1141 /* This is set to TRUE if the busy level change event is desired. (replace ACL change event) */
1142 #ifndef BTM_BUSY_LEVEL_CHANGE_INCLUDED
1143 #define BTM_BUSY_LEVEL_CHANGE_INCLUDED TRUE
1146 /* If the user does not respond to security process requests within this many seconds,
1147 * a negative response would be sent automatically.
1148 * It's recommended to use a value between 30 and OBX_TIMEOUT_VALUE
1149 * 30 is LMP response timeout value */
1150 #ifndef BTM_SEC_TIMEOUT_VALUE
1151 #define BTM_SEC_TIMEOUT_VALUE 35
1154 /* Maximum number of callbacks that can be registered using BTM_RegisterForVSEvents */
1155 #ifndef BTM_MAX_VSE_CALLBACKS
1156 #define BTM_MAX_VSE_CALLBACKS 3
1159 /* Number of streams for dual stack */
1160 #ifndef BTM_SYNC_INFO_NUM_STR
1161 #define BTM_SYNC_INFO_NUM_STR 2
1164 /* Number of streams for dual stack in BT Controller */
1165 #ifndef BTM_SYNC_INFO_NUM_STR_BTC
1166 #define BTM_SYNC_INFO_NUM_STR_BTC 2
1169 /******************************************
1171 *******************************************/
1172 /* This is set to TRUE if the server Extended Inquiry Response feature is desired. */
1173 /* server sends EIR to client */
1174 #ifndef BTM_EIR_SERVER_INCLUDED
1175 #define BTM_EIR_SERVER_INCLUDED TRUE
1178 /* This is set to TRUE if the client Extended Inquiry Response feature is desired. */
1179 /* client inquiry to server */
1180 #ifndef BTM_EIR_CLIENT_INCLUDED
1181 #define BTM_EIR_CLIENT_INCLUDED TRUE
1184 /* This is set to TRUE if the FEC is required for EIR packet. */
1185 #ifndef BTM_EIR_DEFAULT_FEC_REQUIRED
1186 #define BTM_EIR_DEFAULT_FEC_REQUIRED TRUE
1189 /* User defined UUID look up table */
1190 #ifndef BTM_EIR_UUID_LKUP_TBL
1193 /* The IO capability of the local device (for Simple Pairing) */
1194 #ifndef BTM_LOCAL_IO_CAPS
1195 #define BTM_LOCAL_IO_CAPS BTM_IO_CAP_IO
1198 /* The default MITM Protection Requirement (for Simple Pairing)
1199 * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */
1200 #ifndef BTM_DEFAULT_AUTH_REQ
1201 #define BTM_DEFAULT_AUTH_REQ BTM_AUTH_SP_NO
1204 /* The default MITM Protection Requirement for dedicated bonding using Simple Pairing
1205 * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */
1206 #ifndef BTM_DEFAULT_DD_AUTH_REQ
1207 #define BTM_DEFAULT_DD_AUTH_REQ BTM_AUTH_AP_YES
1210 /* Include Out-of-Band implementation for Simple Pairing */
1211 #ifndef BTM_OOB_INCLUDED
1212 #define BTM_OOB_INCLUDED TRUE
1215 /* TRUE to include Sniff Subrating */
1216 #ifndef BTM_SSR_INCLUDED
1217 #define BTM_SSR_INCLUDED TRUE
1220 /*************************
1221 ** End of Lisbon Features
1222 **************************/
1224 /* Used for conformance testing ONLY */
1225 #ifndef BTM_BLE_CONFORMANCE_TESTING
1226 #define BTM_BLE_CONFORMANCE_TESTING FALSE
1230 /******************************************************************************
1234 ******************************************************************************/
1236 /* Flow control and retransmission mode */
1238 #ifndef L2CAP_FCR_INCLUDED
1239 #define L2CAP_FCR_INCLUDED TRUE
1242 /* The maximum number of simultaneous links that L2CAP can support. */
1243 #ifndef MAX_ACL_CONNECTIONS
1244 #define MAX_L2CAP_LINKS 7
1246 #define MAX_L2CAP_LINKS MAX_ACL_CONNECTIONS
1249 /* The maximum number of simultaneous channels that L2CAP can support. */
1250 #ifndef MAX_L2CAP_CHANNELS
1251 #define MAX_L2CAP_CHANNELS 10
1254 /* The maximum number of simultaneous applications that can register with L2CAP. */
1255 #ifndef MAX_L2CAP_CLIENTS
1256 #define MAX_L2CAP_CLIENTS 15
1259 /* The number of seconds of link inactivity before a link is disconnected. */
1260 #ifndef L2CAP_LINK_INACTIVITY_TOUT
1261 #define L2CAP_LINK_INACTIVITY_TOUT 4
1264 /* The number of seconds of link inactivity after bonding before a link is disconnected. */
1265 #ifndef L2CAP_BONDING_TIMEOUT
1266 #define L2CAP_BONDING_TIMEOUT 3
1269 /* The time from the HCI connection complete to disconnect if no channel is established. */
1270 #ifndef L2CAP_LINK_STARTUP_TOUT
1271 #define L2CAP_LINK_STARTUP_TOUT 60
1274 /* The L2CAP MTU; must be in accord with the HCI ACL pool size. */
1275 #ifndef L2CAP_MTU_SIZE
1276 #define L2CAP_MTU_SIZE 1691
1279 /* The L2CAP MPS over Bluetooth; must be in accord with the FCR tx pool size and ACL down buffer size. */
1280 #ifndef L2CAP_MPS_OVER_BR_EDR
1281 #define L2CAP_MPS_OVER_BR_EDR 1010
1284 /* This is set to enable host flow control. */
1285 #ifndef L2CAP_HOST_FLOW_CTRL
1286 #define L2CAP_HOST_FLOW_CTRL FALSE
1289 /* If host flow control enabled, this is the number of buffers the controller can have unacknowledged. */
1290 #ifndef L2CAP_HOST_FC_ACL_BUFS
1291 #define L2CAP_HOST_FC_ACL_BUFS 20
1294 /* The percentage of the queue size allowed before a congestion event is sent to the L2CAP client (typically 120%). */
1295 #ifndef L2CAP_FWD_CONG_THRESH
1296 #define L2CAP_FWD_CONG_THRESH 120
1299 /* This is set to enable L2CAP to take the ACL link out of park mode when ACL data is to be sent. */
1300 #ifndef L2CAP_WAKE_PARKED_LINK
1301 #define L2CAP_WAKE_PARKED_LINK TRUE
1304 /* Whether link wants to be the master or the slave. */
1305 #ifndef L2CAP_DESIRED_LINK_ROLE
1306 #define L2CAP_DESIRED_LINK_ROLE HCI_ROLE_SLAVE
1309 /* Include Non-Flushable Packet Boundary Flag feature of Lisbon */
1310 #ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED
1311 #define L2CAP_NON_FLUSHABLE_PB_INCLUDED TRUE
1314 /* Minimum number of ACL credit for high priority link */
1315 #ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
1316 #define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 4
1319 /* used for monitoring HCI ACL credit management */
1320 #ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG
1321 #define L2CAP_HCI_FLOW_CONTROL_DEBUG TRUE
1324 /* Used for calculating transmit buffers off of */
1325 #ifndef L2CAP_NUM_XMIT_BUFFS
1326 #define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX
1329 /* Unicast Connectionless Data */
1330 #ifndef L2CAP_UCD_INCLUDED
1331 #define L2CAP_UCD_INCLUDED FALSE
1334 /* Unicast Connectionless Data MTU */
1335 #ifndef L2CAP_UCD_MTU
1336 #define L2CAP_UCD_MTU L2CAP_MTU_SIZE
1339 /* Unicast Connectionless Data Idle Timeout */
1340 #ifndef L2CAP_UCD_IDLE_TIMEOUT
1341 #define L2CAP_UCD_IDLE_TIMEOUT 2
1344 /* Unicast Connectionless Data Idle Timeout */
1345 #ifndef L2CAP_UCD_CH_PRIORITY
1346 #define L2CAP_UCD_CH_PRIORITY L2CAP_CHNL_PRIORITY_MEDIUM
1349 /* Max clients on Unicast Connectionless Data */
1350 #ifndef L2CAP_MAX_UCD_CLIENTS
1351 #define L2CAP_MAX_UCD_CLIENTS 5
1354 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
1355 /* Excluding L2CAP signaling channel and UCD */
1356 #ifndef L2CAP_NUM_FIXED_CHNLS
1357 #define L2CAP_NUM_FIXED_CHNLS 4
1360 /* First fixed channel supported */
1361 #ifndef L2CAP_FIRST_FIXED_CHNL
1362 #define L2CAP_FIRST_FIXED_CHNL 3
1365 #ifndef L2CAP_LAST_FIXED_CHNL
1366 #define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
1369 /* Round Robin service channels in link */
1370 #ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
1371 #define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE TRUE
1374 /* Used for calculating transmit buffers off of */
1375 #ifndef L2CAP_NUM_XMIT_BUFFS
1376 #define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX
1379 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
1380 #ifndef L2CAP_NUM_FIXED_CHNLS
1381 #define L2CAP_NUM_FIXED_CHNLS 1
1384 /* First fixed channel supported */
1385 #ifndef L2CAP_FIRST_FIXED_CHNL
1386 #define L2CAP_FIRST_FIXED_CHNL 3
1389 #ifndef L2CAP_LAST_FIXED_CHNL
1390 #define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
1393 /* used for monitoring eL2CAP data flow */
1394 #ifndef L2CAP_ERTM_STATS
1395 #define L2CAP_ERTM_STATS FALSE
1398 /* USED FOR FCR TEST ONLY: When TRUE generates bad tx and rx packets */
1399 #ifndef L2CAP_CORRUPT_ERTM_PKTS
1400 #define L2CAP_CORRUPT_ERTM_PKTS FALSE
1403 /* Used for conformance testing ONLY: When TRUE lets scriptwrapper overwrite info response */
1404 #ifndef L2CAP_CONFORMANCE_TESTING
1405 #define L2CAP_CONFORMANCE_TESTING FALSE
1409 #ifndef TIMER_PARAM_TYPE
1411 #define TIMER_PARAM_TYPE void *
1413 #define TIMER_PARAM_TYPE UINT32
1417 /******************************************************************************
1421 ******************************************************************************/
1423 #ifndef BLE_INCLUDED
1424 #define BLE_INCLUDED FALSE
1427 #ifndef LOCAL_BLE_CONTROLLER_ID
1428 #define LOCAL_BLE_CONTROLLER_ID (1)
1431 /******************************************************************************
1433 ** ATT/GATT Protocol/Profile Settings
1435 ******************************************************************************/
1436 #ifndef ATT_INCLUDED
1437 #define ATT_INCLUDED FALSE
1441 #define ATT_DEBUG FALSE
1444 #ifndef GATT_SERVER_ENABLED
1445 #define GATT_SERVER_ENABLED FALSE
1448 #ifndef GATT_CLIENT_ENABLED
1449 #define GATT_CLIENT_ENABLED FALSE
1452 #ifndef GATT_MAX_SR_PROFILES
1453 #define GATT_MAX_SR_PROFILES 32 /* max is 32 */
1456 #ifndef GATT_MAX_APPS
1457 #define GATT_MAX_APPS 10 /* note: 2 apps used internally GATT and GAP */
1460 #ifndef GATT_MAX_CL_PROFILES
1461 #define GATT_MAX_CL_PROFILES 4
1464 #ifndef GATT_MAX_PHY_CHANNEL
1465 #define GATT_MAX_PHY_CHANNEL 4
1468 /* Used for conformance testing ONLY */
1469 #ifndef GATT_CONFORMANCE_TESTING
1470 #define GATT_CONFORMANCE_TESTING FALSE
1473 /* number of background connection device allowence, ideally to be the same as WL size
1475 #ifndef GATT_MAX_BG_CONN_DEV
1476 #define GATT_MAX_BG_CONN_DEV 32
1479 /******************************************************************************
1483 ******************************************************************************/
1484 #ifndef SMP_INCLUDED
1485 #define SMP_INCLUDED FALSE
1489 #define SMP_DEBUG FALSE
1492 #ifndef SMP_DEFAULT_AUTH_REQ
1493 #define SMP_DEFAULT_AUTH_REQ SMP_AUTH_NB_ENC_ONLY
1496 #ifndef SMP_MAX_ENC_KEY_SIZE
1497 #define SMP_MAX_ENC_KEY_SIZE 16
1500 #ifndef SMP_MIN_ENC_KEY_SIZE
1501 #define SMP_MIN_ENC_KEY_SIZE 7
1504 /* Used for conformance testing ONLY */
1505 #ifndef SMP_CONFORMANCE_TESTING
1506 #define SMP_CONFORMANCE_TESTING FALSE
1509 /******************************************************************************
1513 ******************************************************************************/
1515 /* This is set to enable SDP server functionality. */
1516 #ifndef SDP_SERVER_ENABLED
1517 #define SDP_SERVER_ENABLED TRUE
1520 /* The maximum number of SDP records the server can support. */
1521 #ifndef SDP_MAX_RECORDS
1522 #define SDP_MAX_RECORDS 20
1525 /* The maximum number of attributes in each record. */
1526 #ifndef SDP_MAX_REC_ATTR
1527 //#if defined(HID_DEV_INCLUDED) && (HID_DEV_INCLUDED==TRUE)
1528 #define SDP_MAX_REC_ATTR 25
1530 //#define SDP_MAX_REC_ATTR 13
1534 #ifndef SDP_MAX_PAD_LEN
1535 #define SDP_MAX_PAD_LEN 600
1538 /* The maximum length, in bytes, of an attribute. */
1539 #ifndef SDP_MAX_ATTR_LEN
1540 //#if defined(HID_DEV_INCLUDED) && (HID_DEV_INCLUDED==TRUE)
1541 //#define SDP_MAX_ATTR_LEN 80
1543 //#define SDP_MAX_ATTR_LEN 100
1545 #define SDP_MAX_ATTR_LEN 400
1548 /* The maximum number of attribute filters supported by SDP databases. */
1549 #ifndef SDP_MAX_ATTR_FILTERS
1550 #define SDP_MAX_ATTR_FILTERS 15
1553 /* The maximum number of UUID filters supported by SDP databases. */
1554 #ifndef SDP_MAX_UUID_FILTERS
1555 #define SDP_MAX_UUID_FILTERS 3
1558 /* This is set to enable SDP client functionality. */
1559 #ifndef SDP_CLIENT_ENABLED
1560 #define SDP_CLIENT_ENABLED TRUE
1563 /* The maximum number of record handles retrieved in a search. */
1564 #ifndef SDP_MAX_DISC_SERVER_RECS
1565 #define SDP_MAX_DISC_SERVER_RECS 21
1568 /* The size of a scratchpad buffer, in bytes, for storing the response to an attribute request. */
1569 #ifndef SDP_MAX_LIST_BYTE_COUNT
1570 #define SDP_MAX_LIST_BYTE_COUNT 4096
1573 /* The maximum number of parameters in an SDP protocol element. */
1574 #ifndef SDP_MAX_PROTOCOL_PARAMS
1575 #define SDP_MAX_PROTOCOL_PARAMS 2
1578 /* The maximum number of simultaneous client and server connections. */
1579 #ifndef SDP_MAX_CONNECTIONS
1580 #define SDP_MAX_CONNECTIONS 4
1583 /* The MTU size for the L2CAP configuration. */
1584 #ifndef SDP_MTU_SIZE
1585 #define SDP_MTU_SIZE 256
1588 /* The flush timeout for the L2CAP configuration. */
1589 #ifndef SDP_FLUSH_TO
1590 #define SDP_FLUSH_TO 0xFFFF
1593 /* The name for security authorization. */
1594 #ifndef SDP_SERVICE_NAME
1595 #define SDP_SERVICE_NAME "Service Discovery"
1598 /* The security level for BTM. */
1599 #ifndef SDP_SECURITY_LEVEL
1600 #define SDP_SECURITY_LEVEL BTM_SEC_NONE
1603 /* Device identification feature. */
1604 #ifndef SDP_DI_INCLUDED
1605 #define SDP_DI_INCLUDED TRUE
1608 /******************************************************************************
1612 ******************************************************************************/
1614 #ifndef RFCOMM_INCLUDED
1615 #define RFCOMM_INCLUDED TRUE
1618 /* The maximum number of ports supported. */
1619 #ifndef MAX_RFC_PORTS
1620 #define MAX_RFC_PORTS 30
1623 /* The maximum simultaneous links to different devices. */
1624 #ifndef MAX_ACL_CONNECTIONS
1625 #define MAX_BD_CONNECTIONS 7
1627 #define MAX_BD_CONNECTIONS MAX_ACL_CONNECTIONS
1630 /* The port receive queue low watermark level, in bytes. */
1631 #ifndef PORT_RX_LOW_WM
1632 #define PORT_RX_LOW_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM)
1635 /* The port receive queue high watermark level, in bytes. */
1636 #ifndef PORT_RX_HIGH_WM
1637 #define PORT_RX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM)
1640 /* The port receive queue critical watermark level, in bytes. */
1641 #ifndef PORT_RX_CRITICAL_WM
1642 #define PORT_RX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM)
1645 /* The port receive queue low watermark level, in number of buffers. */
1646 #ifndef PORT_RX_BUF_LOW_WM
1647 #define PORT_RX_BUF_LOW_WM 4
1650 /* The port receive queue high watermark level, in number of buffers. */
1651 #ifndef PORT_RX_BUF_HIGH_WM
1652 #define PORT_RX_BUF_HIGH_WM 10
1655 /* The port receive queue critical watermark level, in number of buffers. */
1656 #ifndef PORT_RX_BUF_CRITICAL_WM
1657 #define PORT_RX_BUF_CRITICAL_WM 15
1660 /* The port transmit queue high watermark level, in bytes. */
1661 #ifndef PORT_TX_HIGH_WM
1662 #define PORT_TX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM)
1665 /* The port transmit queue critical watermark level, in bytes. */
1666 #ifndef PORT_TX_CRITICAL_WM
1667 #define PORT_TX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM)
1670 /* The port transmit queue high watermark level, in number of buffers. */
1671 #ifndef PORT_TX_BUF_HIGH_WM
1672 #define PORT_TX_BUF_HIGH_WM 10
1675 /* The port transmit queue high watermark level, in number of buffers. */
1676 #ifndef PORT_TX_BUF_CRITICAL_WM
1677 #define PORT_TX_BUF_CRITICAL_WM 15
1680 /* The RFCOMM multiplexer preferred flow control mechanism. */
1681 #ifndef PORT_FC_DEFAULT
1682 #define PORT_FC_DEFAULT PORT_FC_CREDIT
1685 /* The maximum number of credits receiver sends to peer when using credit-based flow control. */
1686 #ifndef PORT_CREDIT_RX_MAX
1687 #define PORT_CREDIT_RX_MAX 16
1690 /* The credit low watermark level. */
1691 #ifndef PORT_CREDIT_RX_LOW
1692 #define PORT_CREDIT_RX_LOW 8
1695 /* Test code allowing l2cap FEC on RFCOMM.*/
1696 #ifndef PORT_ENABLE_L2CAP_FCR_TEST
1697 #define PORT_ENABLE_L2CAP_FCR_TEST FALSE
1700 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1701 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_lock() or GKI_disable() */
1702 #ifndef PORT_SCHEDULE_LOCK
1703 #define PORT_SCHEDULE_LOCK GKI_disable()
1706 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1707 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_unlock() or GKI_enable() */
1708 #ifndef PORT_SCHEDULE_UNLOCK
1709 #define PORT_SCHEDULE_UNLOCK GKI_enable()
1712 /******************************************************************************
1716 ******************************************************************************/
1718 #ifndef TCS_INCLUDED
1719 #define TCS_INCLUDED FALSE
1722 /* If set to TRUE, gives lean TCS state machine configuration. */
1724 #define TCS_LEAN FALSE
1727 /* To include/exclude point-to-multipoint broadcast SETUP configuration. */
1728 #ifndef TCS_BCST_SETUP_INCLUDED
1729 #define TCS_BCST_SETUP_INCLUDED TRUE
1732 /* To include/exclude supplementary services. */
1733 #ifndef TCS_SUPP_SVCS_INCLUDED
1734 #define TCS_SUPP_SVCS_INCLUDED TRUE
1737 /* To include/exclude WUG master role. */
1738 #ifndef TCS_WUG_MASTER_INCLUDED
1739 #define TCS_WUG_MASTER_INCLUDED TRUE
1742 /* To include/exclude WUG member role. */
1743 #ifndef TCS_WUG_MEMBER_INCLUDED
1744 #define TCS_WUG_MEMBER_INCLUDED TRUE
1747 /* Maximum number of WUG members. */
1748 #ifndef TCS_MAX_WUG_MEMBERS
1749 #define TCS_MAX_WUG_MEMBERS 7
1752 /* Broadcom specific acknowledgement message to ensure fast and robust operation of WUG FIMA procedure. */
1753 #ifndef TCS_WUG_LISTEN_ACPT_ACK_INCLUDED
1754 #define TCS_WUG_LISTEN_ACPT_ACK_INCLUDED TRUE
1757 /* The number of simultaneous calls supported. */
1758 #ifndef TCS_MAX_NUM_SIMUL_CALLS
1759 #define TCS_MAX_NUM_SIMUL_CALLS 3
1762 /* The number of devices the device can connect to. */
1763 #ifndef TCS_MAX_NUM_ACL_CONNS
1764 #define TCS_MAX_NUM_ACL_CONNS 7
1767 /* The maximum length, in bytes, of the company specific information element. */
1768 #ifndef TCS_MAX_CO_SPEC_LEN
1769 #define TCS_MAX_CO_SPEC_LEN 40
1772 /* The maximum length, in bytes, of the audio control information element . */
1773 #ifndef TCS_MAX_AUDIO_CTL_LEN
1774 #define TCS_MAX_AUDIO_CTL_LEN 40
1777 /* (Dis)allow EDR ESCO */
1778 #ifndef TCS_AUDIO_USE_ESCO_EDR
1779 #define TCS_AUDIO_USE_ESCO_EDR FALSE
1782 /******************************************************************************
1786 ******************************************************************************/
1787 #ifndef OBX_INCLUDED
1788 #define OBX_INCLUDED FALSE
1791 #ifndef OBX_CLIENT_INCLUDED
1792 #define OBX_CLIENT_INCLUDED TRUE
1795 #ifndef OBX_SERVER_INCLUDED
1796 #define OBX_SERVER_INCLUDED TRUE
1799 /* TRUE to include OBEX authentication/MD5 code */
1800 #ifndef OBX_MD5_INCLUDED
1801 #define OBX_MD5_INCLUDED TRUE
1804 /* TRUE to include OBEX authentication/MD5 test code */
1805 #ifndef OBX_MD5_TEST_INCLUDED
1806 #define OBX_MD5_TEST_INCLUDED FALSE
1809 /* TRUE to include OBEX 1.4 enhancement (including Obex Over L2CAP) */
1810 #ifndef OBX_14_INCLUDED
1811 #define OBX_14_INCLUDED FALSE
1813 /* MD5 code is required to use OBEX 1.4 features (Reliable session) */
1814 #if (OBX_MD5_INCLUDED == FALSE)
1815 #undef OBX_14_INCLUDED
1816 #define OBX_14_INCLUDED FALSE
1819 /* L2CAP FCR/eRTM mode is required to use OBEX Over L2CAP */
1820 #if (L2CAP_FCR_INCLUDED == FALSE)
1821 #undef OBX_14_INCLUDED
1822 #define OBX_14_INCLUDED FALSE
1825 /* The timeout value (in seconds) for reliable sessions to remain in suspend. 0xFFFFFFFF for no timeout event. */
1826 #ifndef OBX_SESS_TIMEOUT_VALUE
1827 #define OBX_SESS_TIMEOUT_VALUE 600
1830 /* The idle timeout value. 0 for no timeout event. */
1831 #ifndef OBX_TIMEOUT_VALUE
1832 #define OBX_TIMEOUT_VALUE 60
1835 /* Timeout value used for disconnect */
1836 #ifndef OBX_DISC_TOUT_VALUE
1837 #define OBX_DISC_TOUT_VALUE 5
1840 /* The maximum number of registered servers. */
1841 #ifndef OBX_NUM_SERVERS
1842 #define OBX_NUM_SERVERS 12
1845 /* The maximum number of sessions per registered server. */
1846 #ifndef OBX_MAX_SR_SESSION
1847 #define OBX_MAX_SR_SESSION 4
1850 /* The maximum number of sessions for all registered servers.
1851 * (must be equal or bigger than OBX_NUM_SERVERS) */
1852 #ifndef OBX_NUM_SR_SESSIONS
1853 #define OBX_NUM_SR_SESSIONS 26
1856 /* The maximum number of sessions per registered server.
1857 * must be less than MAX_BD_CONNECTIONS */
1858 #ifndef OBX_MAX_SR_SESSION
1859 #define OBX_MAX_SR_SESSION 4
1862 /* The maximum number of suspended sessions per registered servers. */
1863 #ifndef OBX_MAX_SUSPEND_SESSIONS
1864 #define OBX_MAX_SUSPEND_SESSIONS 4
1867 /* The maximum number of active clients. */
1868 #ifndef OBX_NUM_CLIENTS
1869 #define OBX_NUM_CLIENTS 8
1872 /* The maximum length of OBEX target header.*/
1873 #ifndef OBX_MAX_TARGET_LEN
1874 #define OBX_MAX_TARGET_LEN 16
1877 /* The maximum length of authentication challenge realm.*/
1878 #ifndef OBX_MAX_REALM_LEN
1879 #define OBX_MAX_REALM_LEN 30
1882 /* The maximum of GKI buffer queued at OBX before flow control L2CAP */
1883 #ifndef OBX_MAX_RX_QUEUE_COUNT
1884 #define OBX_MAX_RX_QUEUE_COUNT 3
1887 /* This option is application when OBX_14_INCLUDED=TRUE
1888 Pool ID where to reassemble the SDU.
1889 This Pool will allow buffers to be used that are larger than
1890 the L2CAP_MAX_MTU. */
1891 #ifndef OBX_USER_RX_POOL_ID
1892 #define OBX_USER_RX_POOL_ID OBX_LRG_DATA_POOL_ID
1895 /* This option is application when OBX_14_INCLUDED=TRUE
1896 Pool ID where to hold the SDU.
1897 This Pool will allow buffers to be used that are larger than
1898 the L2CAP_MAX_MTU. */
1899 #ifndef OBX_USER_TX_POOL_ID
1900 #define OBX_USER_TX_POOL_ID OBX_LRG_DATA_POOL_ID
1903 /* This option is application when OBX_14_INCLUDED=TRUE
1904 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
1906 #ifndef OBX_FCR_RX_POOL_ID
1907 #define OBX_FCR_RX_POOL_ID HCI_ACL_POOL_ID
1910 /* This option is application when OBX_14_INCLUDED=TRUE
1911 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
1912 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
1913 Note: This pool needs to have enough buffers to hold two times the window size negotiated
1914 in the L2CA_SetFCROptions (2 * tx_win_size) to allow for retransmissions.
1915 The size of each buffer must be able to hold the maximum MPS segment size passed in
1916 L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1918 #ifndef OBX_FCR_TX_POOL_ID
1919 #define OBX_FCR_TX_POOL_ID HCI_ACL_POOL_ID
1922 /* This option is application when OBX_14_INCLUDED=TRUE
1923 Size of the transmission window when using enhanced retransmission mode. Not used
1924 in basic and streaming modes. Range: 1 - 63
1926 #ifndef OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR
1927 #define OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR 20
1930 /* This option is application when OBX_14_INCLUDED=TRUE
1931 Number of transmission attempts for a single I-Frame before taking
1932 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1935 0 - infinite retransmissions
1936 1 - single transmission
1938 #ifndef OBX_FCR_OPT_MAX_TX_B4_DISCNT
1939 #define OBX_FCR_OPT_MAX_TX_B4_DISCNT 20
1942 /* This option is application when OBX_14_INCLUDED=TRUE
1943 Retransmission Timeout
1944 Range: Minimum 2000 (2 secs) on BR/EDR when supporting PBF.
1946 #ifndef OBX_FCR_OPT_RETX_TOUT
1947 #define OBX_FCR_OPT_RETX_TOUT 2000
1950 /* This option is application when OBX_14_INCLUDED=TRUE
1952 Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
1954 #ifndef OBX_FCR_OPT_MONITOR_TOUT
1955 #define OBX_FCR_OPT_MONITOR_TOUT 12000
1958 /******************************************************************************
1962 ******************************************************************************/
1964 #ifndef BNEP_INCLUDED
1965 #define BNEP_INCLUDED TRUE
1968 /* Protocol filtering is an optional feature. Bydefault it will be turned on */
1969 #ifndef BNEP_SUPPORTS_PROT_FILTERS
1970 #define BNEP_SUPPORTS_PROT_FILTERS TRUE
1973 /* Multicast filtering is an optional feature. Bydefault it will be turned on */
1974 #ifndef BNEP_SUPPORTS_MULTI_FILTERS
1975 #define BNEP_SUPPORTS_MULTI_FILTERS TRUE
1978 /* BNEP status API call is used mainly to get the L2CAP handle */
1979 #ifndef BNEP_SUPPORTS_STATUS_API
1980 #define BNEP_SUPPORTS_STATUS_API TRUE
1983 /* This is just a debug function */
1984 #ifndef BNEP_SUPPORTS_DEBUG_DUMP
1985 #define BNEP_SUPPORTS_DEBUG_DUMP TRUE
1988 #ifndef BNEP_SUPPORTS_ALL_UUID_LENGTHS
1989 #define BNEP_SUPPORTS_ALL_UUID_LENGTHS TRUE /* Otherwise it will support only 16bit UUIDs */
1993 ** When BNEP connection changes roles after the connection is established
1994 ** we will do an authentication check again on the new role
1996 #ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH
1997 #define BNEP_DO_AUTH_FOR_ROLE_SWITCH TRUE
2001 /* Maximum number of protocol filters supported. */
2002 #ifndef BNEP_MAX_PROT_FILTERS
2003 #define BNEP_MAX_PROT_FILTERS 5
2006 /* Maximum number of multicast filters supported. */
2007 #ifndef BNEP_MAX_MULTI_FILTERS
2008 #define BNEP_MAX_MULTI_FILTERS 5
2011 /* Minimum MTU size. */
2012 #ifndef BNEP_MIN_MTU_SIZE
2013 #define BNEP_MIN_MTU_SIZE L2CAP_MTU_SIZE
2016 /* Preferred MTU size. */
2017 #ifndef BNEP_MTU_SIZE
2018 #define BNEP_MTU_SIZE BNEP_MIN_MTU_SIZE
2021 /* Maximum size of user data, in bytes. */
2022 #ifndef BNEP_MAX_USER_DATA_SIZE
2023 #define BNEP_MAX_USER_DATA_SIZE 1500
2026 /* Maximum number of buffers allowed in transmit data queue. */
2027 #ifndef BNEP_MAX_XMITQ_DEPTH
2028 #define BNEP_MAX_XMITQ_DEPTH 20
2031 /* Maximum number BNEP of connections supported. */
2032 #ifndef BNEP_MAX_CONNECTIONS
2033 #define BNEP_MAX_CONNECTIONS 7
2037 /******************************************************************************
2041 ******************************************************************************/
2043 #ifndef AVDT_INCLUDED
2044 #define AVDT_INCLUDED TRUE
2047 /* Include reporting capability in AVDTP */
2048 #ifndef AVDT_REPORTING
2049 #define AVDT_REPORTING TRUE
2052 /* Include multiplexing capability in AVDTP */
2053 #ifndef AVDT_MULTIPLEXING
2054 #define AVDT_MULTIPLEXING TRUE
2057 /* Number of simultaneous links to different peer devices. */
2058 #ifndef AVDT_NUM_LINKS
2059 #define AVDT_NUM_LINKS 2
2062 /* Number of simultaneous stream endpoints. */
2063 #ifndef AVDT_NUM_SEPS
2064 #define AVDT_NUM_SEPS 3
2067 /* Number of transport channels setup per media stream(audio or video) */
2068 #ifndef AVDT_NUM_CHANNELS
2070 #if AVDT_REPORTING == TRUE
2071 /* signaling, media and reporting channels */
2072 #define AVDT_NUM_CHANNELS 3
2074 /* signaling and media channels */
2075 #define AVDT_NUM_CHANNELS 2
2080 /* Number of transport channels setup by AVDT for all media streams
2081 * AVDT_NUM_CHANNELS * Number of simultaneous streams.
2083 #ifndef AVDT_NUM_TC_TBL
2084 #define AVDT_NUM_TC_TBL 6
2088 /* Maximum size in bytes of the codec capabilities information element. */
2089 #ifndef AVDT_CODEC_SIZE
2090 #define AVDT_CODEC_SIZE 10
2093 /* Maximum size in bytes of the content protection information element. */
2094 #ifndef AVDT_PROTECT_SIZE
2095 #define AVDT_PROTECT_SIZE 90
2098 /* Maximum number of GKI buffers in the fragment queue (for video frames).
2099 * Must be less than the number of buffers in the buffer pool of size AVDT_DATA_POOL_SIZE */
2100 #ifndef AVDT_MAX_FRAG_COUNT
2101 #define AVDT_MAX_FRAG_COUNT 15
2104 /******************************************************************************
2108 ******************************************************************************/
2110 #ifndef PAN_INCLUDED
2111 #define PAN_INCLUDED TRUE
2114 /* This will enable the PANU role */
2115 #ifndef PAN_SUPPORTS_ROLE_PANU
2116 #define PAN_SUPPORTS_ROLE_PANU TRUE
2119 /* This will enable the GN role */
2120 #ifndef PAN_SUPPORTS_ROLE_GN
2121 #define PAN_SUPPORTS_ROLE_GN TRUE
2124 /* This will enable the NAP role */
2125 #ifndef PAN_SUPPORTS_ROLE_NAP
2126 #define PAN_SUPPORTS_ROLE_NAP TRUE
2129 /* This is just for debugging purposes */
2130 #ifndef PAN_SUPPORTS_DEBUG_DUMP
2131 #define PAN_SUPPORTS_DEBUG_DUMP TRUE
2135 /* Maximum number of PAN connections allowed */
2136 #ifndef MAX_PAN_CONNS
2137 #define MAX_PAN_CONNS 7
2140 /* Default service name for NAP role */
2141 #ifndef PAN_NAP_DEFAULT_SERVICE_NAME
2142 #define PAN_NAP_DEFAULT_SERVICE_NAME "Network Access Point Service"
2145 /* Default service name for GN role */
2146 #ifndef PAN_GN_DEFAULT_SERVICE_NAME
2147 #define PAN_GN_DEFAULT_SERVICE_NAME "Group Network Service"
2150 /* Default service name for PANU role */
2151 #ifndef PAN_PANU_DEFAULT_SERVICE_NAME
2152 #define PAN_PANU_DEFAULT_SERVICE_NAME "PAN User Service"
2155 /* Default description for NAP role service */
2156 #ifndef PAN_NAP_DEFAULT_DESCRIPTION
2157 #define PAN_NAP_DEFAULT_DESCRIPTION "NAP"
2160 /* Default description for GN role service */
2161 #ifndef PAN_GN_DEFAULT_DESCRIPTION
2162 #define PAN_GN_DEFAULT_DESCRIPTION "GN"
2165 /* Default description for PANU role service */
2166 #ifndef PAN_PANU_DEFAULT_DESCRIPTION
2167 #define PAN_PANU_DEFAULT_DESCRIPTION "PANU"
2170 /* Default Security level for PANU role. */
2171 #ifndef PAN_PANU_SECURITY_LEVEL
2172 #define PAN_PANU_SECURITY_LEVEL 0
2175 /* Default Security level for GN role. */
2176 #ifndef PAN_GN_SECURITY_LEVEL
2177 #define PAN_GN_SECURITY_LEVEL 0
2180 /* Default Security level for NAP role. */
2181 #ifndef PAN_NAP_SECURITY_LEVEL
2182 #define PAN_NAP_SECURITY_LEVEL 0
2188 /******************************************************************************
2192 ******************************************************************************/
2194 #ifndef GAP_INCLUDED
2195 #define GAP_INCLUDED FALSE
2198 /* This is set to enable use of GAP L2CAP connections. */
2199 #ifndef GAP_CONN_INCLUDED
2200 #define GAP_CONN_INCLUDED TRUE
2203 /* This is set to enable posting event for data write */
2204 #ifndef GAP_CONN_POST_EVT_INCLUDED
2205 #define GAP_CONN_POST_EVT_INCLUDED FALSE
2208 /* The maximum number of simultaneous GAP L2CAP connections. */
2209 #ifndef GAP_MAX_CONNECTIONS
2210 #define GAP_MAX_CONNECTIONS 8
2213 /******************************************************************************
2217 ******************************************************************************/
2219 #ifndef CTP_INCLUDED
2220 #define CTP_INCLUDED FALSE
2223 /* To include CTP gateway functionality or not. */
2224 #ifndef CTP_GW_INCLUDED
2225 #define CTP_GW_INCLUDED TRUE
2228 /* The number of terminals supported. */
2229 #ifndef CTP_MAX_NUM_TLS
2230 #define CTP_MAX_NUM_TLS 7
2233 /* If the controller can not support sniff mode when the SCO is up, set this to FALSE. */
2234 #ifndef CTP_USE_SNIFF_ON_SCO
2235 #define CTP_USE_SNIFF_ON_SCO FALSE
2238 /* 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. */
2239 #ifndef CTP_TL_IDLE_TIMEOUT
2240 #define CTP_TL_IDLE_TIMEOUT 90
2243 /* To include CTP terminal functionality or not. */
2244 #ifndef CTP_TL_INCLUDED
2245 #define CTP_TL_INCLUDED TRUE
2248 /* To include CTP device discovery functionality or not. */
2249 #ifndef CTP_DISCOVERY_INCLUDED
2250 #define CTP_DISCOVERY_INCLUDED TRUE
2253 /* set to TRUE for controllers that do not support multi-point */
2254 #ifndef CTP_TL_WAIT_DISC
2255 #define CTP_TL_WAIT_DISC TRUE
2258 /* The CTP inquiry database size. */
2259 #ifndef CTP_INQ_DB_SIZE
2260 #define CTP_INQ_DB_SIZE CTP_DISC_REC_SIZE
2263 /* The CTP discovery record size. */
2264 #ifndef CTP_DISC_REC_SIZE
2265 #define CTP_DISC_REC_SIZE 60
2268 /* CTP TL would try to re-establish L2CAP channel after channel is disconnected for this amount of seconds. */
2269 #ifndef CTP_GUARD_LINK_LOST
2270 #define CTP_GUARD_LINK_LOST 1
2273 /* The link policy bitmap. */
2274 #ifndef CTP_DEFAULT_LINK_POLICY
2275 #define CTP_DEFAULT_LINK_POLICY 0x000F
2278 /* The minimum period interval used for the sniff and park modes. */
2279 #ifndef CTP_DEF_LOWPWR_MIN_PERIOD
2280 #define CTP_DEF_LOWPWR_MIN_PERIOD 0x100
2283 /* The maximum period interval used for the sniff and park modes. */
2284 #ifndef CTP_DEF_LOWPWR_MAX_PERIOD
2285 #define CTP_DEF_LOWPWR_MAX_PERIOD 0x1E0
2288 /* The number of baseband receive slot sniff attempts. */
2289 #ifndef CTP_DEF_LOWPWR_ATTEMPT
2290 #define CTP_DEF_LOWPWR_ATTEMPT 0x200
2293 /* The number of baseband receive slots for sniff timeout. */
2294 #ifndef CTP_DEF_LOWPWR_TIMEOUT
2295 #define CTP_DEF_LOWPWR_TIMEOUT 0x200
2298 /* This is set if CTP is to use park mode. */
2299 #ifndef CTP_PARK_INCLUDED
2300 #define CTP_PARK_INCLUDED TRUE
2303 /* This is set if CTP is to use sniff mode. */
2304 #ifndef CTP_SNIFF_INCLUDED
2305 #define CTP_SNIFF_INCLUDED TRUE
2308 /* To include CTP data exchange functionality or not. */
2309 #ifndef CTP_DATA_EXCHG_FEATURE
2310 #define CTP_DATA_EXCHG_FEATURE FALSE
2313 /* To include CTP GW intercom functionality or not. */
2314 #ifndef CTP_GW_INTERCOM_FEATURE
2315 #define CTP_GW_INTERCOM_FEATURE FALSE
2318 /* The MTU size for L2CAP channel. */
2319 #ifndef CTP_MTU_SIZE
2320 #define CTP_MTU_SIZE 200
2323 /* The L2CAP PSM for the data exchange feature. */
2324 #ifndef CTP_DATA_EXCHG_PSM
2325 #define CTP_DATA_EXCHG_PSM 13
2328 /* The flush timeout for L2CAP channels. */
2329 #ifndef CTP_FLUSH_TO
2330 #define CTP_FLUSH_TO 0xFFFF
2333 /* The default service name for CTP. */
2334 #ifndef CTP_DEFAULT_SERVICE_NAME
2335 #define CTP_DEFAULT_SERVICE_NAME "Cordless Telephony"
2338 /* The CTP security level. */
2339 #ifndef CTP_SECURITY_LEVEL
2340 #define CTP_SECURITY_LEVEL (BTM_SEC_IN_AUTHORIZE | BTM_SEC_IN_AUTHENTICATE | BTM_SEC_IN_ENCRYPT)
2343 /* The number of lines to the external network. */
2344 #ifndef CTP_MAX_LINES
2345 #define CTP_MAX_LINES 1
2348 /* Test if the number of resources in TCS is consistent with CTP setting. */
2349 #ifndef CTP_TEST_FULL_TCS
2350 #define CTP_TEST_FULL_TCS TRUE
2353 /* The default inquiry mode. */
2354 #ifndef CTP_DEFAULT_INQUIRY_MODE
2355 #define CTP_DEFAULT_INQUIRY_MODE BTM_GENERAL_INQUIRY
2358 /* The default inquiry duration. */
2359 #ifndef CTP_DEFAULT_INQ_DURATION
2360 #define CTP_DEFAULT_INQ_DURATION 4
2363 /* The maximum number of inquiry responses. */
2364 #ifndef CTP_DEFAULT_INQ_MAX_RESP
2365 #define CTP_DEFAULT_INQ_MAX_RESP 3
2368 /* When TL does not create another L2CAP channel within this period of time GW declares that it's "Connected Limited". */
2369 #ifndef CTP_TL_CONN_TIMEOUT
2370 #define CTP_TL_CONN_TIMEOUT 5
2373 /* The delay for ACL to completely disconnect (for intercom) before sending the connect request to GW. */
2374 #ifndef CTP_RECONNECT_DELAY
2375 #define CTP_RECONNECT_DELAY 5
2378 /* How many times to retry connection when it has failed. */
2379 #ifndef CTP_RETRY_ON_CONN_ERR
2380 #define CTP_RETRY_ON_CONN_ERR 5
2383 /******************************************************************************
2387 ******************************************************************************/
2389 #ifndef ICP_INCLUDED
2390 #define ICP_INCLUDED FALSE
2393 /* The ICP default MTU. */
2394 #ifndef ICP_MTU_SIZE
2395 #define ICP_MTU_SIZE 100
2398 /* The ICP security level. */
2399 #ifndef ICP_SECURITY_LEVEL
2400 #define ICP_SECURITY_LEVEL BTM_SEC_NONE
2403 /* The default service name for ICP. */
2404 #ifndef ICP_DEFAULT_SERVICE_NAME
2405 #define ICP_DEFAULT_SERVICE_NAME "Intercom"
2408 /* The flush timeout for L2CAP channels. */
2409 #ifndef ICP_FLUSH_TO
2410 #define ICP_FLUSH_TO 0xFFFF
2413 /******************************************************************************
2417 ******************************************************************************/
2419 #ifndef SPP_INCLUDED
2420 #define SPP_INCLUDED FALSE
2423 /* The SPP default MTU. */
2424 #ifndef SPP_DEFAULT_MTU
2425 #define SPP_DEFAULT_MTU 127
2428 /* The interval, in seconds, that a client tries to reconnect to a service. */
2429 #ifndef SPP_RETRY_CONN_INTERVAL
2430 #define SPP_RETRY_CONN_INTERVAL 1
2433 /* The SPP discoverable mode: limited or general. */
2434 #ifndef SPP_DISCOVERABLE_MODE
2435 #define SPP_DISCOVERABLE_MODE BTM_GENERAL_DISCOVERABLE
2438 /* The maximum number of inquiry results returned in by inquiry procedure. */
2439 #ifndef SPP_DEF_INQ_MAX_RESP
2440 #define SPP_DEF_INQ_MAX_RESP 10
2443 /* The SPP discovery record size. */
2444 #ifndef SPP_DISC_REC_SIZE
2445 #define SPP_DISC_REC_SIZE 60
2448 #ifndef SPP_MAX_RECS_PER_DEVICE
2449 #define SPP_MAX_RECS_PER_DEVICE (SPP_DB_SIZE / SPP_DISC_REC_SIZE)
2452 /* Inquiry duration in 1.28 second units. */
2453 #ifndef SPP_DEF_INQ_DURATION
2454 #define SPP_DEF_INQ_DURATION 9
2457 /* keep the raw data received from SDP server in database. */
2458 #ifndef SDP_RAW_DATA_INCLUDED
2459 #define SDP_RAW_DATA_INCLUDED TRUE
2462 /* TRUE, to allow JV to create L2CAP connection on SDP PSM. */
2463 #ifndef SDP_FOR_JV_INCLUDED
2464 #define SDP_FOR_JV_INCLUDED FALSE
2467 /* Inquiry duration in 1.28 second units. */
2469 #define SDP_DEBUG TRUE
2472 /******************************************************************************
2476 ******************************************************************************/
2478 #ifndef HSP2_INCLUDED
2479 #define HSP2_INCLUDED FALSE
2482 /* Include the ability to perform inquiry for peer devices. */
2483 #ifndef HSP2_INQUIRY_INCLUDED
2484 #define HSP2_INQUIRY_INCLUDED TRUE
2487 /* Include Audio Gateway specific code. */
2488 #ifndef HSP2_AG_INCLUDED
2489 #define HSP2_AG_INCLUDED TRUE
2492 /* Include Headset Specific Code. */
2493 #ifndef HSP2_HS_INCLUDED
2494 #define HSP2_HS_INCLUDED TRUE
2497 /* Include the ability to open an SCO connection for In-Band Ringing. */
2498 #ifndef HSP2_IB_RING_INCLUDED
2499 #define HSP2_IB_RING_INCLUDED TRUE
2502 /* Include the ability to repeat a ring. */
2503 #ifndef HSP2_AG_REPEAT_RING
2504 #define HSP2_AG_REPEAT_RING TRUE
2507 #ifndef HSP2_APP_CLOSES_ON_CKPD
2508 #define HSP2_APP_CLOSES_ON_CKPD FALSE
2512 /* Include the ability to park a connection. */
2513 #ifndef HSP2_PARK_INCLUDED
2514 #define HSP2_PARK_INCLUDED TRUE
2517 /* Include HSP State Machine debug trace messages. */
2518 #ifndef HSP2_FSM_DEBUG
2519 #define HSP2_FSM_DEBUG TRUE
2522 /* The Module's Inquiry Scan Window. */
2523 #ifndef HSP2_INQ_SCAN_WINDOW
2524 #define HSP2_INQ_SCAN_WINDOW 0
2527 /* The Module's Inquiry Scan Interval. */
2528 #ifndef HSP2_INQ_SCAN_INTERVAL
2529 #define HSP2_INQ_SCAN_INTERVAL 0
2532 /* The Module's Page Scan Interval. */
2533 #ifndef HSP2_PAGE_SCAN_INTERVAL
2534 #define HSP2_PAGE_SCAN_INTERVAL 0
2537 /* The Module's Page Scan Window. */
2538 #ifndef HSP2_PAGE_SCAN_WINDOW
2539 #define HSP2_PAGE_SCAN_WINDOW 0
2542 /* The Park Mode's Minimum Beacon Period. */
2543 #ifndef HSP2_BEACON_MIN_PERIOD
2544 #define HSP2_BEACON_MIN_PERIOD 450
2547 /* The Park Mode's Maximum Beacon Period. */
2548 #ifndef HSP2_BEACON_MAX_PERIOD
2549 #define HSP2_BEACON_MAX_PERIOD 500
2552 /* The duration of the inquiry in seconds. */
2553 #ifndef HSP2_INQ_DURATION
2554 #define HSP2_INQ_DURATION 4
2557 /* Maximum number of peer responses during an inquiry. */
2558 #ifndef HSP2_INQ_MAX_NUM_RESPS
2559 #define HSP2_INQ_MAX_NUM_RESPS 3
2562 /* Maximum number of times to retry an inquiry prior to failure. */
2563 #ifndef HSP2_MAX_INQ_RETRY
2564 #define HSP2_MAX_INQ_RETRY 6
2567 /* Maximum number of times to retry an RFCOMM connection prior to failure. */
2568 #ifndef HSP2_MAX_CONN_RETRY
2569 #define HSP2_MAX_CONN_RETRY 3
2572 /* If the connect request failed for authentication reasons, do not retry */
2573 #ifndef HSP2_NO_RETRY_ON_AUTH_FAIL
2574 #define HSP2_NO_RETRY_ON_AUTH_FAIL TRUE
2577 /* Maximum number of characters in an HSP2 device name. */
2578 #ifndef HSP2_MAX_NAME_LEN
2579 #define HSP2_MAX_NAME_LEN 32
2582 /* The minimum speaker and/or microphone gain setting. */
2583 #ifndef HSP2_MIN_GAIN
2584 #define HSP2_MIN_GAIN 0
2587 /* The maximum speaker and/or microphone setting. */
2588 #ifndef HSP2_MAX_GAIN
2589 #define HSP2_MAX_GAIN 15
2592 /* The default value to send on an AT+CKPD. */
2593 #ifndef HSP2_KEYPRESS_DEFAULT
2594 #define HSP2_KEYPRESS_DEFAULT 200
2597 /* Maximum amount a data that can be received per RFCOMM frame. */
2598 #ifndef HSP2_MAX_RFC_READ_LEN
2599 #define HSP2_MAX_RFC_READ_LEN 128
2602 /* The time in seconds to wait for completion of a partial AT command or response from the peer. */
2603 #ifndef HSP2_AT_TO_INTERVAL
2604 #define HSP2_AT_TO_INTERVAL 30
2607 /* The time to wait before repeating a ring to a peer Headset. */
2608 #ifndef HSP2_REPEAT_RING_TO
2609 #define HSP2_REPEAT_RING_TO 4
2612 /* Time to wait for a response for an AT command */
2613 #ifndef HSP2_AT_RSP_TO
2614 #define HSP2_AT_RSP_TO 20
2617 /* SCO packet type(s) to use (bitmask: see spec), 0 - device default (recommended) */
2618 #ifndef HSP2_SCO_PKT_TYPES
2619 #define HSP2_SCO_PKT_TYPES ((UINT16)0x0000)
2622 /* The default settings of the SCO voice link. */
2623 #ifndef HSP2_DEFAULT_VOICE_SETTINGS
2624 #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)
2627 #ifndef HSP2_MAX_AT_CMD_LENGTH
2628 #define HSP2_MAX_AT_CMD_LENGTH 16
2631 #ifndef HSP2_MAX_AT_VAL_LENGTH
2632 #if (defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE)
2633 #define HSP2_MAX_AT_VAL_LENGTH 310
2635 #define HSP2_MAX_AT_VAL_LENGTH 5
2640 #ifndef HSP2_SDP_DB_SIZE
2641 #define HSP2_SDP_DB_SIZE 300
2645 /******************************************************************************
2649 ******************************************************************************/
2651 #ifndef HFP_INCLUDED
2652 #define HFP_INCLUDED FALSE
2655 /* Include Audio Gateway specific code. */
2656 #ifndef HFP_AG_INCLUDED
2657 #define HFP_AG_INCLUDED TRUE
2660 /* Include Hand Free Specific Code. */
2661 #ifndef HFP_HF_INCLUDED
2662 #define HFP_HF_INCLUDED TRUE
2665 /* Use AT interface instead of full blown API */
2666 #ifndef AT_INTERFACE
2667 #define AT_INTERFACE FALSE
2670 /* HFP Manages SCO establishement for various procedures */
2671 #ifndef HFP_SCO_MGMT_INCLUDED
2672 #define HFP_SCO_MGMT_INCLUDED TRUE
2675 /* CCAP compliant features and behavior desired */
2676 #ifndef CCAP_COMPLIANCE
2677 #define CCAP_COMPLIANCE TRUE
2680 /* Caller ID string, part of +CLIP result code */
2681 #ifndef HFP_MAX_CLIP_INFO
2682 #define HFP_MAX_CLIP_INFO 45
2685 #ifndef HFP_RPT_PEER_INFO_INCLUDED
2686 #define HFP_RPT_PEER_INFO_INCLUDED TRUE /* Reporting of peer features enabled */
2689 /******************************************************************************
2693 ******************************************************************************/
2695 /* HID Device Role Included */
2696 #ifndef HID_DEV_INCLUDED
2697 #define HID_DEV_INCLUDED FALSE
2700 #ifndef HID_DEV_PM_INCLUDED
2701 #define HID_DEV_PM_INCLUDED TRUE
2704 /* The HID Device is a virtual cable */
2705 #ifndef HID_DEV_VIRTUAL_CABLE
2706 #define HID_DEV_VIRTUAL_CABLE TRUE
2709 /* The HID device initiates the reconnections */
2710 #ifndef HID_DEV_RECONN_INITIATE
2711 #define HID_DEV_RECONN_INITIATE TRUE
2714 /* THe HID device is normally connectable */
2715 #ifndef HID_DEV_NORMALLY_CONN
2716 #define HID_DEV_NORMALLY_CONN FALSE
2719 /* The device is battery powered */
2720 #ifndef HID_DEV_BATTERY_POW
2721 #define HID_DEV_BATTERY_POW TRUE
2724 /* Device is capable of waking up the host */
2725 #ifndef HID_DEV_REMOTE_WAKE
2726 #define HID_DEV_REMOTE_WAKE TRUE
2729 /* Device needs host to close SDP channel after SDP is over */
2730 #ifndef HID_DEV_SDP_DISABLE
2731 #define HID_DEV_SDP_DISABLE TRUE
2734 #ifndef HID_DEV_MTU_SIZE
2735 #define HID_DEV_MTU_SIZE 64
2738 #ifndef HID_DEV_FLUSH_TO
2739 #define HID_DEV_FLUSH_TO 0xffff
2742 #ifndef HID_DEV_PAGE_SCAN_WIN
2743 #define HID_DEV_PAGE_SCAN_WIN (0)
2746 #ifndef HID_DEV_PAGE_SCAN_INT
2747 #define HID_DEV_PAGE_SCAN_INT (0)
2750 #ifndef HID_DEV_MAX_CONN_RETRY
2751 #define HID_DEV_MAX_CONN_RETRY (15)
2754 #ifndef HID_DEV_REPAGE_WIN
2755 #define HID_DEV_REPAGE_WIN (1)
2758 #ifndef HID_DEV_SVC_NAME
2759 #define HID_DEV_SVC_NAME "HID"
2762 #ifndef HID_DEV_SVC_DESCR
2763 #define HID_DEV_SVC_DESCR "3-button mouse and keyboard"
2766 #ifndef HID_DEV_PROVIDER_NAME
2767 #define HID_DEV_PROVIDER_NAME "Widcomm"
2770 #ifndef HID_DEV_REL_NUM
2771 #define HID_DEV_REL_NUM 0x0100
2774 #ifndef HID_DEV_PARSER_VER
2775 #define HID_DEV_PARSER_VER 0x0111
2778 #ifndef HID_DEV_SUBCLASS
2779 #define HID_DEV_SUBCLASS COD_MINOR_POINTING
2782 #ifndef HID_DEV_COUNTRY_CODE
2783 #define HID_DEV_COUNTRY_CODE 0x33
2786 #ifndef HID_DEV_SUP_TOUT
2787 #define HID_DEV_SUP_TOUT 0x8000
2790 #ifndef HID_DEV_NUM_LANGS
2791 #define HID_DEV_NUM_LANGS 1
2794 #ifndef HID_DEV_INACT_TIMEOUT
2795 #define HID_DEV_INACT_TIMEOUT 60
2798 #ifndef HID_DEV_BUSY_MODE_PARAMS
2799 #define HID_DEV_BUSY_MODE_PARAMS { 320, 160, 10, 20, HCI_MODE_ACTIVE }
2802 #ifndef HID_DEV_IDLE_MODE_PARAMS
2803 #define HID_DEV_IDLE_MODE_PARAMS { 320, 160, 10, 20, HCI_MODE_SNIFF }
2806 #ifndef HID_DEV_SUSP_MODE_PARAMS
2807 #define HID_DEV_SUSP_MODE_PARAMS { 640, 320, 0, 0, HCI_MODE_PARK }
2810 #ifndef HID_DEV_MAX_DESCRIPTOR_SIZE
2811 #define HID_DEV_MAX_DESCRIPTOR_SIZE 128 /* Max descriptor size */
2814 #ifndef HID_DEV_LANGUAGELIST
2815 #define HID_DEV_LANGUAGELIST {0x35, 0x06, 0x09, 0x04, 0x09, 0x09, 0x01, 0x00}
2818 #ifndef HID_DEV_LINK_SUPERVISION_TO
2819 #define HID_DEV_LINK_SUPERVISION_TO 0x8000
2822 #ifndef HID_CONTROL_POOL_ID
2823 #define HID_CONTROL_POOL_ID 2
2826 #ifndef HID_INTERRUPT_POOL_ID
2827 #define HID_INTERRUPT_POOL_ID 2
2830 /*************************************************************************
2831 ** Definitions for Both HID-Host & Device
2833 #ifndef HID_MAX_SVC_NAME_LEN
2834 #define HID_MAX_SVC_NAME_LEN 32
2837 #ifndef HID_MAX_SVC_DESCR_LEN
2838 #define HID_MAX_SVC_DESCR_LEN 32
2841 #ifndef HID_MAX_PROV_NAME_LEN
2842 #define HID_MAX_PROV_NAME_LEN 32
2845 /*************************************************************************
2846 ** Definitions for HID-Host
2848 #ifndef HID_HOST_INCLUDED
2849 #define HID_HOST_INCLUDED TRUE
2852 #ifndef HID_HOST_MAX_DEVICES
2853 #define HID_HOST_MAX_DEVICES 7
2856 #ifndef HID_HOST_MTU
2857 #define HID_HOST_MTU 640
2860 #ifndef HID_HOST_FLUSH_TO
2861 #define HID_HOST_FLUSH_TO 0xffff
2864 #ifndef HID_HOST_MAX_CONN_RETRY
2865 #define HID_HOST_MAX_CONN_RETRY (3)
2868 #ifndef HID_HOST_REPAGE_WIN
2869 #define HID_HOST_REPAGE_WIN (2)
2873 /******************************************************************************
2877 ******************************************************************************/
2879 #ifndef DUN_INCLUDED
2880 #define DUN_INCLUDED FALSE
2884 /******************************************************************************
2888 ******************************************************************************/
2890 #ifndef GOEP_INCLUDED
2891 #define GOEP_INCLUDED FALSE
2894 /* This is set to enable GOEP non-blocking file system access functions. */
2895 #ifndef GOEP_FS_INCLUDED
2896 #define GOEP_FS_INCLUDED FALSE
2899 /* GOEP authentication key size. */
2900 #ifndef GOEP_MAX_AUTH_KEY_SIZE
2901 #define GOEP_MAX_AUTH_KEY_SIZE 16
2904 /* Maximum size of the realm authentication string. */
2905 #ifndef GOEP_MAX_AUTH_REALM_SIZE
2906 #define GOEP_MAX_AUTH_REALM_SIZE 16
2909 /* Realm Character Set */
2910 #ifndef GOEP_REALM_CHARSET
2911 #define GOEP_REALM_CHARSET 0 /* ASCII */
2914 /* This is set to the maximum length of path name allowed in the system (_MAX_PATH). */
2915 #ifndef GOEP_MAX_PATH_SIZE
2916 #define GOEP_MAX_PATH_SIZE 255
2919 /* Specifies whether or not client's user id is required during obex authentication */
2920 #ifndef GOEP_SERVER_USERID_REQUIRED
2921 #define GOEP_SERVER_USERID_REQUIRED FALSE
2924 /* This is set to the maximum length of file name allowed in the system (_MAX_FNAME). */
2925 #ifndef GOEP_MAX_FILE_SIZE
2926 #define GOEP_MAX_FILE_SIZE 128
2929 /* Character used as path separator */
2930 #ifndef GOEP_PATH_SEPARATOR
2931 #define GOEP_PATH_SEPARATOR ((char) 0x5c) /* 0x2f ('/'), or 0x5c ('\') */
2934 /******************************************************************************
2938 ******************************************************************************/
2940 #ifndef OPP_INCLUDED
2941 #define OPP_INCLUDED FALSE
2944 /* This is set to enable OPP client capabilities. */
2945 #ifndef OPP_CLIENT_INCLUDED
2946 #define OPP_CLIENT_INCLUDED FALSE
2949 /* This is set to enable OPP server capabilities. */
2950 #ifndef OPP_SERVER_INCLUDED
2951 #define OPP_SERVER_INCLUDED FALSE
2954 /* if the optional formating functions are to be included or not */
2955 #ifndef OPP_FORMAT_INCLUDED
2956 #define OPP_FORMAT_INCLUDED FALSE
2959 /* Maximum number of client sessions allowed by server */
2960 #ifndef OPP_MAX_SRVR_SESS
2961 #define OPP_MAX_SRVR_SESS 3
2964 /******************************************************************************
2968 ******************************************************************************/
2970 #ifndef FTP_INCLUDED
2971 #define FTP_INCLUDED FALSE
2974 /* This is set to enable FTP client capabilities. */
2975 #ifndef FTP_CLIENT_INCLUDED
2976 #define FTP_CLIENT_INCLUDED TRUE
2979 /* This is set to enable FTP server capabilities. */
2980 #ifndef FTP_SERVER_INCLUDED
2981 #define FTP_SERVER_INCLUDED TRUE
2984 /******************************************************************************
2988 ******************************************************************************/
2990 #ifndef XML_STACK_SIZE
2991 #define XML_STACK_SIZE 7
2994 /******************************************************************************
2998 ******************************************************************************/
3000 #define BPP_DEBUG FALSE
3003 #ifndef BPP_INCLUDED
3004 #define BPP_INCLUDED FALSE
3007 #ifndef BPP_SND_INCLUDED
3008 #define BPP_SND_INCLUDED FALSE
3011 /* Maximum number of senders allowed to connect simultaneously
3012 ** The maximum is 6 or (OBX_NUM_SERVERS / 2), whichever is smaller
3014 #ifndef BPP_PR_MAX_CON
3015 #define BPP_PR_MAX_CON 3
3018 /* Service Name. maximum length: 248
3019 #ifndef BPP_SERVICE_NAME
3020 #define BPP_SERVICE_NAME "Basic Printing"
3023 /* Document Format Supported. ASCII comma-delimited list of MIME type:version string
3024 #ifndef BPP_DOC_FORMAT_SUPPORTED
3025 #define BPP_DOC_FORMAT_SUPPORTED "application/vnd.pwg-xhtml-print:1.0,application/vnd.hp-PCL:5E,application/PDF"
3028 #ifndef BPP_DOC_FORMAT_SUPPORTED_LEN
3029 #define BPP_DOC_FORMAT_SUPPORTED_LEN 77
3032 /* Character repertoires.
3033 #ifndef BPP_CHARACTER_REPERTOIRES
3034 #define BPP_CHARACTER_REPERTOIRES {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}
3038 #ifndef BPP_XHTML_PRINT_FORMATS
3039 #define BPP_XHTML_PRINT_FORMATS "image/gif:89A,image/jpeg"
3042 #ifndef BPP_XHTML_PRINT_FORMATS_LEN
3043 #define BPP_XHTML_PRINT_FORMATS_LEN 24
3047 #ifndef BPP_COLOR_SUPORTED
3048 #define BPP_COLOR_SUPORTED FALSE
3051 /* 1284 ID string. First 2 bytes are the length.
3053 #define BPP_1284ID "\x00\x48MANUFACTURER:ACME Manufacturing;COMMAND SET:PCL,MPL;MODEL:LaserBeam \?;"
3056 #ifndef BPP_1284ID_LEN
3057 #define BPP_1284ID_LEN 72
3061 #ifndef BPP_PRINTER_NAME
3062 #define BPP_PRINTER_NAME "My Printer"
3065 #ifndef BPP_PRINTER_NAME_LEN
3066 #define BPP_PRINTER_NAME_LEN 10
3070 /* Printer location.
3071 #ifndef BPP_PRINTER_LOCATION
3072 #define BPP_PRINTER_LOCATION "Hotel Lobby"
3075 #ifndef BPP_PRINTER_LOCATION_LEN
3076 #define BPP_PRINTER_LOCATION_LEN 11
3079 /* Duplex printing supported.
3080 #ifndef BPP_DUPLEX_SUPPORTED
3081 #define BPP_DUPLEX_SUPPORTED TRUE
3085 /* Media types supported.
3086 #ifndef BPP_MEDIA_TYPES_SUPPORTED
3087 #define BPP_MEDIA_TYPES_SUPPORTED "stationary,continuous-long,photographic-high-gloss,cardstock"
3090 #ifndef BPP_MEDIA_TYPES_SUPPORTED_LEN
3091 #define BPP_MEDIA_TYPES_SUPPORTED_LEN 60
3094 /* Maximum media with supported.
3095 #ifndef BPP_MAX_MEDIA_WIDTH
3096 #define BPP_MAX_MEDIA_WIDTH 205
3099 /* Maximum media length supported.
3100 #ifndef BPP_MAX_MEDIA_LENGTH
3101 #define BPP_MAX_MEDIA_LENGTH 285
3104 /* the maximum string len for the media size of medium loaded */
3105 #ifndef BPP_MEDIA_SIZE_LEN
3106 #define BPP_MEDIA_SIZE_LEN 33
3109 /* Debug Trace the SOAP object, if TRUE */
3110 #ifndef BPP_TRACE_XML
3111 #define BPP_TRACE_XML TRUE
3114 /* in case that the SOAP object does not all come in one OBEX packet,
3115 * this size of data may be kept in the BPP control block for continuing parsing.
3116 * The maximum is the size of the biggest GKI buffer (GKI_MAX_BUF_SIZE) */
3117 #ifndef BPP_SOAP_KEEP_SIZE
3118 #define BPP_SOAP_KEEP_SIZE 200
3122 /******************************************************************************
3126 ******************************************************************************/
3127 #ifndef BIP_INCLUDED
3128 #define BIP_INCLUDED FALSE
3131 /* TRUE to include imaging initiator */
3132 #ifndef BIP_INITR_INCLUDED
3133 #define BIP_INITR_INCLUDED FALSE
3136 /* TRUE to include imaging responder */
3137 #ifndef BIP_RSPDR_INCLUDED
3138 #define BIP_RSPDR_INCLUDED FALSE
3141 /* TRUE to include image push feature */
3142 #ifndef BIP_PUSH_INCLUDED
3143 #define BIP_PUSH_INCLUDED TRUE
3146 /* TRUE to include image pull feature */
3147 #ifndef BIP_PULL_INCLUDED
3148 #define BIP_PULL_INCLUDED TRUE
3151 /* TRUE to include advanced image printing feature */
3152 #ifndef BIP_PRINTING_INCLUDED
3153 #define BIP_PRINTING_INCLUDED TRUE
3156 /* TRUE to include automatic archive feature */
3157 #ifndef BIP_ARCHIVE_INCLUDED
3158 #define BIP_ARCHIVE_INCLUDED TRUE
3161 /* TRUE to include remote camera feature */
3162 #ifndef BIP_CAMERA_INCLUDED
3163 #define BIP_CAMERA_INCLUDED TRUE
3166 /* TRUE to include remote display feature */
3167 #ifndef BIP_DISPLAY_INCLUDED
3168 #define BIP_DISPLAY_INCLUDED TRUE
3171 /* TRUE to include sanity check code for API functions */
3172 #ifndef BIP_SANITY_CHECKS
3173 #define BIP_SANITY_CHECKS TRUE
3176 /* TRUE to show the received XML object in trace for conformance tests */
3177 #ifndef BIP_TRACE_XML
3178 #define BIP_TRACE_XML TRUE
3181 /* in case that the received XML object is not complete, the XML parser state machine needs
3182 * to keep a copy of the data from the last '<'
3183 * This macro specifies the maximun amount of data for this purpose */
3184 #ifndef BIP_XML_CARRY_OVER_LEN
3185 #define BIP_XML_CARRY_OVER_LEN 100
3188 /* minimum 4, maximum is 255. The value should be set to the maximum size of encoding string + 1. JPEG2000.
3189 * If vendor specific format is supported, it might be bigger than 9 */
3190 #ifndef BIP_IMG_ENCODE_SIZE
3191 #define BIP_IMG_ENCODE_SIZE 9
3194 /* MIME type: text/plain */
3195 #ifndef BIP_TYPE_SIZE
3196 #define BIP_TYPE_SIZE 20
3199 /* example: iso-8895-1 */
3200 #ifndef BIP_CHARSET_SIZE
3201 #define BIP_CHARSET_SIZE 10
3205 #ifndef BIP_FNAME_SIZE
3206 #define BIP_FNAME_SIZE 20
3210 #ifndef BIP_SNAME_SIZE
3211 #define BIP_SNAME_SIZE 60
3214 /* temporary storage file name(for file system access, may include path) */
3215 #ifndef BIP_TEMP_NAME_SIZE
3216 #define BIP_TEMP_NAME_SIZE 200
3219 /* image file name */
3220 #ifndef BIP_IMG_NAME_SIZE
3221 #define BIP_IMG_NAME_SIZE 200
3224 /* attachment file name */
3225 #ifndef BIP_ATT_NAME_SIZE
3226 #define BIP_ATT_NAME_SIZE 200
3229 /* object (image, attachment, thumbnail) file name (may be used for file system) */
3230 #ifndef BIP_OBJ_NAME_SIZE
3231 #define BIP_OBJ_NAME_SIZE 200
3236 /******************************************************************************
3240 ******************************************************************************/
3242 #ifndef HCRP_INCLUDED
3243 #define HCRP_INCLUDED FALSE
3246 /* This is set to enable server. */
3247 #ifndef HCRP_SERVER_INCLUDED
3248 #define HCRP_SERVER_INCLUDED FALSE
3251 /* This is set to enable client. */
3252 #ifndef HCRP_CLIENT_INCLUDED
3253 #define HCRP_CLIENT_INCLUDED FALSE
3256 /* TRUE enables the notification option of the profile. */
3257 #ifndef HCRP_NOTIFICATION_INCLUDED
3258 #define HCRP_NOTIFICATION_INCLUDED TRUE
3261 /* TRUE enables the vendor specific option of the profile. */
3262 #ifndef HCRP_VENDOR_SPEC_INCLUDED
3263 #define HCRP_VENDOR_SPEC_INCLUDED TRUE
3266 /* TRUE enables state machine traces. */
3267 #ifndef HCRP_FSM_DEBUG
3268 #define HCRP_FSM_DEBUG FALSE
3271 /* TRUE enables protocol message traces. */
3272 #ifndef HCRP_PROTO_DEBUG
3273 #define HCRP_PROTO_DEBUG FALSE
3276 /* Maximum length used to store the service name (Minimum 1). */
3277 #ifndef HCRP_MAX_SERVICE_NAME_LEN
3278 #define HCRP_MAX_SERVICE_NAME_LEN 32
3281 /* Maximum length used to store the device name (Minimum 1). */
3282 #ifndef HCRP_MAX_DEVICE_NAME_LEN
3283 #define HCRP_MAX_DEVICE_NAME_LEN 32
3286 /* Maximum length of device location (Minimum 1) */
3287 #ifndef HCRP_MAX_DEVICE_LOC_LEN
3288 #define HCRP_MAX_DEVICE_LOC_LEN 32
3291 /* Maximum length used to store the friendly name (Minimum 1). */
3292 #ifndef HCRP_MAX_FRIENDLY_NAME_LEN
3293 #define HCRP_MAX_FRIENDLY_NAME_LEN 32
3296 /* Maximum length used to store the 1284 id string (Minimum 2 byte length field). */
3297 #ifndef HCRP_MAX_SDP_1284_ID_LEN
3298 #define HCRP_MAX_SDP_1284_ID_LEN 128
3301 /* Maximum length for parameters to be processed for vendor specific commands. */
3302 #ifndef HCRP_MAX_VEND_SPEC_LEN
3303 #define HCRP_MAX_VEND_SPEC_LEN 4
3306 /* Number of seconds to wait for 2nd GAP to open. */
3307 #ifndef HCRP_OPEN_CHAN_TOUT
3308 #define HCRP_OPEN_CHAN_TOUT 5
3311 /* Number of seconds to wait for 2nd GAP to close. */
3312 #ifndef HCRP_CLOSE_CHAN_TOUT
3313 #define HCRP_CLOSE_CHAN_TOUT 3
3316 /* Number of seconds to wait for the application to respond to a protocol request. */
3317 #ifndef HCRP_APPL_RSP_TOUT
3318 #define HCRP_APPL_RSP_TOUT 5
3321 /* Number of seconds to wait for the peer device to respond to a protocol request. */
3322 #ifndef HCRP_CMD_RSP_TOUT
3323 #define HCRP_CMD_RSP_TOUT 7
3326 /* Number of seconds between subsequent credit requests to the server when the send watermark has been exceeded. */
3327 #ifndef HCRP_CREDIT_REQ_UPDATES
3328 #define HCRP_CREDIT_REQ_UPDATES 1
3331 /* Maximum number of results to return in a HCRP_FindServices search. */
3332 #ifndef HCRP_MAX_SEARCH_RESULTS
3333 #define HCRP_MAX_SEARCH_RESULTS 1
3336 /* Maximum number of bytes to be reserved for searching for the client's notification record. */
3337 #ifndef HCRP_MAX_NOTIF_DISC_BUF
3338 #define HCRP_MAX_NOTIF_DISC_BUF 300
3341 /* Maximum number of clients the server will allow to be registered for notifications. */
3342 #ifndef HCRP_MAX_NOTIF_CLIENTS
3343 #define HCRP_MAX_NOTIF_CLIENTS 3
3346 /* Spec says minimum of two notification retries. */
3347 #ifndef HCRP_NOTIF_NUM_RETRIES
3348 #define HCRP_NOTIF_NUM_RETRIES 4
3351 /*************************************************************************
3352 ** Definitions for Multi-Client Server HCRP
3353 ** Note: Many of the above HCRP definitions are also used
3354 ** Maximum number of clients allowed to connect simultaneously
3355 ** Must be less than ((GAP_MAX_CONNECTIONS - 1) / 2)
3357 #ifndef HCRPM_MAX_CLIENTS
3358 #define HCRPM_MAX_CLIENTS 3
3362 /******************************************************************************
3366 ******************************************************************************/
3368 #ifndef PAN_INCLUDED
3369 #define PAN_INCLUDED FALSE
3373 /******************************************************************************
3377 ******************************************************************************/
3379 #ifndef SAP_SERVER_INCLUDED
3380 #define SAP_SERVER_INCLUDED FALSE
3384 /*************************************************************************
3387 #ifndef A2D_INCLUDED
3388 #define A2D_INCLUDED TRUE
3391 /* TRUE to include SBC utility functions */
3392 #ifndef A2D_SBC_INCLUDED
3393 #define A2D_SBC_INCLUDED A2D_INCLUDED
3396 /* TRUE to include MPEG-1,2 (mp3) utility functions */
3397 #ifndef A2D_M12_INCLUDED
3398 #define A2D_M12_INCLUDED A2D_INCLUDED
3401 /* TRUE to include MPEG-2,4 (aac) utility functions */
3402 #ifndef A2D_M24_INCLUDED
3403 #define A2D_M24_INCLUDED A2D_INCLUDED
3406 /******************************************************************************
3410 ******************************************************************************/
3412 #ifndef AVCT_INCLUDED
3413 #define AVCT_INCLUDED TRUE
3416 /* Number of simultaneous ACL links to different peer devices. */
3417 #ifndef AVCT_NUM_LINKS
3418 #define AVCT_NUM_LINKS 2
3421 /* Number of simultaneous AVCTP connections. */
3422 #ifndef AVCT_NUM_CONN
3423 #define AVCT_NUM_CONN 3
3426 /* Pool ID where to reassemble the SDU.
3427 This Pool allows buffers to be used that are larger than
3428 the L2CAP_MAX_MTU. */
3429 #ifndef AVCT_BR_USER_RX_POOL_ID
3430 #define AVCT_BR_USER_RX_POOL_ID HCI_ACL_POOL_ID
3433 /* Pool ID where to hold the SDU.
3434 This Pool allows buffers to be used that are larger than
3435 the L2CAP_MAX_MTU. */
3436 #ifndef AVCT_BR_USER_TX_POOL_ID
3437 #define AVCT_BR_USER_TX_POOL_ID HCI_ACL_POOL_ID
3441 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
3443 #ifndef AVCT_BR_FCR_RX_POOL_ID
3444 #define AVCT_BR_FCR_RX_POOL_ID HCI_ACL_POOL_ID
3448 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
3449 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
3450 Note: This pool needs to have enough buffers to hold two times the window size negotiated
3451 in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions.
3452 The size of each buffer must be able to hold the maximum MPS segment size passed in
3453 tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
3455 #ifndef AVCT_BR_FCR_TX_POOL_ID
3456 #define AVCT_BR_FCR_TX_POOL_ID HCI_ACL_POOL_ID
3459 /* AVCTP Browsing channel FCR Option:
3460 Size of the transmission window when using enhanced retransmission mode. Not used
3461 in basic and streaming modes. Range: 1 - 63
3463 #ifndef AVCT_BR_FCR_OPT_TX_WINDOW_SIZE
3464 #define AVCT_BR_FCR_OPT_TX_WINDOW_SIZE 10
3467 /* AVCTP Browsing channel FCR Option:
3468 Number of transmission attempts for a single I-Frame before taking
3469 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
3472 0 - infinite retransmissions
3473 1 - single transmission
3475 #ifndef AVCT_BR_FCR_OPT_MAX_TX_B4_DISCNT
3476 #define AVCT_BR_FCR_OPT_MAX_TX_B4_DISCNT 20
3479 /* AVCTP Browsing channel FCR Option: Retransmission Timeout
3480 The AVRCP specification set a value in the range of 300 - 2000 ms
3481 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
3482 Range: Minimum 2000 (2 secs) when supporting PBF.
3484 #ifndef AVCT_BR_FCR_OPT_RETX_TOUT
3485 #define AVCT_BR_FCR_OPT_RETX_TOUT 2000
3488 /* AVCTP Browsing channel FCR Option: Monitor Timeout
3489 The AVRCP specification set a value in the range of 300 - 2000 ms
3490 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
3491 Range: Minimum 12000 (12 secs) when supporting PBF.
3493 #ifndef AVCT_BR_FCR_OPT_MONITOR_TOUT
3494 #define AVCT_BR_FCR_OPT_MONITOR_TOUT 12000
3497 /******************************************************************************
3501 ******************************************************************************/
3503 #ifndef AVRC_INCLUDED
3504 #define AVRC_INCLUDED TRUE
3507 /******************************************************************************
3511 ******************************************************************************/
3512 #ifndef MCA_INCLUDED
3513 #define MCA_INCLUDED FALSE
3516 /* TRUE to support Clock Synchronization OpCodes */
3517 #ifndef MCA_SYNC_INCLUDED
3518 #define MCA_SYNC_INCLUDED FALSE
3521 /* The MTU size for the L2CAP configuration on control channel. 48 is the minimal */
3522 #ifndef MCA_CTRL_MTU
3523 #define MCA_CTRL_MTU 60
3526 /* The maximum number of registered MCAP instances. */
3527 #ifndef MCA_NUM_REGS
3528 #define MCA_NUM_REGS 3
3531 /* The maximum number of control channels (to difference devices) per registered MCAP instances. */
3532 #ifndef MCA_NUM_LINKS
3533 #define MCA_NUM_LINKS 3
3536 /* The maximum number of MDEP (including HDP echo) per registered MCAP instances. */
3537 #ifndef MCA_NUM_DEPS
3538 #define MCA_NUM_DEPS 3
3541 /* The maximum number of MDL link per control channel. */
3542 #ifndef MCA_NUM_MDLS
3543 #define MCA_NUM_MDLS 4
3546 /* Pool ID where to reassemble the SDU. */
3547 #ifndef MCA_USER_RX_POOL_ID
3548 #define MCA_USER_RX_POOL_ID HCI_ACL_POOL_ID
3551 /* Pool ID where to hold the SDU. */
3552 #ifndef MCA_USER_TX_POOL_ID
3553 #define MCA_USER_TX_POOL_ID HCI_ACL_POOL_ID
3557 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
3559 #ifndef MCA_FCR_RX_POOL_ID
3560 #define MCA_FCR_RX_POOL_ID HCI_ACL_POOL_ID
3564 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
3565 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
3566 Note: This pool needs to have enough buffers to hold two times the window size negotiated
3567 in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions.
3568 The size of each buffer must be able to hold the maximum MPS segment size passed in
3569 tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
3571 #ifndef MCA_FCR_TX_POOL_ID
3572 #define MCA_FCR_TX_POOL_ID HCI_ACL_POOL_ID
3575 /* MCAP control channel FCR Option:
3576 Size of the transmission window when using enhanced retransmission mode.
3577 1 is defined by HDP specification for control channel.
3579 #ifndef MCA_FCR_OPT_TX_WINDOW_SIZE
3580 #define MCA_FCR_OPT_TX_WINDOW_SIZE 1
3583 /* MCAP control channel FCR Option:
3584 Number of transmission attempts for a single I-Frame before taking
3585 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
3588 0 - infinite retransmissions
3589 1 - single transmission
3591 #ifndef MCA_FCR_OPT_MAX_TX_B4_DISCNT
3592 #define MCA_FCR_OPT_MAX_TX_B4_DISCNT 20
3595 /* MCAP control channel FCR Option: Retransmission Timeout
3596 The AVRCP specification set a value in the range of 300 - 2000 ms
3597 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
3598 Range: Minimum 2000 (2 secs) when supporting PBF.
3600 #ifndef MCA_FCR_OPT_RETX_TOUT
3601 #define MCA_FCR_OPT_RETX_TOUT 2000
3604 /* MCAP control channel FCR Option: Monitor Timeout
3605 The AVRCP specification set a value in the range of 300 - 2000 ms
3606 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
3607 Range: Minimum 12000 (12 secs) when supporting PBF.
3609 #ifndef MCA_FCR_OPT_MONITOR_TOUT
3610 #define MCA_FCR_OPT_MONITOR_TOUT 12000
3613 /* MCAP control channel FCR Option: Maximum PDU payload size.
3614 The maximum number of payload octets that the local device can receive in a single PDU.
3616 #ifndef MCA_FCR_OPT_MPS_SIZE
3617 #define MCA_FCR_OPT_MPS_SIZE 1000
3620 /* Shared transport */
3621 #ifndef NFC_SHARED_TRANSPORT_ENABLED
3622 #define NFC_SHARED_TRANSPORT_ENABLED FALSE
3625 /******************************************************************************
3629 ******************************************************************************/
3631 #ifndef SER_INCLUDED
3632 #define SER_INCLUDED FALSE
3635 /* Task which runs the serial application. */
3637 #define SER_TASK BTE_APPL_TASK
3640 /* Mailbox used by serial application. */
3642 #define SER_MBOX TASK_MBOX_1
3646 #ifndef SER_MBOX_MASK
3647 #define SER_MBOX_MASK TASK_MBOX_1_EVT_MASK
3650 /* TX path application event. */
3651 #ifndef SER_TX_PATH_APPL_EVT
3652 #define SER_TX_PATH_APPL_EVT EVENT_MASK(APPL_EVT_3)
3655 /* RX path application event. */
3656 #ifndef SER_RX_PATH_APPL_EVT
3657 #define SER_RX_PATH_APPL_EVT EVENT_MASK(APPL_EVT_4)
3660 /******************************************************************************
3662 ** Sleep Mode (Low Power Mode)
3664 ******************************************************************************/
3666 #ifndef HCILP_INCLUDED
3667 #define HCILP_INCLUDED TRUE
3670 /******************************************************************************
3674 ******************************************************************************/
3676 #ifndef RPC_INCLUDED
3677 #define RPC_INCLUDED FALSE
3680 /* RPCT task mailbox ID for messages coming from rpcgen code. */
3682 #define RPCT_MBOX TASK_MBOX_0
3685 /* RPCT task event for mailbox. */
3686 #ifndef RPCT_RPC_MBOX_EVT
3687 #define RPCT_RPC_MBOX_EVT TASK_MBOX_0_EVT_MASK
3690 /* RPCT task event from driver indicating RX data is ready. */
3691 #ifndef RPCT_RX_READY_EVT
3692 #define RPCT_RX_READY_EVT APPL_EVT_0
3695 /* RPCT task event from driver indicating data TX is done. */
3696 #ifndef RPCT_TX_DONE_EVT
3697 #define RPCT_TX_DONE_EVT APPL_EVT_1
3700 /* RPCT task event indicating data is in the circular buffer. */
3701 #ifndef RPCT_UCBUF_EVT
3702 #define RPCT_UCBUF_EVT APPL_EVT_2
3705 /* Task ID of RPCGEN task. */
3707 #define RPCGEN_TASK BTU_TASK
3710 /* RPCGEN task event for messages coming from RPCT. */
3711 #ifndef RPCGEN_MSG_EVT
3712 #define RPCGEN_MSG_EVT TASK_MBOX_1_EVT_MASK
3715 #ifndef RPCGEN_MSG_MBOX
3716 #define RPCGEN_MSG_MBOX TASK_MBOX_1
3719 /* Size of circular buffer used to store diagnostic messages. */
3720 #ifndef RPCT_UCBUF_SIZE
3721 #define RPCT_UCBUF_SIZE 2000
3724 /******************************************************************************
3726 ** SAP - Sample applications
3728 ******************************************************************************/
3730 #ifndef MMI_INCLUDED
3731 #define MMI_INCLUDED FALSE
3734 /******************************************************************************
3736 ** APPL - Application Task
3738 ******************************************************************************/
3739 /* When TRUE indicates that an application task is to be run */
3740 #ifndef APPL_INCLUDED
3741 #define APPL_INCLUDED TRUE
3744 /* When TRUE remote terminal code included (RPC MUST be included) */
3745 #ifndef RSI_INCLUDED
3746 #define RSI_INCLUDED TRUE
3751 #define L2CAP_FEATURE_REQ_ID 73
3752 #define L2CAP_FEATURE_RSP_ID 173
3755 #define L2CAP_ENHANCED_FEATURES 0
3758 /******************************************************************************
3762 ******************************************************************************/
3763 /* BTA EIR canned UUID list (default is dynamic) */
3764 #ifndef BTA_EIR_CANNED_UUID_LIST
3765 #define BTA_EIR_CANNED_UUID_LIST FALSE
3768 /* Number of supported customer UUID in EIR */
3769 #ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID
3770 #define BTA_EIR_SERVER_NUM_CUSTOM_UUID 8
3773 /* CHLD override for bluedroid */
3774 #ifndef BTA_AG_CHLD_VAL_ECC
3775 #define BTA_AG_CHLD_VAL_ECC "(0,1,1x,2,2x,3)"
3778 #ifndef BTA_AG_CHLD_VAL
3779 #define BTA_AG_CHLD_VAL "(0,1,2,3)"
3782 /* Set the CIND to match HFP 1.5 */
3783 #ifndef BTA_AG_CIND_INFO
3784 #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))"
3788 /******************************************************************************
3792 ******************************************************************************/
3793 #ifndef BTE_PLATFORM_IDLE
3794 #define BTE_PLATFORM_IDLE
3797 #ifndef BTE_IDLE_TASK_INCLUDED
3798 #define BTE_IDLE_TASK_INCLUDED FALSE
3801 #ifndef BTE_PLATFORM_INITHW
3802 #define BTE_PLATFORM_INITHW
3805 #ifndef BTE_BTA_CODE_INCLUDED
3806 #define BTE_BTA_CODE_INCLUDED FALSE
3809 /******************************************************************************
3813 ******************************************************************************/
3814 /* Whether to parse and display traces-> Platform specific implementation */
3816 #define BTTRC_DISP BTTRC_DispOnInsight
3819 /******************************************************************************
3821 ** Tracing: Include trace header file here.
3823 ******************************************************************************/
3825 #include "bt_trace.h"
3827 #endif /* BT_TARGET_H */