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 BTA_INCLUDED TRUE
117 #ifndef BTA_AG_INCLUDED
118 #define BTA_AG_INCLUDED TRUE
121 #ifndef BTA_CT_INCLUDED
122 #define BTA_CT_INCLUDED FALSE
125 #ifndef BTA_CG_INCLUDED
126 #define BTA_CG_INCLUDED FALSE
129 #ifndef BTA_DG_INCLUDED
130 #define BTA_DG_INCLUDED FALSE
133 #ifndef BTA_FT_INCLUDED
134 #define BTA_FT_INCLUDED FALSE
137 #ifndef BTA_OP_INCLUDED
138 #define BTA_OP_INCLUDED FALSE
141 #ifndef BTA_PR_INCLUDED
142 #define BTA_PR_INCLUDED FALSE
145 #ifndef BTA_SS_INCLUDED
146 #define BTA_SS_INCLUDED FALSE
149 #ifndef BTA_DM_INCLUDED
150 #define BTA_DM_INCLUDED TRUE
154 #ifndef BTA_DI_INCLUDED
155 #define BTA_DI_INCLUDED FALSE
158 #ifndef BTA_BI_INCLUDED
159 #define BTA_BI_INCLUDED FALSE
162 #ifndef BTA_SC_INCLUDED
163 #define BTA_SC_INCLUDED FALSE
166 #ifndef BTA_PAN_INCLUDED
167 #define BTA_PAN_INCLUDED TRUE
170 #ifndef BTA_FS_INCLUDED
171 #define BTA_FS_INCLUDED TRUE
174 #ifndef BTA_AC_INCLUDED
175 #define BTA_AC_INCLUDED FALSE
178 #ifndef BTA_HD_INCLUDED
179 #define BTA_HD_INCLUDED FALSE
182 #ifndef BTA_HH_INCLUDED
183 #define BTA_HH_INCLUDED TRUE
187 #define BTA_HH_ROLE BTA_MASTER_ROLE_PREF
190 #ifndef BTA_AR_INCLUDED
191 #define BTA_AR_INCLUDED TRUE
194 #ifndef BTA_AV_INCLUDED
195 #define BTA_AV_INCLUDED TRUE
198 #ifndef BTA_AV_VDP_INCLUDED
199 #define BTA_AV_VDP_INCLUDED FALSE
202 #ifndef BTA_AVK_INCLUDED
203 #define BTA_AVK_INCLUDED FALSE
206 #ifndef BTA_PBS_INCLUDED
207 #define BTA_PBS_INCLUDED FALSE
210 #ifndef BTA_PBC_INCLUDED
211 #define BTA_PBC_INCLUDED FALSE
214 #ifndef BTA_FM_INCLUDED
215 #define BTA_FM_INCLUDED FALSE
219 #define BTA_FM_DEBUG FALSE
222 #ifndef BTA_FMTX_INCLUDED
223 #define BTA_FMTX_INCLUDED FALSE
226 #ifndef BTA_FMTX_DEBUG
227 #define BTA_FMTX_DEBUG FALSE
230 #ifndef BTA_FMTX_FMRX_SWITCH_WORKAROUND
231 #define BTA_FMTX_FMRX_SWITCH_WORKAROUND FALSE
234 #ifndef BTA_FMTX_US_FCC_RULES
235 #define BTA_FMTX_US_FCC_RULES FALSE
238 #ifndef BTA_HS_INCLUDED
239 #define BTA_HS_INCLUDED FALSE
242 #ifndef BTA_MSE_INCLUDED
243 #define BTA_MSE_INCLUDED FALSE
246 #ifndef BTA_MCE_INCLUDED
247 #define BTA_MCE_INCLUDED FALSE
250 #ifndef BTA_PLAYBACK_INCLUDED
251 #define BTA_PLAYBACK_INCLUDED FALSE
254 #ifndef BTA_SSR_INCLUDED
255 #define BTA_SSR_INCLUDED FALSE
258 #ifndef BTA_JV_INCLUDED
259 #define BTA_JV_INCLUDED FALSE
262 #ifndef BTA_GATT_INCLUDED
263 #define BTA_GATT_INCLUDED TRUE
266 #ifndef BTA_DISABLE_DELAY
267 #define BTA_DISABLE_DELAY 200 /* in milliseconds */
270 #ifndef RPC_TRACE_ONLY
271 #define RPC_TRACE_ONLY FALSE
274 #ifndef ANDROID_APP_INCLUDED
275 #define ANDROID_APP_INCLUDED TRUE
278 #ifndef ANDROID_USE_LOGCAT
279 #define ANDROID_USE_LOGCAT TRUE
282 #ifndef LINUX_GKI_INCLUDED
283 #define LINUX_GKI_INCLUDED TRUE
286 #ifndef BTA_SYS_TIMER_PERIOD
287 #define BTA_SYS_TIMER_PERIOD 100
290 #ifndef GKI_SHUTDOWN_EVT
291 #define GKI_SHUTDOWN_EVT APPL_EVT_7
294 #ifndef GKI_PTHREAD_JOINABLE
295 #define GKI_PTHREAD_JOINABLE TRUE
298 #ifndef LINUX_DRV_INCLUDED
299 #define LINUX_DRV_INCLUDED TRUE
303 #define LINUX_OS TRUE
306 #ifndef BTM_APP_DEV_INIT
307 #define BTM_APP_DEV_INIT bte_main_post_reset_init
310 #ifndef SBC_FOR_EMBEDDED_LINUX
311 #define SBC_FOR_EMBEDDED_LINUX TRUE
314 #ifndef BTA_DM_REMOTE_DEVICE_NAME_LENGTH
315 #define BTA_DM_REMOTE_DEVICE_NAME_LENGTH 248
319 #define AVDT_VERSION 0x0102
322 #ifndef BTA_AG_AT_MAX_LEN
323 #define BTA_AG_AT_MAX_LEN 512
326 #ifndef BTA_AVRCP_FF_RW_SUPPORT
327 #define BTA_AVRCP_FF_RW_SUPPORT TRUE
330 #ifndef BTA_AG_SCO_PKT_TYPES
331 #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)
334 #ifndef BTA_AV_MAX_A2DP_MTU
335 #define BTA_AV_MAX_A2DP_MTU 668
338 #ifndef BTA_AV_RET_TOUT
339 #define BTA_AV_RET_TOUT 15
342 #ifndef PORCHE_PAIRING_CONFLICT
343 #define PORCHE_PAIRING_CONFLICT TRUE
346 #ifndef BTA_AV_CO_CP_SCMS_T
347 #define BTA_AV_CO_CP_SCMS_T FALSE
350 #ifndef AVDT_CONNECT_CP_ONLY
351 #define AVDT_CONNECT_CP_ONLY FALSE
354 #ifndef BT_TRACE_PROTOCOL
355 #define BT_TRACE_PROTOCOL TRUE
358 #ifndef BT_USE_TRACES
359 #define BT_USE_TRACES TRUE
362 #ifndef BT_TRACE_BTIF
363 #define BT_TRACE_BTIF TRUE
366 #ifndef BTTRC_INCLUDED
367 #define BTTRC_INCLUDED FALSE
370 #ifndef BT_TRACE_VERBOSE
371 #define BT_TRACE_VERBOSE FALSE
374 #ifndef BTTRC_PARSER_INCLUDED
375 #define BTTRC_PARSER_INCLUDED FALSE
378 #ifndef MAX_TRACE_RAM_SIZE
379 #define MAX_TRACE_RAM_SIZE 10000
382 #ifndef OBX_INITIAL_TRACE_LEVEL
383 #define OBX_INITIAL_TRACE_LEVEL BT_TRACE_LEVEL_ERROR
386 #ifndef PBAP_ZERO_VCARD_IN_DB
387 #define PBAP_ZERO_VCARD_IN_DB FALSE
390 #ifndef BTA_DM_SDP_DB_SIZE
391 #define BTA_DM_SDP_DB_SIZE 8000
394 #ifndef FTS_REJECT_INVALID_OBEX_SET_PATH_REQ
395 #define FTS_REJECT_INVALID_OBEX_SET_PATH_REQ FALSE
399 #define HL_INCLUDED TRUE
402 #ifndef NO_GKI_RUN_RETURN
403 #define NO_GKI_RUN_RETURN TRUE
406 #ifndef AG_VOICE_SETTINGS
407 #define AG_VOICE_SETTINGS HCI_DEFAULT_VOICE_SETTINGS
410 #ifndef BTIF_DM_OOB_TEST
411 #define BTIF_DM_OOB_TEST TRUE
413 //------------------End added from Bluedroid buildcfg.h---------------------
417 /* #define BYPASS_AVDATATRACE */
419 /******************************************************************************
423 ******************************************************************************/
425 /* API macros for simulator */
429 #ifndef BTE_BSE_WRAPPER
432 #define BTAPI __declspec(dllexport)
437 #define BTU_API BTAPI
438 #define A2D_API BTAPI
439 #define VDP_API BTAPI
440 #define AVDT_API BTAPI
441 #define AVCT_API BTAPI
442 #define AVRC_API BTAPI
443 #define BIP_API BTAPI
444 #define BNEP_API BTAPI
445 #define BPP_API BTAPI
446 #define BTM_API BTAPI
447 #define CTP_API BTAPI
448 #define DUN_API BTAPI
449 #define FTP_API BTAPI
450 #define GAP_API BTAPI
451 #define GOEP_API BTAPI
452 #define HCI_API BTAPI
453 #define HCRP_API BTAPI
454 #define HID_API BTAPI
455 #define HFP_API BTAPI
456 #define HSP2_API BTAPI
457 #define ICP_API BTAPI
458 #define L2C_API BTAPI
459 #define OBX_API BTAPI
460 #define OPP_API BTAPI
461 #define PAN_API BTAPI
462 #define RFC_API BTAPI
463 #define RPC_API BTAPI
464 #define SDP_API BTAPI
465 #define SPP_API BTAPI
466 #define TCS_API BTAPI
467 #define XML_API BTAPI
468 #define BTA_API BTAPI
469 #define SBC_API BTAPI
470 #define MCE_API BTAPI
471 #define MCA_API BTAPI
472 #define GATT_API BTAPI
473 #define SMP_API BTAPI
476 /******************************************************************************
480 ******************************************************************************/
482 /* Receives HCI events from the lower-layer. */
483 #ifndef HCI_CMD_POOL_ID
484 #define HCI_CMD_POOL_ID GKI_POOL_ID_2
487 #ifndef HCI_CMD_POOL_BUF_SIZE
488 #define HCI_CMD_POOL_BUF_SIZE GKI_BUF2_SIZE
491 /* Receives ACL data packets from thelower-layer. */
492 #ifndef HCI_ACL_POOL_ID
493 #define HCI_ACL_POOL_ID GKI_POOL_ID_3
496 #ifndef HCI_ACL_POOL_BUF_SIZE
497 #define HCI_ACL_POOL_BUF_SIZE GKI_BUF3_SIZE
500 /* Maximum number of buffers available for ACL receive data. */
501 #ifndef HCI_ACL_BUF_MAX
502 #define HCI_ACL_BUF_MAX GKI_BUF3_MAX
505 /* Receives SCO data packets from the lower-layer. */
506 #ifndef HCI_SCO_POOL_ID
507 #define HCI_SCO_POOL_ID GKI_POOL_ID_6
511 #ifndef HCI_DATA_DESCR_POOL_ID
512 #define HCI_DATA_DESCR_POOL_ID GKI_POOL_ID_0
515 /* Sends SDP data packets. */
517 #define SDP_POOL_ID 3
520 /* Sends RFCOMM command packets. */
521 #ifndef RFCOMM_CMD_POOL_ID
522 #define RFCOMM_CMD_POOL_ID GKI_POOL_ID_2
525 #ifndef RFCOMM_CMD_POOL_BUF_SIZE
526 #define RFCOMM_CMD_POOL_BUF_SIZE GKI_BUF2_SIZE
529 /* Sends RFCOMM data packets. */
530 #ifndef RFCOMM_DATA_POOL_ID
531 #define RFCOMM_DATA_POOL_ID GKI_POOL_ID_3
534 #ifndef RFCOMM_DATA_POOL_BUF_SIZE
535 #define RFCOMM_DATA_POOL_BUF_SIZE GKI_BUF3_SIZE
538 /* Sends L2CAP packets to the peer and HCI messages to the controller. */
539 #ifndef L2CAP_CMD_POOL_ID
540 #define L2CAP_CMD_POOL_ID GKI_POOL_ID_2
543 /* Sends L2CAP segmented packets in ERTM mode */
544 #ifndef L2CAP_FCR_TX_POOL_ID
545 #define L2CAP_FCR_TX_POOL_ID HCI_ACL_POOL_ID
548 /* Receives L2CAP segmented packets in ERTM mode */
549 #ifndef L2CAP_FCR_RX_POOL_ID
550 #define L2CAP_FCR_RX_POOL_ID HCI_ACL_POOL_ID
553 /* Number of ACL buffers to assign to LE
554 if the HCI buffer pool is shared with BR/EDR */
555 #ifndef L2C_DEF_NUM_BLE_BUF_SHARED
556 #define L2C_DEF_NUM_BLE_BUF_SHARED 1
559 /* Used by BTM when it sends HCI commands to the controller. */
560 #ifndef BTM_CMD_POOL_ID
561 #define BTM_CMD_POOL_ID GKI_POOL_ID_2
564 #ifndef OBX_CMD_POOL_SIZE
565 #define OBX_CMD_POOL_SIZE GKI_BUF2_SIZE
568 #ifndef OBX_LRG_DATA_POOL_SIZE
569 #define OBX_LRG_DATA_POOL_SIZE GKI_BUF4_SIZE
572 #ifndef OBX_LRG_DATA_POOL_ID
573 #define OBX_LRG_DATA_POOL_ID GKI_POOL_ID_4
576 /* Used for CTP discovery database. */
577 #ifndef CTP_SDP_DB_POOL_ID
578 #define CTP_SDP_DB_POOL_ID GKI_POOL_ID_3
581 /* Used to send data to L2CAP. */
582 #ifndef GAP_DATA_POOL_ID
583 #define GAP_DATA_POOL_ID GKI_POOL_ID_3
586 /* Used for SPP inquiry and discovery databases. */
587 #ifndef SPP_DB_POOL_ID
588 #define SPP_DB_POOL_ID GKI_POOL_ID_3
592 #define SPP_DB_SIZE GKI_BUF3_SIZE
595 /* BNEP data and protocol messages. */
597 #define BNEP_POOL_ID GKI_POOL_ID_3
600 /* RPC pool for temporary trace message buffers. */
601 #ifndef RPC_SCRATCH_POOL_ID
602 #define RPC_SCRATCH_POOL_ID GKI_POOL_ID_2
605 /* RPC scratch buffer size (not related to RPC_SCRATCH_POOL_ID) */
606 #ifndef RPC_SCRATCH_BUF_SIZE
607 #define RPC_SCRATCH_BUF_SIZE GKI_BUF3_SIZE
610 /* RPC pool for protocol messages */
611 #ifndef RPC_MSG_POOL_ID
612 #define RPC_MSG_POOL_ID GKI_POOL_ID_3
615 #ifndef RPC_MSG_POOL_SIZE
616 #define RPC_MSG_POOL_SIZE GKI_BUF3_SIZE
619 /* AVDTP pool for protocol messages */
620 #ifndef AVDT_CMD_POOL_ID
621 #define AVDT_CMD_POOL_ID GKI_POOL_ID_2
624 /* AVDTP pool size for media packets in case of fragmentation */
625 #ifndef AVDT_DATA_POOL_SIZE
626 #define AVDT_DATA_POOL_SIZE GKI_BUF3_SIZE
630 #define PAN_POOL_ID GKI_POOL_ID_3
633 /* UNV pool for read/write serialization */
634 #ifndef UNV_MSG_POOL_ID
635 #define UNV_MSG_POOL_ID GKI_POOL_ID_2
638 #ifndef UNV_MSG_POOL_SIZE
639 #define UNV_MSG_POOL_SIZE GKI_BUF2_SIZE
642 /* AVCTP pool for protocol messages */
643 #ifndef AVCT_CMD_POOL_ID
644 #define AVCT_CMD_POOL_ID GKI_POOL_ID_1
647 #ifndef AVCT_META_CMD_POOL_ID
648 #define AVCT_META_CMD_POOL_ID GKI_POOL_ID_2
651 /* AVRCP pool for protocol messages */
652 #ifndef AVRC_CMD_POOL_ID
653 #define AVRC_CMD_POOL_ID GKI_POOL_ID_1
656 /* AVRCP pool size for protocol messages */
657 #ifndef AVRC_CMD_POOL_SIZE
658 #define AVRC_CMD_POOL_SIZE GKI_BUF1_SIZE
661 /* AVRCP Metadata pool for protocol messages */
662 #ifndef AVRC_META_CMD_POOL_ID
663 #define AVRC_META_CMD_POOL_ID GKI_POOL_ID_2
666 /* AVRCP Metadata pool size for protocol messages */
667 #ifndef AVRC_META_CMD_POOL_SIZE
668 #define AVRC_META_CMD_POOL_SIZE GKI_BUF2_SIZE
672 /* AVRCP buffer size for browsing channel messages */
673 #ifndef AVRC_BROWSE_POOL_SIZE
674 #define AVRC_BROWSE_POOL_SIZE GKI_MAX_BUF_SIZE
677 /* HDP buffer size for the Pulse Oximeter */
678 #ifndef BTA_HL_LRG_DATA_POOL_SIZE
679 #define BTA_HL_LRG_DATA_POOL_SIZE GKI_BUF7_SIZE
682 #ifndef BTA_HL_LRG_DATA_POOL_ID
683 #define BTA_HL_LRG_DATA_POOL_ID GKI_POOL_ID_7
686 /* GATT Server Database pool ID */
687 #ifndef GATT_DB_POOL_ID
688 #define GATT_DB_POOL_ID GKI_POOL_ID_8
691 /******************************************************************************
693 ** Lower Layer Interface
695 ******************************************************************************/
697 /* Sends ACL data received over HCI to the upper stack. */
698 #ifndef HCI_ACL_DATA_TO_UPPER
699 #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);}
702 /* Sends SCO data received over HCI to the upper stack. */
703 #ifndef HCI_SCO_DATA_TO_UPPER
704 #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);}
707 /* Sends an HCI event received over HCI to theupper stack. */
708 #ifndef HCI_EVT_TO_UPPER
709 #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);}
712 /* Macro for allocating buffer for HCI commands */
713 #ifndef HCI_GET_CMD_BUF
714 #if (!defined(HCI_USE_VARIABLE_SIZE_CMD_BUF) || (HCI_USE_VARIABLE_SIZE_CMD_BUF == FALSE))
715 /* Allocate fixed-size buffer from HCI_CMD_POOL (default case) */
716 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getpoolbuf (HCI_CMD_POOL_ID))
718 /* Allocate smallest possible buffer (for platforms with limited RAM) */
719 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getbuf ((UINT16)(BT_HDR_SIZE + HCIC_PREAMBLE_SIZE + (paramlen))))
721 #endif /* HCI_GET_CMD_BUF */
723 /******************************************************************************
727 ******************************************************************************/
728 #ifndef HCISU_H4_INCLUDED
729 #define HCISU_H4_INCLUDED TRUE
736 BT_API extern void bte_main_hci_send (BT_HDR *p_msg, UINT16 event);
737 #if (HCISU_H4_INCLUDED == TRUE)
738 BT_API extern void bte_main_lpm_allow_bt_device_sleep(void);
745 /* Sends ACL data received from the upper stack to the BD/EDR HCI transport. */
746 #ifndef HCI_ACL_DATA_TO_LOWER
747 #define HCI_ACL_DATA_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_ACL);
750 #ifndef HCI_BLE_ACL_DATA_TO_LOWER
751 #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));
754 /* Sends SCO data received from the upper stack to the HCI transport. */
755 #ifndef HCI_SCO_DATA_TO_LOWER
756 #define HCI_SCO_DATA_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_SCO);
759 /* Sends an HCI command received from the upper stack to the BD/EDR HCI transport. */
760 #ifndef HCI_CMD_TO_LOWER
761 #define HCI_CMD_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_CMD);
764 /* Sends an LM Diagnosic command received from the upper stack to the HCI transport. */
765 #ifndef HCI_LM_DIAG_TO_LOWER
766 #define HCI_LM_DIAG_TO_LOWER(p) bte_main_hci_send((BT_HDR *)(p), BT_EVT_TO_LM_DIAG);
769 /* Send HCISU a message to allow BT sleep */
770 #ifndef HCI_LP_ALLOW_BT_DEVICE_SLEEP
771 #define HCI_LP_ALLOW_BT_DEVICE_SLEEP() bte_main_lpm_allow_bt_device_sleep()
774 /* If nonzero, the upper-layer sends at most this number of HCI commands to the lower-layer. */
775 #ifndef HCI_MAX_SIMUL_CMDS
776 #define HCI_MAX_SIMUL_CMDS 0
779 /* Timeout for receiving response to HCI command */
780 #ifndef BTU_CMD_CMPL_TIMEOUT
781 #define BTU_CMD_CMPL_TIMEOUT 8
784 /* If TRUE, BTU task will check HCISU again when HCI command timer expires */
785 #ifndef BTU_CMD_CMPL_TOUT_DOUBLE_CHECK
786 #define BTU_CMD_CMPL_TOUT_DOUBLE_CHECK FALSE
789 /* Use 2 second for low-resolution systems, override to 1 for high-resolution systems */
790 #ifndef BT_1SEC_TIMEOUT
791 #define BT_1SEC_TIMEOUT (2)
795 /* if L2CAP_FCR_INCLUDED is TRUE then it should have 100 millisecond resolution */
796 /* if none of them is included then QUICK_TIMER_TICKS_PER_SEC is set to 0 to exclude quick timer */
797 #ifndef QUICK_TIMER_TICKS_PER_SEC
798 #define QUICK_TIMER_TICKS_PER_SEC 10 /* 10ms timer */
801 /******************************************************************************
805 ******************************************************************************/
806 /* if set to TRUE, stack will automatically send an HCI reset at start-up. To be
807 set to FALSE for advanced start-up / shut-down procedures using USER_HW_ENABLE_API
808 and USER_HW_DISABLE_API macros */
809 #ifndef BTM_AUTOMATIC_HCI_RESET
810 #define BTM_AUTOMATIC_HCI_RESET FALSE
813 /* Include BTM Discovery database and code. */
814 #ifndef BTM_DISCOVERY_INCLUDED
815 #define BTM_DISCOVERY_INCLUDED TRUE
818 /* Include inquiry code. */
819 #ifndef BTM_INQUIRY_INCLUDED
820 #define BTM_INQUIRY_INCLUDED TRUE
823 /* Cancel Inquiry on incoming SSP */
824 #ifndef BTM_NO_SSP_ON_INQUIRY
825 #define BTM_NO_SSP_ON_INQUIRY FALSE
828 /* Include periodic inquiry code (used when BTM_INQUIRY_INCLUDED is TRUE). */
829 #ifndef BTM_PERIODIC_INQ_INCLUDED
830 #define BTM_PERIODIC_INQ_INCLUDED TRUE
833 /* Include security authorization code */
834 #ifndef BTM_AUTHORIZATION_INCLUDED
835 #define BTM_AUTHORIZATION_INCLUDED TRUE
838 /* Includes SCO if TRUE */
839 #ifndef BTM_SCO_INCLUDED
840 #define BTM_SCO_INCLUDED TRUE /* TRUE includes SCO code */
843 /* Includes SCO if TRUE */
844 #ifndef BTM_SCO_HCI_INCLUDED
845 #define BTM_SCO_HCI_INCLUDED FALSE /* TRUE includes SCO over HCI code */
848 /* Includes WBS if TRUE */
849 #ifndef BTM_WBS_INCLUDED
850 #define BTM_WBS_INCLUDED FALSE /* TRUE includes WBS code */
853 /* Includes PCM2 support if TRUE */
854 #ifndef BTM_PCM2_INCLUDED
855 #define BTM_PCM2_INCLUDED FALSE
858 /* This is used to work around a controller bug that doesn't like Disconnect
859 ** issued while there is a role switch in progress
861 #ifndef BTM_DISC_DURING_RS
862 #define BTM_DISC_DURING_RS TRUE
865 /**************************
866 ** Initial SCO TX credit
867 *************************/
868 /* max TX SCO data packet size */
869 #ifndef BTM_SCO_DATA_SIZE_MAX
870 #define BTM_SCO_DATA_SIZE_MAX 240
873 /* maximum BTM buffering capacity */
874 #ifndef BTM_SCO_MAX_BUF_CAP
875 #define BTM_SCO_MAX_BUF_CAP (BTM_SCO_INIT_XMIT_CREDIT * 4)
878 /* The size in bytes of the BTM inquiry database. */
879 #ifndef BTM_INQ_DB_SIZE
880 #define BTM_INQ_DB_SIZE 40
883 /* This is set to enable automatic periodic inquiry at startup. */
884 #ifndef BTM_ENABLE_AUTO_INQUIRY
885 #define BTM_ENABLE_AUTO_INQUIRY FALSE
888 /* This is set to always try to acquire the remote device name. */
889 #ifndef BTM_INQ_GET_REMOTE_NAME
890 #define BTM_INQ_GET_REMOTE_NAME FALSE
893 /* The inquiry duration in 1.28 second units when auto inquiry is enabled. */
894 #ifndef BTM_DEFAULT_INQ_DUR
895 #define BTM_DEFAULT_INQ_DUR 5
898 /* The inquiry mode when auto inquiry is enabled. */
899 #ifndef BTM_DEFAULT_INQ_MODE
900 #define BTM_DEFAULT_INQ_MODE BTM_GENERAL_INQUIRY
903 /* The default periodic inquiry maximum delay when auto inquiry is enabled, in 1.28 second units. */
904 #ifndef BTM_DEFAULT_INQ_MAX_DELAY
905 #define BTM_DEFAULT_INQ_MAX_DELAY 30
908 /* The default periodic inquiry minimum delay when auto inquiry is enabled, in 1.28 second units. */
909 #ifndef BTM_DEFAULT_INQ_MIN_DELAY
910 #define BTM_DEFAULT_INQ_MIN_DELAY 20
913 /* The maximum age of entries in inquiry database in seconds ('0' disables feature). */
914 #ifndef BTM_INQ_MAX_AGE
915 #define BTM_INQ_MAX_AGE 0
918 /* The maximum age of entries in inquiry database based on inquiry response failure ('0' disables feature). */
919 #ifndef BTM_INQ_AGE_BY_COUNT
920 #define BTM_INQ_AGE_BY_COUNT 0
923 /* TRUE if controller does not support inquiry event filtering. */
924 #ifndef BTM_BYPASS_EVENT_FILTERING
925 #define BTM_BYPASS_EVENT_FILTERING FALSE
928 /* TRUE if inquiry filtering is desired from BTM. */
929 #ifndef BTM_USE_INQ_RESULTS_FILTER
930 #define BTM_USE_INQ_RESULTS_FILTER TRUE
933 /* The default scan mode */
934 #ifndef BTM_DEFAULT_SCAN_TYPE
935 #define BTM_DEFAULT_SCAN_TYPE BTM_SCAN_TYPE_INTERLACED
938 /* Should connections to unknown devices be allowed when not discoverable? */
939 #ifndef BTM_ALLOW_CONN_IF_NONDISCOVER
940 #define BTM_ALLOW_CONN_IF_NONDISCOVER TRUE
943 /* When connectable mode is set to TRUE, the device will respond to paging. */
944 #ifndef BTM_IS_CONNECTABLE
945 #define BTM_IS_CONNECTABLE FALSE
948 /* Sets the Page_Scan_Window: the length of time that the device is performing a page scan. */
949 #ifndef BTM_DEFAULT_CONN_WINDOW
950 #define BTM_DEFAULT_CONN_WINDOW 0x0012
953 /* Sets the Page_Scan_Activity: the interval between the start of two consecutive page scans. */
954 #ifndef BTM_DEFAULT_CONN_INTERVAL
955 #define BTM_DEFAULT_CONN_INTERVAL 0x0800
958 /* This is set to automatically perform inquiry scan on startup. */
959 #ifndef BTM_IS_DISCOVERABLE
960 #define BTM_IS_DISCOVERABLE FALSE
963 /* When automatic inquiry scan is enabled, this sets the discovery mode. */
964 #ifndef BTM_DEFAULT_DISC_MODE
965 #define BTM_DEFAULT_DISC_MODE BTM_GENERAL_DISCOVERABLE
968 /* When automatic inquiry scan is enabled, this sets the inquiry scan window. */
969 #ifndef BTM_DEFAULT_DISC_WINDOW
970 #define BTM_DEFAULT_DISC_WINDOW 0x0012
973 /* When automatic inquiry scan is enabled, this sets the inquiry scan interval. */
974 #ifndef BTM_DEFAULT_DISC_INTERVAL
975 #define BTM_DEFAULT_DISC_INTERVAL 0x0800
978 /* Sets the period, in seconds, to automatically perform service discovery. */
979 #ifndef BTM_AUTO_DISCOVERY_PERIOD
980 #define BTM_AUTO_DISCOVERY_PERIOD 0
983 /* The size in bytes of the BTM discovery database (if discovery is included). */
984 #ifndef BTM_DISCOVERY_DB_SIZE
985 #define BTM_DISCOVERY_DB_SIZE 4000
988 /* Number of milliseconds to delay BTU task startup upon device initialization. */
989 #ifndef BTU_STARTUP_DELAY
990 #define BTU_STARTUP_DELAY 0
993 /* Whether BTA is included in BTU task. */
994 #ifndef BTU_BTA_INCLUDED
995 #define BTU_BTA_INCLUDED TRUE
998 /* Number of seconds to wait to send an HCI Reset command upon device initialization. */
999 #ifndef BTM_FIRST_RESET_DELAY
1000 #define BTM_FIRST_RESET_DELAY 0
1003 /* The number of seconds to wait for controller module to reset after issuing an HCI Reset command. */
1004 #ifndef BTM_AFTER_RESET_TIMEOUT
1005 #define BTM_AFTER_RESET_TIMEOUT 0
1008 /* Default class of device
1009 * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
1011 * SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony)
1012 * MAJOR_CLASS:0x02 - PHONE
1013 * MINOR_CLASS:0x0C - SMART_PHONE
1017 #define BTA_DM_COD {0x5A, 0x02, 0x0C}
1020 /* The number of SCO links. */
1021 #ifndef BTM_MAX_SCO_LINKS
1022 #define BTM_MAX_SCO_LINKS 2
1025 /* The preferred type of SCO links (2-eSCO, 0-SCO). */
1026 #ifndef BTM_DEFAULT_SCO_MODE
1027 #define BTM_DEFAULT_SCO_MODE 2
1030 /* The number of security records for peer devices. */
1031 #ifndef BTM_SEC_MAX_DEVICE_RECORDS
1032 #define BTM_SEC_MAX_DEVICE_RECORDS 100
1035 /* The number of security records for services. */
1036 #ifndef BTM_SEC_MAX_SERVICE_RECORDS
1037 #define BTM_SEC_MAX_SERVICE_RECORDS 32
1040 /* If True, force a retrieval of remote device name for each bond in case it's changed */
1041 #ifndef BTM_SEC_FORCE_RNR_FOR_DBOND
1042 #define BTM_SEC_FORCE_RNR_FOR_DBOND FALSE
1045 /* Maximum device name length used in btm database. */
1046 #ifndef BTM_MAX_REM_BD_NAME_LEN
1047 #define BTM_MAX_REM_BD_NAME_LEN 248
1050 /* Maximum local device name length stored btm database.
1051 '0' disables storage of the local name in BTM */
1052 #ifndef BTM_MAX_LOC_BD_NAME_LEN
1053 #define BTM_MAX_LOC_BD_NAME_LEN 248
1056 /* TRUE if default string is used, FALSE if device name is set in the application */
1057 #ifndef BTM_USE_DEF_LOCAL_NAME
1058 #define BTM_USE_DEF_LOCAL_NAME TRUE
1061 /* Fixed Default String (Ignored if BTM_USE_DEF_LOCAL_NAME is FALSE) */
1062 #ifndef BTM_DEF_LOCAL_NAME
1063 #define BTM_DEF_LOCAL_NAME ""
1066 /* Maximum service name stored with security authorization (0 if not needed) */
1067 #ifndef BTM_SEC_SERVICE_NAME_LEN
1068 #define BTM_SEC_SERVICE_NAME_LEN BT_MAX_SERVICE_NAME_LEN
1071 /* Maximum number of pending security callback */
1072 #ifndef BTM_SEC_MAX_CALLBACKS
1073 #define BTM_SEC_MAX_CALLBACKS 7
1076 /* Maximum length of the service name. */
1077 #ifndef BT_MAX_SERVICE_NAME_LEN
1078 #define BT_MAX_SERVICE_NAME_LEN 21
1081 /* ACL buffer size in HCI Host Buffer Size command. */
1082 #ifndef BTM_ACL_BUF_SIZE
1083 #define BTM_ACL_BUF_SIZE 0
1086 /* This is set to use the BTM power manager. */
1087 #ifndef BTM_PWR_MGR_INCLUDED
1088 #define BTM_PWR_MGR_INCLUDED TRUE
1091 /* The maximum number of clients that can register with the power manager. */
1092 #ifndef BTM_MAX_PM_RECORDS
1093 #define BTM_MAX_PM_RECORDS 2
1096 /* This is set to show debug trace messages for the power manager. */
1097 #ifndef BTM_PM_DEBUG
1098 #define BTM_PM_DEBUG FALSE
1101 /* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */
1102 #ifndef BTM_SCO_WAKE_PARKED_LINK
1103 #define BTM_SCO_WAKE_PARKED_LINK TRUE
1106 /* May be set to the the name of a function used for vendor specific chip initialization */
1107 #ifndef BTM_APP_DEV_INIT
1108 /* #define BTM_APP_DEV_INIT myInitFunction() */
1111 /* This is set to TRUE if the busy level change event is desired. (replace ACL change event) */
1112 #ifndef BTM_BUSY_LEVEL_CHANGE_INCLUDED
1113 #define BTM_BUSY_LEVEL_CHANGE_INCLUDED TRUE
1116 /* If the user does not respond to security process requests within this many seconds,
1117 * a negative response would be sent automatically.
1118 * It's recommended to use a value between 30 and OBX_TIMEOUT_VALUE
1119 * 30 is LMP response timeout value */
1120 #ifndef BTM_SEC_TIMEOUT_VALUE
1121 #define BTM_SEC_TIMEOUT_VALUE 35
1124 /* Maximum number of callbacks that can be registered using BTM_RegisterForVSEvents */
1125 #ifndef BTM_MAX_VSE_CALLBACKS
1126 #define BTM_MAX_VSE_CALLBACKS 3
1129 /* Number of streams for dual stack */
1130 #ifndef BTM_SYNC_INFO_NUM_STR
1131 #define BTM_SYNC_INFO_NUM_STR 2
1134 /* Number of streams for dual stack in BT Controller */
1135 #ifndef BTM_SYNC_INFO_NUM_STR_BTC
1136 #define BTM_SYNC_INFO_NUM_STR_BTC 2
1139 /******************************************
1141 *******************************************/
1142 /* This is set to TRUE if the server Extended Inquiry Response feature is desired. */
1143 /* server sends EIR to client */
1144 #ifndef BTM_EIR_SERVER_INCLUDED
1145 #define BTM_EIR_SERVER_INCLUDED TRUE
1148 /* This is set to TRUE if the client Extended Inquiry Response feature is desired. */
1149 /* client inquiry to server */
1150 #ifndef BTM_EIR_CLIENT_INCLUDED
1151 #define BTM_EIR_CLIENT_INCLUDED TRUE
1154 /* This is set to TRUE if the FEC is required for EIR packet. */
1155 #ifndef BTM_EIR_DEFAULT_FEC_REQUIRED
1156 #define BTM_EIR_DEFAULT_FEC_REQUIRED TRUE
1159 /* User defined UUID look up table */
1160 #ifndef BTM_EIR_UUID_LKUP_TBL
1163 /* The IO capability of the local device (for Simple Pairing) */
1164 #ifndef BTM_LOCAL_IO_CAPS
1165 #define BTM_LOCAL_IO_CAPS BTM_IO_CAP_IO
1168 /* The default MITM Protection Requirement (for Simple Pairing)
1169 * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */
1170 #ifndef BTM_DEFAULT_AUTH_REQ
1171 #define BTM_DEFAULT_AUTH_REQ BTM_AUTH_SP_NO
1174 /* The default MITM Protection Requirement for dedicated bonding using Simple Pairing
1175 * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */
1176 #ifndef BTM_DEFAULT_DD_AUTH_REQ
1177 #define BTM_DEFAULT_DD_AUTH_REQ BTM_AUTH_AP_YES
1180 /* Include Out-of-Band implementation for Simple Pairing */
1181 #ifndef BTM_OOB_INCLUDED
1182 #define BTM_OOB_INCLUDED TRUE
1185 /* TRUE to include Sniff Subrating */
1186 #ifndef BTM_SSR_INCLUDED
1187 #define BTM_SSR_INCLUDED TRUE
1190 /*************************
1191 ** End of Lisbon Features
1192 **************************/
1194 /* Used for conformance testing ONLY */
1195 #ifndef BTM_BLE_CONFORMANCE_TESTING
1196 #define BTM_BLE_CONFORMANCE_TESTING FALSE
1199 /* Maximum number of consecutive HCI commands that can time out
1200 * before it gets treated as H/w error*/
1201 #ifndef BTM_MAX_HCI_CMD_TOUT_BEFORE_RESTART
1202 #define BTM_MAX_HCI_CMD_TOUT_BEFORE_RESTART 2
1205 /******************************************************************************
1209 ******************************************************************************/
1211 /* Flow control and retransmission mode */
1213 #ifndef L2CAP_FCR_INCLUDED
1214 #define L2CAP_FCR_INCLUDED TRUE
1217 /* The maximum number of simultaneous links that L2CAP can support. */
1218 #ifndef MAX_ACL_CONNECTIONS
1219 #define MAX_L2CAP_LINKS 7
1221 #define MAX_L2CAP_LINKS MAX_ACL_CONNECTIONS
1224 /* The maximum number of simultaneous channels that L2CAP can support. */
1225 #ifndef MAX_L2CAP_CHANNELS
1226 #define MAX_L2CAP_CHANNELS 16
1229 /* The maximum number of simultaneous applications that can register with L2CAP. */
1230 #ifndef MAX_L2CAP_CLIENTS
1231 #define MAX_L2CAP_CLIENTS 15
1234 /* The number of seconds of link inactivity before a link is disconnected. */
1235 #ifndef L2CAP_LINK_INACTIVITY_TOUT
1236 #define L2CAP_LINK_INACTIVITY_TOUT 4
1239 /* The number of seconds of link inactivity after bonding before a link is disconnected. */
1240 #ifndef L2CAP_BONDING_TIMEOUT
1241 #define L2CAP_BONDING_TIMEOUT 3
1244 /* The time from the HCI connection complete to disconnect if no channel is established. */
1245 #ifndef L2CAP_LINK_STARTUP_TOUT
1246 #define L2CAP_LINK_STARTUP_TOUT 60
1249 /* The L2CAP MTU; must be in accord with the HCI ACL pool size. */
1250 #ifndef L2CAP_MTU_SIZE
1251 #define L2CAP_MTU_SIZE 1691
1254 /* The L2CAP MPS over Bluetooth; must be in accord with the FCR tx pool size and ACL down buffer size. */
1255 #ifndef L2CAP_MPS_OVER_BR_EDR
1256 #define L2CAP_MPS_OVER_BR_EDR 1010
1259 /* This is set to enable host flow control. */
1260 #ifndef L2CAP_HOST_FLOW_CTRL
1261 #define L2CAP_HOST_FLOW_CTRL FALSE
1264 /* If host flow control enabled, this is the number of buffers the controller can have unacknowledged. */
1265 #ifndef L2CAP_HOST_FC_ACL_BUFS
1266 #define L2CAP_HOST_FC_ACL_BUFS 20
1269 /* The percentage of the queue size allowed before a congestion event is sent to the L2CAP client (typically 120%). */
1270 #ifndef L2CAP_FWD_CONG_THRESH
1271 #define L2CAP_FWD_CONG_THRESH 120
1274 /* This is set to enable L2CAP to take the ACL link out of park mode when ACL data is to be sent. */
1275 #ifndef L2CAP_WAKE_PARKED_LINK
1276 #define L2CAP_WAKE_PARKED_LINK TRUE
1279 /* Whether link wants to be the master or the slave. */
1280 #ifndef L2CAP_DESIRED_LINK_ROLE
1281 #define L2CAP_DESIRED_LINK_ROLE HCI_ROLE_SLAVE
1284 /* Include Non-Flushable Packet Boundary Flag feature of Lisbon */
1285 #ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED
1286 #define L2CAP_NON_FLUSHABLE_PB_INCLUDED TRUE
1289 /* Minimum number of ACL credit for high priority link */
1290 #ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
1291 #define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 5
1294 /* used for monitoring HCI ACL credit management */
1295 #ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG
1296 #define L2CAP_HCI_FLOW_CONTROL_DEBUG TRUE
1299 /* Used for calculating transmit buffers off of */
1300 #ifndef L2CAP_NUM_XMIT_BUFFS
1301 #define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX
1304 /* Unicast Connectionless Data */
1305 #ifndef L2CAP_UCD_INCLUDED
1306 #define L2CAP_UCD_INCLUDED FALSE
1309 /* Unicast Connectionless Data MTU */
1310 #ifndef L2CAP_UCD_MTU
1311 #define L2CAP_UCD_MTU L2CAP_MTU_SIZE
1314 /* Unicast Connectionless Data Idle Timeout */
1315 #ifndef L2CAP_UCD_IDLE_TIMEOUT
1316 #define L2CAP_UCD_IDLE_TIMEOUT 2
1319 /* Unicast Connectionless Data Idle Timeout */
1320 #ifndef L2CAP_UCD_CH_PRIORITY
1321 #define L2CAP_UCD_CH_PRIORITY L2CAP_CHNL_PRIORITY_MEDIUM
1324 /* Max clients on Unicast Connectionless Data */
1325 #ifndef L2CAP_MAX_UCD_CLIENTS
1326 #define L2CAP_MAX_UCD_CLIENTS 5
1329 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
1330 /* Excluding L2CAP signaling channel and UCD */
1331 #ifndef L2CAP_NUM_FIXED_CHNLS
1332 #define L2CAP_NUM_FIXED_CHNLS 4
1335 /* First fixed channel supported */
1336 #ifndef L2CAP_FIRST_FIXED_CHNL
1337 #define L2CAP_FIRST_FIXED_CHNL 3
1340 #ifndef L2CAP_LAST_FIXED_CHNL
1341 #define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
1344 /* Round Robin service channels in link */
1345 #ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
1346 #define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE TRUE
1349 /* Used for calculating transmit buffers off of */
1350 #ifndef L2CAP_NUM_XMIT_BUFFS
1351 #define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX
1354 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
1355 #ifndef L2CAP_NUM_FIXED_CHNLS
1356 #define L2CAP_NUM_FIXED_CHNLS 1
1359 /* First fixed channel supported */
1360 #ifndef L2CAP_FIRST_FIXED_CHNL
1361 #define L2CAP_FIRST_FIXED_CHNL 3
1364 #ifndef L2CAP_LAST_FIXED_CHNL
1365 #define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
1368 /* used for monitoring eL2CAP data flow */
1369 #ifndef L2CAP_ERTM_STATS
1370 #define L2CAP_ERTM_STATS FALSE
1373 /* USED FOR FCR TEST ONLY: When TRUE generates bad tx and rx packets */
1374 #ifndef L2CAP_CORRUPT_ERTM_PKTS
1375 #define L2CAP_CORRUPT_ERTM_PKTS FALSE
1378 /* Used for conformance testing ONLY: When TRUE lets scriptwrapper overwrite info response */
1379 #ifndef L2CAP_CONFORMANCE_TESTING
1380 #define L2CAP_CONFORMANCE_TESTING FALSE
1384 #ifndef TIMER_PARAM_TYPE
1386 #define TIMER_PARAM_TYPE void *
1388 #define TIMER_PARAM_TYPE UINT32
1392 /******************************************************************************
1396 ******************************************************************************/
1398 #ifndef BLE_INCLUDED
1399 #define BLE_INCLUDED TRUE
1402 #ifndef LOCAL_BLE_CONTROLLER_ID
1403 #define LOCAL_BLE_CONTROLLER_ID (1)
1406 /******************************************************************************
1408 ** ATT/GATT Protocol/Profile Settings
1410 ******************************************************************************/
1411 #ifndef ATT_INCLUDED
1412 #define ATT_INCLUDED TRUE
1416 #define ATT_DEBUG TRUE
1419 #ifndef GATT_SERVER_ENABLED
1420 #define GATT_SERVER_ENABLED TRUE
1423 #ifndef GATT_CLIENT_ENABLED
1424 #define GATT_CLIENT_ENABLED TRUE
1427 #ifndef GATT_MAX_SR_PROFILES
1428 #define GATT_MAX_SR_PROFILES 32 /* max is 32 */
1431 #ifndef GATT_MAX_APPS
1432 #define GATT_MAX_APPS 10 /* note: 2 apps used internally GATT and GAP */
1435 #ifndef GATT_MAX_CL_PROFILES
1436 #define GATT_MAX_CL_PROFILES 4
1439 #ifndef GATT_MAX_PHY_CHANNEL
1440 #define GATT_MAX_PHY_CHANNEL 4
1443 /* Used for conformance testing ONLY */
1444 #ifndef GATT_CONFORMANCE_TESTING
1445 #define GATT_CONFORMANCE_TESTING FALSE
1448 /* number of background connection device allowence, ideally to be the same as WL size
1450 #ifndef GATT_MAX_BG_CONN_DEV
1451 #define GATT_MAX_BG_CONN_DEV 32
1454 /******************************************************************************
1458 ******************************************************************************/
1459 #ifndef SMP_INCLUDED
1460 #define SMP_INCLUDED TRUE
1464 #define SMP_DEBUG TRUE
1467 #ifndef SMP_DEFAULT_AUTH_REQ
1468 #define SMP_DEFAULT_AUTH_REQ SMP_AUTH_NB_ENC_ONLY
1471 #ifndef SMP_MAX_ENC_KEY_SIZE
1472 #define SMP_MAX_ENC_KEY_SIZE 16
1475 #ifndef SMP_MIN_ENC_KEY_SIZE
1476 #define SMP_MIN_ENC_KEY_SIZE 7
1479 /* Used for conformance testing ONLY */
1480 #ifndef SMP_CONFORMANCE_TESTING
1481 #define SMP_CONFORMANCE_TESTING FALSE
1484 /******************************************************************************
1488 ******************************************************************************/
1490 /* This is set to enable SDP server functionality. */
1491 #ifndef SDP_SERVER_ENABLED
1492 #define SDP_SERVER_ENABLED TRUE
1495 /* The maximum number of SDP records the server can support. */
1496 #ifndef SDP_MAX_RECORDS
1497 #define SDP_MAX_RECORDS 20
1500 /* The maximum number of attributes in each record. */
1501 #ifndef SDP_MAX_REC_ATTR
1502 //#if defined(HID_DEV_INCLUDED) && (HID_DEV_INCLUDED==TRUE)
1503 #define SDP_MAX_REC_ATTR 25
1505 //#define SDP_MAX_REC_ATTR 13
1509 #ifndef SDP_MAX_PAD_LEN
1510 #define SDP_MAX_PAD_LEN 600
1513 /* The maximum length, in bytes, of an attribute. */
1514 #ifndef SDP_MAX_ATTR_LEN
1515 //#if defined(HID_DEV_INCLUDED) && (HID_DEV_INCLUDED==TRUE)
1516 //#define SDP_MAX_ATTR_LEN 80
1518 //#define SDP_MAX_ATTR_LEN 100
1520 #define SDP_MAX_ATTR_LEN 400
1523 /* The maximum number of attribute filters supported by SDP databases. */
1524 #ifndef SDP_MAX_ATTR_FILTERS
1525 #define SDP_MAX_ATTR_FILTERS 15
1528 /* The maximum number of UUID filters supported by SDP databases. */
1529 #ifndef SDP_MAX_UUID_FILTERS
1530 #define SDP_MAX_UUID_FILTERS 3
1533 /* This is set to enable SDP client functionality. */
1534 #ifndef SDP_CLIENT_ENABLED
1535 #define SDP_CLIENT_ENABLED TRUE
1538 /* The maximum number of record handles retrieved in a search. */
1539 #ifndef SDP_MAX_DISC_SERVER_RECS
1540 #define SDP_MAX_DISC_SERVER_RECS 21
1543 /* The size of a scratchpad buffer, in bytes, for storing the response to an attribute request. */
1544 #ifndef SDP_MAX_LIST_BYTE_COUNT
1545 #define SDP_MAX_LIST_BYTE_COUNT 4096
1548 /* The maximum number of parameters in an SDP protocol element. */
1549 #ifndef SDP_MAX_PROTOCOL_PARAMS
1550 #define SDP_MAX_PROTOCOL_PARAMS 2
1553 /* The maximum number of simultaneous client and server connections. */
1554 #ifndef SDP_MAX_CONNECTIONS
1555 #define SDP_MAX_CONNECTIONS 4
1558 /* The MTU size for the L2CAP configuration. */
1559 #ifndef SDP_MTU_SIZE
1560 #define SDP_MTU_SIZE 256
1563 /* The flush timeout for the L2CAP configuration. */
1564 #ifndef SDP_FLUSH_TO
1565 #define SDP_FLUSH_TO 0xFFFF
1568 /* The name for security authorization. */
1569 #ifndef SDP_SERVICE_NAME
1570 #define SDP_SERVICE_NAME "Service Discovery"
1573 /* The security level for BTM. */
1574 #ifndef SDP_SECURITY_LEVEL
1575 #define SDP_SECURITY_LEVEL BTM_SEC_NONE
1578 /* Device identification feature. */
1579 #ifndef SDP_DI_INCLUDED
1580 #define SDP_DI_INCLUDED TRUE
1583 /******************************************************************************
1587 ******************************************************************************/
1589 #ifndef RFCOMM_INCLUDED
1590 #define RFCOMM_INCLUDED TRUE
1593 /* The maximum number of ports supported. */
1594 #ifndef MAX_RFC_PORTS
1595 #define MAX_RFC_PORTS 30
1598 /* The maximum simultaneous links to different devices. */
1599 #ifndef MAX_ACL_CONNECTIONS
1600 #define MAX_BD_CONNECTIONS 7
1602 #define MAX_BD_CONNECTIONS MAX_ACL_CONNECTIONS
1605 /* The port receive queue low watermark level, in bytes. */
1606 #ifndef PORT_RX_LOW_WM
1607 #define PORT_RX_LOW_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM)
1610 /* The port receive queue high watermark level, in bytes. */
1611 #ifndef PORT_RX_HIGH_WM
1612 #define PORT_RX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM)
1615 /* The port receive queue critical watermark level, in bytes. */
1616 #ifndef PORT_RX_CRITICAL_WM
1617 #define PORT_RX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM)
1620 /* The port receive queue low watermark level, in number of buffers. */
1621 #ifndef PORT_RX_BUF_LOW_WM
1622 #define PORT_RX_BUF_LOW_WM 4
1625 /* The port receive queue high watermark level, in number of buffers. */
1626 #ifndef PORT_RX_BUF_HIGH_WM
1627 #define PORT_RX_BUF_HIGH_WM 10
1630 /* The port receive queue critical watermark level, in number of buffers. */
1631 #ifndef PORT_RX_BUF_CRITICAL_WM
1632 #define PORT_RX_BUF_CRITICAL_WM 15
1635 /* The port transmit queue high watermark level, in bytes. */
1636 #ifndef PORT_TX_HIGH_WM
1637 #define PORT_TX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM)
1640 /* The port transmit queue critical watermark level, in bytes. */
1641 #ifndef PORT_TX_CRITICAL_WM
1642 #define PORT_TX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM)
1645 /* The port transmit queue high watermark level, in number of buffers. */
1646 #ifndef PORT_TX_BUF_HIGH_WM
1647 #define PORT_TX_BUF_HIGH_WM 10
1650 /* The port transmit queue high watermark level, in number of buffers. */
1651 #ifndef PORT_TX_BUF_CRITICAL_WM
1652 #define PORT_TX_BUF_CRITICAL_WM 15
1655 /* The RFCOMM multiplexer preferred flow control mechanism. */
1656 #ifndef PORT_FC_DEFAULT
1657 #define PORT_FC_DEFAULT PORT_FC_CREDIT
1660 /* The maximum number of credits receiver sends to peer when using credit-based flow control. */
1661 #ifndef PORT_CREDIT_RX_MAX
1662 #define PORT_CREDIT_RX_MAX 16
1665 /* The credit low watermark level. */
1666 #ifndef PORT_CREDIT_RX_LOW
1667 #define PORT_CREDIT_RX_LOW 8
1670 /* Test code allowing l2cap FEC on RFCOMM.*/
1671 #ifndef PORT_ENABLE_L2CAP_FCR_TEST
1672 #define PORT_ENABLE_L2CAP_FCR_TEST FALSE
1675 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1676 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_lock() or GKI_disable() */
1677 #ifndef PORT_SCHEDULE_LOCK
1678 #define PORT_SCHEDULE_LOCK GKI_disable()
1681 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1682 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_unlock() or GKI_enable() */
1683 #ifndef PORT_SCHEDULE_UNLOCK
1684 #define PORT_SCHEDULE_UNLOCK GKI_enable()
1687 /******************************************************************************
1691 ******************************************************************************/
1693 #ifndef TCS_INCLUDED
1694 #define TCS_INCLUDED FALSE
1697 /* If set to TRUE, gives lean TCS state machine configuration. */
1699 #define TCS_LEAN FALSE
1702 /* To include/exclude point-to-multipoint broadcast SETUP configuration. */
1703 #ifndef TCS_BCST_SETUP_INCLUDED
1704 #define TCS_BCST_SETUP_INCLUDED TRUE
1707 /* To include/exclude supplementary services. */
1708 #ifndef TCS_SUPP_SVCS_INCLUDED
1709 #define TCS_SUPP_SVCS_INCLUDED TRUE
1712 /* To include/exclude WUG master role. */
1713 #ifndef TCS_WUG_MASTER_INCLUDED
1714 #define TCS_WUG_MASTER_INCLUDED TRUE
1717 /* To include/exclude WUG member role. */
1718 #ifndef TCS_WUG_MEMBER_INCLUDED
1719 #define TCS_WUG_MEMBER_INCLUDED TRUE
1722 /* Maximum number of WUG members. */
1723 #ifndef TCS_MAX_WUG_MEMBERS
1724 #define TCS_MAX_WUG_MEMBERS 7
1727 /* Broadcom specific acknowledgement message to ensure fast and robust operation of WUG FIMA procedure. */
1728 #ifndef TCS_WUG_LISTEN_ACPT_ACK_INCLUDED
1729 #define TCS_WUG_LISTEN_ACPT_ACK_INCLUDED TRUE
1732 /* The number of simultaneous calls supported. */
1733 #ifndef TCS_MAX_NUM_SIMUL_CALLS
1734 #define TCS_MAX_NUM_SIMUL_CALLS 3
1737 /* The number of devices the device can connect to. */
1738 #ifndef TCS_MAX_NUM_ACL_CONNS
1739 #define TCS_MAX_NUM_ACL_CONNS 7
1742 /* The maximum length, in bytes, of the company specific information element. */
1743 #ifndef TCS_MAX_CO_SPEC_LEN
1744 #define TCS_MAX_CO_SPEC_LEN 40
1747 /* The maximum length, in bytes, of the audio control information element . */
1748 #ifndef TCS_MAX_AUDIO_CTL_LEN
1749 #define TCS_MAX_AUDIO_CTL_LEN 40
1752 /* (Dis)allow EDR ESCO */
1753 #ifndef TCS_AUDIO_USE_ESCO_EDR
1754 #define TCS_AUDIO_USE_ESCO_EDR FALSE
1757 /******************************************************************************
1761 ******************************************************************************/
1762 #ifndef OBX_INCLUDED
1763 #define OBX_INCLUDED FALSE
1766 #ifndef OBX_CLIENT_INCLUDED
1767 #define OBX_CLIENT_INCLUDED TRUE
1770 #ifndef OBX_SERVER_INCLUDED
1771 #define OBX_SERVER_INCLUDED TRUE
1774 /* TRUE to include OBEX authentication/MD5 code */
1775 #ifndef OBX_MD5_INCLUDED
1776 #define OBX_MD5_INCLUDED TRUE
1779 /* TRUE to include OBEX authentication/MD5 test code */
1780 #ifndef OBX_MD5_TEST_INCLUDED
1781 #define OBX_MD5_TEST_INCLUDED FALSE
1784 /* TRUE to include OBEX 1.4 enhancement (including Obex Over L2CAP) */
1785 #ifndef OBX_14_INCLUDED
1786 #define OBX_14_INCLUDED FALSE
1788 /* MD5 code is required to use OBEX 1.4 features (Reliable session) */
1789 #if (OBX_MD5_INCLUDED == FALSE)
1790 #undef OBX_14_INCLUDED
1791 #define OBX_14_INCLUDED FALSE
1794 /* L2CAP FCR/eRTM mode is required to use OBEX Over L2CAP */
1795 #if (L2CAP_FCR_INCLUDED == FALSE)
1796 #undef OBX_14_INCLUDED
1797 #define OBX_14_INCLUDED FALSE
1800 /* The timeout value (in seconds) for reliable sessions to remain in suspend. 0xFFFFFFFF for no timeout event. */
1801 #ifndef OBX_SESS_TIMEOUT_VALUE
1802 #define OBX_SESS_TIMEOUT_VALUE 600
1805 /* The idle timeout value. 0 for no timeout event. */
1806 #ifndef OBX_TIMEOUT_VALUE
1807 #define OBX_TIMEOUT_VALUE 60
1810 /* Timeout value used for disconnect */
1811 #ifndef OBX_DISC_TOUT_VALUE
1812 #define OBX_DISC_TOUT_VALUE 5
1815 /* The maximum number of registered servers. */
1816 #ifndef OBX_NUM_SERVERS
1817 #define OBX_NUM_SERVERS 12
1820 /* The maximum number of sessions per registered server. */
1821 #ifndef OBX_MAX_SR_SESSION
1822 #define OBX_MAX_SR_SESSION 4
1825 /* The maximum number of sessions for all registered servers.
1826 * (must be equal or bigger than OBX_NUM_SERVERS) */
1827 #ifndef OBX_NUM_SR_SESSIONS
1828 #define OBX_NUM_SR_SESSIONS 26
1831 /* The maximum number of sessions per registered server.
1832 * must be less than MAX_BD_CONNECTIONS */
1833 #ifndef OBX_MAX_SR_SESSION
1834 #define OBX_MAX_SR_SESSION 4
1837 /* The maximum number of suspended sessions per registered servers. */
1838 #ifndef OBX_MAX_SUSPEND_SESSIONS
1839 #define OBX_MAX_SUSPEND_SESSIONS 4
1842 /* The maximum number of active clients. */
1843 #ifndef OBX_NUM_CLIENTS
1844 #define OBX_NUM_CLIENTS 8
1847 /* The maximum length of OBEX target header.*/
1848 #ifndef OBX_MAX_TARGET_LEN
1849 #define OBX_MAX_TARGET_LEN 16
1852 /* The maximum length of authentication challenge realm.*/
1853 #ifndef OBX_MAX_REALM_LEN
1854 #define OBX_MAX_REALM_LEN 30
1857 /* The maximum of GKI buffer queued at OBX before flow control L2CAP */
1858 #ifndef OBX_MAX_RX_QUEUE_COUNT
1859 #define OBX_MAX_RX_QUEUE_COUNT 3
1862 /* This option is application when OBX_14_INCLUDED=TRUE
1863 Pool ID where to reassemble the SDU.
1864 This Pool will allow buffers to be used that are larger than
1865 the L2CAP_MAX_MTU. */
1866 #ifndef OBX_USER_RX_POOL_ID
1867 #define OBX_USER_RX_POOL_ID OBX_LRG_DATA_POOL_ID
1870 /* This option is application when OBX_14_INCLUDED=TRUE
1871 Pool ID where to hold the SDU.
1872 This Pool will allow buffers to be used that are larger than
1873 the L2CAP_MAX_MTU. */
1874 #ifndef OBX_USER_TX_POOL_ID
1875 #define OBX_USER_TX_POOL_ID OBX_LRG_DATA_POOL_ID
1878 /* This option is application when OBX_14_INCLUDED=TRUE
1879 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
1881 #ifndef OBX_FCR_RX_POOL_ID
1882 #define OBX_FCR_RX_POOL_ID HCI_ACL_POOL_ID
1885 /* This option is application when OBX_14_INCLUDED=TRUE
1886 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
1887 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
1888 Note: This pool needs to have enough buffers to hold two times the window size negotiated
1889 in the L2CA_SetFCROptions (2 * tx_win_size) to allow for retransmissions.
1890 The size of each buffer must be able to hold the maximum MPS segment size passed in
1891 L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1893 #ifndef OBX_FCR_TX_POOL_ID
1894 #define OBX_FCR_TX_POOL_ID HCI_ACL_POOL_ID
1897 /* This option is application when OBX_14_INCLUDED=TRUE
1898 Size of the transmission window when using enhanced retransmission mode. Not used
1899 in basic and streaming modes. Range: 1 - 63
1901 #ifndef OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR
1902 #define OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR 20
1905 /* This option is application when OBX_14_INCLUDED=TRUE
1906 Number of transmission attempts for a single I-Frame before taking
1907 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1910 0 - infinite retransmissions
1911 1 - single transmission
1913 #ifndef OBX_FCR_OPT_MAX_TX_B4_DISCNT
1914 #define OBX_FCR_OPT_MAX_TX_B4_DISCNT 20
1917 /* This option is application when OBX_14_INCLUDED=TRUE
1918 Retransmission Timeout
1919 Range: Minimum 2000 (2 secs) on BR/EDR when supporting PBF.
1921 #ifndef OBX_FCR_OPT_RETX_TOUT
1922 #define OBX_FCR_OPT_RETX_TOUT 2000
1925 /* This option is application when OBX_14_INCLUDED=TRUE
1927 Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
1929 #ifndef OBX_FCR_OPT_MONITOR_TOUT
1930 #define OBX_FCR_OPT_MONITOR_TOUT 12000
1933 /******************************************************************************
1937 ******************************************************************************/
1939 #ifndef BNEP_INCLUDED
1940 #define BNEP_INCLUDED TRUE
1943 /* Protocol filtering is an optional feature. Bydefault it will be turned on */
1944 #ifndef BNEP_SUPPORTS_PROT_FILTERS
1945 #define BNEP_SUPPORTS_PROT_FILTERS TRUE
1948 /* Multicast filtering is an optional feature. Bydefault it will be turned on */
1949 #ifndef BNEP_SUPPORTS_MULTI_FILTERS
1950 #define BNEP_SUPPORTS_MULTI_FILTERS TRUE
1953 /* BNEP status API call is used mainly to get the L2CAP handle */
1954 #ifndef BNEP_SUPPORTS_STATUS_API
1955 #define BNEP_SUPPORTS_STATUS_API TRUE
1958 /* This is just a debug function */
1959 #ifndef BNEP_SUPPORTS_DEBUG_DUMP
1960 #define BNEP_SUPPORTS_DEBUG_DUMP TRUE
1963 #ifndef BNEP_SUPPORTS_ALL_UUID_LENGTHS
1964 #define BNEP_SUPPORTS_ALL_UUID_LENGTHS TRUE /* Otherwise it will support only 16bit UUIDs */
1968 ** When BNEP connection changes roles after the connection is established
1969 ** we will do an authentication check again on the new role
1971 #ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH
1972 #define BNEP_DO_AUTH_FOR_ROLE_SWITCH TRUE
1976 /* Maximum number of protocol filters supported. */
1977 #ifndef BNEP_MAX_PROT_FILTERS
1978 #define BNEP_MAX_PROT_FILTERS 5
1981 /* Maximum number of multicast filters supported. */
1982 #ifndef BNEP_MAX_MULTI_FILTERS
1983 #define BNEP_MAX_MULTI_FILTERS 5
1986 /* Minimum MTU size. */
1987 #ifndef BNEP_MIN_MTU_SIZE
1988 #define BNEP_MIN_MTU_SIZE L2CAP_MTU_SIZE
1991 /* Preferred MTU size. */
1992 #ifndef BNEP_MTU_SIZE
1993 #define BNEP_MTU_SIZE BNEP_MIN_MTU_SIZE
1996 /* Maximum size of user data, in bytes. */
1997 #ifndef BNEP_MAX_USER_DATA_SIZE
1998 #define BNEP_MAX_USER_DATA_SIZE 1500
2001 /* Maximum number of buffers allowed in transmit data queue. */
2002 #ifndef BNEP_MAX_XMITQ_DEPTH
2003 #define BNEP_MAX_XMITQ_DEPTH 20
2006 /* Maximum number BNEP of connections supported. */
2007 #ifndef BNEP_MAX_CONNECTIONS
2008 #define BNEP_MAX_CONNECTIONS 7
2012 /******************************************************************************
2016 ******************************************************************************/
2018 #ifndef AVDT_INCLUDED
2019 #define AVDT_INCLUDED TRUE
2022 /* Include reporting capability in AVDTP */
2023 #ifndef AVDT_REPORTING
2024 #define AVDT_REPORTING TRUE
2027 /* Include multiplexing capability in AVDTP */
2028 #ifndef AVDT_MULTIPLEXING
2029 #define AVDT_MULTIPLEXING TRUE
2032 /* Number of simultaneous links to different peer devices. */
2033 #ifndef AVDT_NUM_LINKS
2034 #define AVDT_NUM_LINKS 2
2037 /* Number of simultaneous stream endpoints. */
2038 #ifndef AVDT_NUM_SEPS
2039 #define AVDT_NUM_SEPS 3
2042 /* Number of transport channels setup per media stream(audio or video) */
2043 #ifndef AVDT_NUM_CHANNELS
2045 #if AVDT_REPORTING == TRUE
2046 /* signaling, media and reporting channels */
2047 #define AVDT_NUM_CHANNELS 3
2049 /* signaling and media channels */
2050 #define AVDT_NUM_CHANNELS 2
2055 /* Number of transport channels setup by AVDT for all media streams
2056 * AVDT_NUM_CHANNELS * Number of simultaneous streams.
2058 #ifndef AVDT_NUM_TC_TBL
2059 #define AVDT_NUM_TC_TBL 6
2063 /* Maximum size in bytes of the codec capabilities information element. */
2064 #ifndef AVDT_CODEC_SIZE
2065 #define AVDT_CODEC_SIZE 10
2068 /* Maximum size in bytes of the content protection information element. */
2069 #ifndef AVDT_PROTECT_SIZE
2070 #define AVDT_PROTECT_SIZE 90
2073 /* Maximum number of GKI buffers in the fragment queue (for video frames).
2074 * Must be less than the number of buffers in the buffer pool of size AVDT_DATA_POOL_SIZE */
2075 #ifndef AVDT_MAX_FRAG_COUNT
2076 #define AVDT_MAX_FRAG_COUNT 15
2079 /******************************************************************************
2083 ******************************************************************************/
2085 #ifndef PAN_INCLUDED
2086 #define PAN_INCLUDED TRUE
2089 /* This will enable the PANU role */
2090 #ifndef PAN_SUPPORTS_ROLE_PANU
2091 #define PAN_SUPPORTS_ROLE_PANU TRUE
2094 /* This will enable the GN role */
2095 #ifndef PAN_SUPPORTS_ROLE_GN
2096 #define PAN_SUPPORTS_ROLE_GN TRUE
2099 /* This will enable the NAP role */
2100 #ifndef PAN_SUPPORTS_ROLE_NAP
2101 #define PAN_SUPPORTS_ROLE_NAP TRUE
2104 /* This is just for debugging purposes */
2105 #ifndef PAN_SUPPORTS_DEBUG_DUMP
2106 #define PAN_SUPPORTS_DEBUG_DUMP TRUE
2110 /* Maximum number of PAN connections allowed */
2111 #ifndef MAX_PAN_CONNS
2112 #define MAX_PAN_CONNS 7
2115 /* Default service name for NAP role */
2116 #ifndef PAN_NAP_DEFAULT_SERVICE_NAME
2117 #define PAN_NAP_DEFAULT_SERVICE_NAME "Network Access Point Service"
2120 /* Default service name for GN role */
2121 #ifndef PAN_GN_DEFAULT_SERVICE_NAME
2122 #define PAN_GN_DEFAULT_SERVICE_NAME "Group Network Service"
2125 /* Default service name for PANU role */
2126 #ifndef PAN_PANU_DEFAULT_SERVICE_NAME
2127 #define PAN_PANU_DEFAULT_SERVICE_NAME "PAN User Service"
2130 /* Default description for NAP role service */
2131 #ifndef PAN_NAP_DEFAULT_DESCRIPTION
2132 #define PAN_NAP_DEFAULT_DESCRIPTION "NAP"
2135 /* Default description for GN role service */
2136 #ifndef PAN_GN_DEFAULT_DESCRIPTION
2137 #define PAN_GN_DEFAULT_DESCRIPTION "GN"
2140 /* Default description for PANU role service */
2141 #ifndef PAN_PANU_DEFAULT_DESCRIPTION
2142 #define PAN_PANU_DEFAULT_DESCRIPTION "PANU"
2145 /* Default Security level for PANU role. */
2146 #ifndef PAN_PANU_SECURITY_LEVEL
2147 #define PAN_PANU_SECURITY_LEVEL 0
2150 /* Default Security level for GN role. */
2151 #ifndef PAN_GN_SECURITY_LEVEL
2152 #define PAN_GN_SECURITY_LEVEL 0
2155 /* Default Security level for NAP role. */
2156 #ifndef PAN_NAP_SECURITY_LEVEL
2157 #define PAN_NAP_SECURITY_LEVEL 0
2163 /******************************************************************************
2167 ******************************************************************************/
2169 #ifndef GAP_INCLUDED
2170 #define GAP_INCLUDED TRUE
2173 /* This is set to enable use of GAP L2CAP connections. */
2174 #ifndef GAP_CONN_INCLUDED
2175 #define GAP_CONN_INCLUDED TRUE
2178 /* This is set to enable posting event for data write */
2179 #ifndef GAP_CONN_POST_EVT_INCLUDED
2180 #define GAP_CONN_POST_EVT_INCLUDED FALSE
2183 /* The maximum number of simultaneous GAP L2CAP connections. */
2184 #ifndef GAP_MAX_CONNECTIONS
2185 #define GAP_MAX_CONNECTIONS 8
2188 /******************************************************************************
2192 ******************************************************************************/
2194 #ifndef CTP_INCLUDED
2195 #define CTP_INCLUDED FALSE
2198 /* To include CTP gateway functionality or not. */
2199 #ifndef CTP_GW_INCLUDED
2200 #define CTP_GW_INCLUDED TRUE
2203 /* The number of terminals supported. */
2204 #ifndef CTP_MAX_NUM_TLS
2205 #define CTP_MAX_NUM_TLS 7
2208 /* If the controller can not support sniff mode when the SCO is up, set this to FALSE. */
2209 #ifndef CTP_USE_SNIFF_ON_SCO
2210 #define CTP_USE_SNIFF_ON_SCO FALSE
2213 /* 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. */
2214 #ifndef CTP_TL_IDLE_TIMEOUT
2215 #define CTP_TL_IDLE_TIMEOUT 90
2218 /* To include CTP terminal functionality or not. */
2219 #ifndef CTP_TL_INCLUDED
2220 #define CTP_TL_INCLUDED TRUE
2223 /* To include CTP device discovery functionality or not. */
2224 #ifndef CTP_DISCOVERY_INCLUDED
2225 #define CTP_DISCOVERY_INCLUDED TRUE
2228 /* set to TRUE for controllers that do not support multi-point */
2229 #ifndef CTP_TL_WAIT_DISC
2230 #define CTP_TL_WAIT_DISC TRUE
2233 /* The CTP inquiry database size. */
2234 #ifndef CTP_INQ_DB_SIZE
2235 #define CTP_INQ_DB_SIZE CTP_DISC_REC_SIZE
2238 /* The CTP discovery record size. */
2239 #ifndef CTP_DISC_REC_SIZE
2240 #define CTP_DISC_REC_SIZE 60
2243 /* CTP TL would try to re-establish L2CAP channel after channel is disconnected for this amount of seconds. */
2244 #ifndef CTP_GUARD_LINK_LOST
2245 #define CTP_GUARD_LINK_LOST 1
2248 /* The link policy bitmap. */
2249 #ifndef CTP_DEFAULT_LINK_POLICY
2250 #define CTP_DEFAULT_LINK_POLICY 0x000F
2253 /* The minimum period interval used for the sniff and park modes. */
2254 #ifndef CTP_DEF_LOWPWR_MIN_PERIOD
2255 #define CTP_DEF_LOWPWR_MIN_PERIOD 0x100
2258 /* The maximum period interval used for the sniff and park modes. */
2259 #ifndef CTP_DEF_LOWPWR_MAX_PERIOD
2260 #define CTP_DEF_LOWPWR_MAX_PERIOD 0x1E0
2263 /* The number of baseband receive slot sniff attempts. */
2264 #ifndef CTP_DEF_LOWPWR_ATTEMPT
2265 #define CTP_DEF_LOWPWR_ATTEMPT 0x200
2268 /* The number of baseband receive slots for sniff timeout. */
2269 #ifndef CTP_DEF_LOWPWR_TIMEOUT
2270 #define CTP_DEF_LOWPWR_TIMEOUT 0x200
2273 /* This is set if CTP is to use park mode. */
2274 #ifndef CTP_PARK_INCLUDED
2275 #define CTP_PARK_INCLUDED TRUE
2278 /* This is set if CTP is to use sniff mode. */
2279 #ifndef CTP_SNIFF_INCLUDED
2280 #define CTP_SNIFF_INCLUDED TRUE
2283 /* To include CTP data exchange functionality or not. */
2284 #ifndef CTP_DATA_EXCHG_FEATURE
2285 #define CTP_DATA_EXCHG_FEATURE FALSE
2288 /* To include CTP GW intercom functionality or not. */
2289 #ifndef CTP_GW_INTERCOM_FEATURE
2290 #define CTP_GW_INTERCOM_FEATURE FALSE
2293 /* The MTU size for L2CAP channel. */
2294 #ifndef CTP_MTU_SIZE
2295 #define CTP_MTU_SIZE 200
2298 /* The L2CAP PSM for the data exchange feature. */
2299 #ifndef CTP_DATA_EXCHG_PSM
2300 #define CTP_DATA_EXCHG_PSM 13
2303 /* The flush timeout for L2CAP channels. */
2304 #ifndef CTP_FLUSH_TO
2305 #define CTP_FLUSH_TO 0xFFFF
2308 /* The default service name for CTP. */
2309 #ifndef CTP_DEFAULT_SERVICE_NAME
2310 #define CTP_DEFAULT_SERVICE_NAME "Cordless Telephony"
2313 /* The CTP security level. */
2314 #ifndef CTP_SECURITY_LEVEL
2315 #define CTP_SECURITY_LEVEL (BTM_SEC_IN_AUTHORIZE | BTM_SEC_IN_AUTHENTICATE | BTM_SEC_IN_ENCRYPT)
2318 /* The number of lines to the external network. */
2319 #ifndef CTP_MAX_LINES
2320 #define CTP_MAX_LINES 1
2323 /* Test if the number of resources in TCS is consistent with CTP setting. */
2324 #ifndef CTP_TEST_FULL_TCS
2325 #define CTP_TEST_FULL_TCS TRUE
2328 /* The default inquiry mode. */
2329 #ifndef CTP_DEFAULT_INQUIRY_MODE
2330 #define CTP_DEFAULT_INQUIRY_MODE BTM_GENERAL_INQUIRY
2333 /* The default inquiry duration. */
2334 #ifndef CTP_DEFAULT_INQ_DURATION
2335 #define CTP_DEFAULT_INQ_DURATION 4
2338 /* The maximum number of inquiry responses. */
2339 #ifndef CTP_DEFAULT_INQ_MAX_RESP
2340 #define CTP_DEFAULT_INQ_MAX_RESP 3
2343 /* When TL does not create another L2CAP channel within this period of time GW declares that it's "Connected Limited". */
2344 #ifndef CTP_TL_CONN_TIMEOUT
2345 #define CTP_TL_CONN_TIMEOUT 5
2348 /* The delay for ACL to completely disconnect (for intercom) before sending the connect request to GW. */
2349 #ifndef CTP_RECONNECT_DELAY
2350 #define CTP_RECONNECT_DELAY 5
2353 /* How many times to retry connection when it has failed. */
2354 #ifndef CTP_RETRY_ON_CONN_ERR
2355 #define CTP_RETRY_ON_CONN_ERR 5
2358 /******************************************************************************
2362 ******************************************************************************/
2364 #ifndef ICP_INCLUDED
2365 #define ICP_INCLUDED FALSE
2368 /* The ICP default MTU. */
2369 #ifndef ICP_MTU_SIZE
2370 #define ICP_MTU_SIZE 100
2373 /* The ICP security level. */
2374 #ifndef ICP_SECURITY_LEVEL
2375 #define ICP_SECURITY_LEVEL BTM_SEC_NONE
2378 /* The default service name for ICP. */
2379 #ifndef ICP_DEFAULT_SERVICE_NAME
2380 #define ICP_DEFAULT_SERVICE_NAME "Intercom"
2383 /* The flush timeout for L2CAP channels. */
2384 #ifndef ICP_FLUSH_TO
2385 #define ICP_FLUSH_TO 0xFFFF
2388 /******************************************************************************
2392 ******************************************************************************/
2394 #ifndef SPP_INCLUDED
2395 #define SPP_INCLUDED FALSE
2398 /* The SPP default MTU. */
2399 #ifndef SPP_DEFAULT_MTU
2400 #define SPP_DEFAULT_MTU 127
2403 /* The interval, in seconds, that a client tries to reconnect to a service. */
2404 #ifndef SPP_RETRY_CONN_INTERVAL
2405 #define SPP_RETRY_CONN_INTERVAL 1
2408 /* The SPP discoverable mode: limited or general. */
2409 #ifndef SPP_DISCOVERABLE_MODE
2410 #define SPP_DISCOVERABLE_MODE BTM_GENERAL_DISCOVERABLE
2413 /* The maximum number of inquiry results returned in by inquiry procedure. */
2414 #ifndef SPP_DEF_INQ_MAX_RESP
2415 #define SPP_DEF_INQ_MAX_RESP 10
2418 /* The SPP discovery record size. */
2419 #ifndef SPP_DISC_REC_SIZE
2420 #define SPP_DISC_REC_SIZE 60
2423 #ifndef SPP_MAX_RECS_PER_DEVICE
2424 #define SPP_MAX_RECS_PER_DEVICE (SPP_DB_SIZE / SPP_DISC_REC_SIZE)
2427 /* Inquiry duration in 1.28 second units. */
2428 #ifndef SPP_DEF_INQ_DURATION
2429 #define SPP_DEF_INQ_DURATION 9
2432 /* keep the raw data received from SDP server in database. */
2433 #ifndef SDP_RAW_DATA_INCLUDED
2434 #define SDP_RAW_DATA_INCLUDED TRUE
2437 /* TRUE, to allow JV to create L2CAP connection on SDP PSM. */
2438 #ifndef SDP_FOR_JV_INCLUDED
2439 #define SDP_FOR_JV_INCLUDED FALSE
2442 /* Inquiry duration in 1.28 second units. */
2444 #define SDP_DEBUG TRUE
2447 /******************************************************************************
2451 ******************************************************************************/
2453 #ifndef HSP2_INCLUDED
2454 #define HSP2_INCLUDED FALSE
2457 /* Include the ability to perform inquiry for peer devices. */
2458 #ifndef HSP2_INQUIRY_INCLUDED
2459 #define HSP2_INQUIRY_INCLUDED TRUE
2462 /* Include Audio Gateway specific code. */
2463 #ifndef HSP2_AG_INCLUDED
2464 #define HSP2_AG_INCLUDED TRUE
2467 /* Include Headset Specific Code. */
2468 #ifndef HSP2_HS_INCLUDED
2469 #define HSP2_HS_INCLUDED TRUE
2472 /* Include the ability to open an SCO connection for In-Band Ringing. */
2473 #ifndef HSP2_IB_RING_INCLUDED
2474 #define HSP2_IB_RING_INCLUDED TRUE
2477 /* Include the ability to repeat a ring. */
2478 #ifndef HSP2_AG_REPEAT_RING
2479 #define HSP2_AG_REPEAT_RING TRUE
2482 #ifndef HSP2_APP_CLOSES_ON_CKPD
2483 #define HSP2_APP_CLOSES_ON_CKPD FALSE
2487 /* Include the ability to park a connection. */
2488 #ifndef HSP2_PARK_INCLUDED
2489 #define HSP2_PARK_INCLUDED TRUE
2492 /* Include HSP State Machine debug trace messages. */
2493 #ifndef HSP2_FSM_DEBUG
2494 #define HSP2_FSM_DEBUG TRUE
2497 /* The Module's Inquiry Scan Window. */
2498 #ifndef HSP2_INQ_SCAN_WINDOW
2499 #define HSP2_INQ_SCAN_WINDOW 0
2502 /* The Module's Inquiry Scan Interval. */
2503 #ifndef HSP2_INQ_SCAN_INTERVAL
2504 #define HSP2_INQ_SCAN_INTERVAL 0
2507 /* The Module's Page Scan Interval. */
2508 #ifndef HSP2_PAGE_SCAN_INTERVAL
2509 #define HSP2_PAGE_SCAN_INTERVAL 0
2512 /* The Module's Page Scan Window. */
2513 #ifndef HSP2_PAGE_SCAN_WINDOW
2514 #define HSP2_PAGE_SCAN_WINDOW 0
2517 /* The Park Mode's Minimum Beacon Period. */
2518 #ifndef HSP2_BEACON_MIN_PERIOD
2519 #define HSP2_BEACON_MIN_PERIOD 450
2522 /* The Park Mode's Maximum Beacon Period. */
2523 #ifndef HSP2_BEACON_MAX_PERIOD
2524 #define HSP2_BEACON_MAX_PERIOD 500
2527 /* The duration of the inquiry in seconds. */
2528 #ifndef HSP2_INQ_DURATION
2529 #define HSP2_INQ_DURATION 4
2532 /* Maximum number of peer responses during an inquiry. */
2533 #ifndef HSP2_INQ_MAX_NUM_RESPS
2534 #define HSP2_INQ_MAX_NUM_RESPS 3
2537 /* Maximum number of times to retry an inquiry prior to failure. */
2538 #ifndef HSP2_MAX_INQ_RETRY
2539 #define HSP2_MAX_INQ_RETRY 6
2542 /* Maximum number of times to retry an RFCOMM connection prior to failure. */
2543 #ifndef HSP2_MAX_CONN_RETRY
2544 #define HSP2_MAX_CONN_RETRY 3
2547 /* If the connect request failed for authentication reasons, do not retry */
2548 #ifndef HSP2_NO_RETRY_ON_AUTH_FAIL
2549 #define HSP2_NO_RETRY_ON_AUTH_FAIL TRUE
2552 /* Maximum number of characters in an HSP2 device name. */
2553 #ifndef HSP2_MAX_NAME_LEN
2554 #define HSP2_MAX_NAME_LEN 32
2557 /* The minimum speaker and/or microphone gain setting. */
2558 #ifndef HSP2_MIN_GAIN
2559 #define HSP2_MIN_GAIN 0
2562 /* The maximum speaker and/or microphone setting. */
2563 #ifndef HSP2_MAX_GAIN
2564 #define HSP2_MAX_GAIN 15
2567 /* The default value to send on an AT+CKPD. */
2568 #ifndef HSP2_KEYPRESS_DEFAULT
2569 #define HSP2_KEYPRESS_DEFAULT 200
2572 /* Maximum amount a data that can be received per RFCOMM frame. */
2573 #ifndef HSP2_MAX_RFC_READ_LEN
2574 #define HSP2_MAX_RFC_READ_LEN 128
2577 /* The time in seconds to wait for completion of a partial AT command or response from the peer. */
2578 #ifndef HSP2_AT_TO_INTERVAL
2579 #define HSP2_AT_TO_INTERVAL 30
2582 /* The time to wait before repeating a ring to a peer Headset. */
2583 #ifndef HSP2_REPEAT_RING_TO
2584 #define HSP2_REPEAT_RING_TO 4
2587 /* Time to wait for a response for an AT command */
2588 #ifndef HSP2_AT_RSP_TO
2589 #define HSP2_AT_RSP_TO 20
2592 /* SCO packet type(s) to use (bitmask: see spec), 0 - device default (recommended) */
2593 #ifndef HSP2_SCO_PKT_TYPES
2594 #define HSP2_SCO_PKT_TYPES ((UINT16)0x0000)
2597 /* The default settings of the SCO voice link. */
2598 #ifndef HSP2_DEFAULT_VOICE_SETTINGS
2599 #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)
2602 #ifndef HSP2_MAX_AT_CMD_LENGTH
2603 #define HSP2_MAX_AT_CMD_LENGTH 16
2606 #ifndef HSP2_MAX_AT_VAL_LENGTH
2607 #if (defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE)
2608 #define HSP2_MAX_AT_VAL_LENGTH 310
2610 #define HSP2_MAX_AT_VAL_LENGTH 5
2615 #ifndef HSP2_SDP_DB_SIZE
2616 #define HSP2_SDP_DB_SIZE 300
2620 /******************************************************************************
2624 ******************************************************************************/
2626 #ifndef HFP_INCLUDED
2627 #define HFP_INCLUDED FALSE
2630 /* Include Audio Gateway specific code. */
2631 #ifndef HFP_AG_INCLUDED
2632 #define HFP_AG_INCLUDED TRUE
2635 /* Include Hand Free Specific Code. */
2636 #ifndef HFP_HF_INCLUDED
2637 #define HFP_HF_INCLUDED TRUE
2640 /* Use AT interface instead of full blown API */
2641 #ifndef AT_INTERFACE
2642 #define AT_INTERFACE FALSE
2645 /* HFP Manages SCO establishement for various procedures */
2646 #ifndef HFP_SCO_MGMT_INCLUDED
2647 #define HFP_SCO_MGMT_INCLUDED TRUE
2650 /* CCAP compliant features and behavior desired */
2651 #ifndef CCAP_COMPLIANCE
2652 #define CCAP_COMPLIANCE TRUE
2655 /* Caller ID string, part of +CLIP result code */
2656 #ifndef HFP_MAX_CLIP_INFO
2657 #define HFP_MAX_CLIP_INFO 45
2660 #ifndef HFP_RPT_PEER_INFO_INCLUDED
2661 #define HFP_RPT_PEER_INFO_INCLUDED TRUE /* Reporting of peer features enabled */
2664 /******************************************************************************
2668 ******************************************************************************/
2670 /* HID Device Role Included */
2671 #ifndef HID_DEV_INCLUDED
2672 #define HID_DEV_INCLUDED FALSE
2675 #ifndef HID_DEV_PM_INCLUDED
2676 #define HID_DEV_PM_INCLUDED TRUE
2679 /* The HID Device is a virtual cable */
2680 #ifndef HID_DEV_VIRTUAL_CABLE
2681 #define HID_DEV_VIRTUAL_CABLE TRUE
2684 /* The HID device initiates the reconnections */
2685 #ifndef HID_DEV_RECONN_INITIATE
2686 #define HID_DEV_RECONN_INITIATE TRUE
2689 /* THe HID device is normally connectable */
2690 #ifndef HID_DEV_NORMALLY_CONN
2691 #define HID_DEV_NORMALLY_CONN FALSE
2694 /* The device is battery powered */
2695 #ifndef HID_DEV_BATTERY_POW
2696 #define HID_DEV_BATTERY_POW TRUE
2699 /* Device is capable of waking up the host */
2700 #ifndef HID_DEV_REMOTE_WAKE
2701 #define HID_DEV_REMOTE_WAKE TRUE
2704 /* Device needs host to close SDP channel after SDP is over */
2705 #ifndef HID_DEV_SDP_DISABLE
2706 #define HID_DEV_SDP_DISABLE TRUE
2709 #ifndef HID_DEV_MTU_SIZE
2710 #define HID_DEV_MTU_SIZE 64
2713 #ifndef HID_DEV_FLUSH_TO
2714 #define HID_DEV_FLUSH_TO 0xffff
2717 #ifndef HID_DEV_PAGE_SCAN_WIN
2718 #define HID_DEV_PAGE_SCAN_WIN (0)
2721 #ifndef HID_DEV_PAGE_SCAN_INT
2722 #define HID_DEV_PAGE_SCAN_INT (0)
2725 #ifndef HID_DEV_MAX_CONN_RETRY
2726 #define HID_DEV_MAX_CONN_RETRY (15)
2729 #ifndef HID_DEV_REPAGE_WIN
2730 #define HID_DEV_REPAGE_WIN (1)
2733 #ifndef HID_DEV_SVC_NAME
2734 #define HID_DEV_SVC_NAME "HID"
2737 #ifndef HID_DEV_SVC_DESCR
2738 #define HID_DEV_SVC_DESCR "3-button mouse and keyboard"
2741 #ifndef HID_DEV_PROVIDER_NAME
2742 #define HID_DEV_PROVIDER_NAME "Widcomm"
2745 #ifndef HID_DEV_REL_NUM
2746 #define HID_DEV_REL_NUM 0x0100
2749 #ifndef HID_DEV_PARSER_VER
2750 #define HID_DEV_PARSER_VER 0x0111
2753 #ifndef HID_DEV_SUBCLASS
2754 #define HID_DEV_SUBCLASS COD_MINOR_POINTING
2757 #ifndef HID_DEV_COUNTRY_CODE
2758 #define HID_DEV_COUNTRY_CODE 0x33
2761 #ifndef HID_DEV_SUP_TOUT
2762 #define HID_DEV_SUP_TOUT 0x8000
2765 #ifndef HID_DEV_NUM_LANGS
2766 #define HID_DEV_NUM_LANGS 1
2769 #ifndef HID_DEV_INACT_TIMEOUT
2770 #define HID_DEV_INACT_TIMEOUT 60
2773 #ifndef HID_DEV_BUSY_MODE_PARAMS
2774 #define HID_DEV_BUSY_MODE_PARAMS { 320, 160, 10, 20, HCI_MODE_ACTIVE }
2777 #ifndef HID_DEV_IDLE_MODE_PARAMS
2778 #define HID_DEV_IDLE_MODE_PARAMS { 320, 160, 10, 20, HCI_MODE_SNIFF }
2781 #ifndef HID_DEV_SUSP_MODE_PARAMS
2782 #define HID_DEV_SUSP_MODE_PARAMS { 640, 320, 0, 0, HCI_MODE_PARK }
2785 #ifndef HID_DEV_MAX_DESCRIPTOR_SIZE
2786 #define HID_DEV_MAX_DESCRIPTOR_SIZE 128 /* Max descriptor size */
2789 #ifndef HID_DEV_LANGUAGELIST
2790 #define HID_DEV_LANGUAGELIST {0x35, 0x06, 0x09, 0x04, 0x09, 0x09, 0x01, 0x00}
2793 #ifndef HID_DEV_LINK_SUPERVISION_TO
2794 #define HID_DEV_LINK_SUPERVISION_TO 0x8000
2797 #ifndef HID_CONTROL_POOL_ID
2798 #define HID_CONTROL_POOL_ID 2
2801 #ifndef HID_INTERRUPT_POOL_ID
2802 #define HID_INTERRUPT_POOL_ID 2
2805 /*************************************************************************
2806 ** Definitions for Both HID-Host & Device
2808 #ifndef HID_MAX_SVC_NAME_LEN
2809 #define HID_MAX_SVC_NAME_LEN 32
2812 #ifndef HID_MAX_SVC_DESCR_LEN
2813 #define HID_MAX_SVC_DESCR_LEN 32
2816 #ifndef HID_MAX_PROV_NAME_LEN
2817 #define HID_MAX_PROV_NAME_LEN 32
2820 /*************************************************************************
2821 ** Definitions for HID-Host
2823 #ifndef HID_HOST_INCLUDED
2824 #define HID_HOST_INCLUDED TRUE
2827 #ifndef HID_HOST_MAX_DEVICES
2828 #define HID_HOST_MAX_DEVICES 7
2831 #ifndef HID_HOST_MTU
2832 #define HID_HOST_MTU 640
2835 #ifndef HID_HOST_FLUSH_TO
2836 #define HID_HOST_FLUSH_TO 0xffff
2839 #ifndef HID_HOST_MAX_CONN_RETRY
2840 #define HID_HOST_MAX_CONN_RETRY (3)
2843 #ifndef HID_HOST_REPAGE_WIN
2844 #define HID_HOST_REPAGE_WIN (2)
2848 /******************************************************************************
2852 ******************************************************************************/
2854 #ifndef DUN_INCLUDED
2855 #define DUN_INCLUDED FALSE
2859 /******************************************************************************
2863 ******************************************************************************/
2865 #ifndef GOEP_INCLUDED
2866 #define GOEP_INCLUDED FALSE
2869 /* This is set to enable GOEP non-blocking file system access functions. */
2870 #ifndef GOEP_FS_INCLUDED
2871 #define GOEP_FS_INCLUDED FALSE
2874 /* GOEP authentication key size. */
2875 #ifndef GOEP_MAX_AUTH_KEY_SIZE
2876 #define GOEP_MAX_AUTH_KEY_SIZE 16
2879 /* Maximum size of the realm authentication string. */
2880 #ifndef GOEP_MAX_AUTH_REALM_SIZE
2881 #define GOEP_MAX_AUTH_REALM_SIZE 16
2884 /* Realm Character Set */
2885 #ifndef GOEP_REALM_CHARSET
2886 #define GOEP_REALM_CHARSET 0 /* ASCII */
2889 /* This is set to the maximum length of path name allowed in the system (_MAX_PATH). */
2890 #ifndef GOEP_MAX_PATH_SIZE
2891 #define GOEP_MAX_PATH_SIZE 255
2894 /* Specifies whether or not client's user id is required during obex authentication */
2895 #ifndef GOEP_SERVER_USERID_REQUIRED
2896 #define GOEP_SERVER_USERID_REQUIRED FALSE
2899 /* This is set to the maximum length of file name allowed in the system (_MAX_FNAME). */
2900 #ifndef GOEP_MAX_FILE_SIZE
2901 #define GOEP_MAX_FILE_SIZE 128
2904 /* Character used as path separator */
2905 #ifndef GOEP_PATH_SEPARATOR
2906 #define GOEP_PATH_SEPARATOR ((char) 0x5c) /* 0x2f ('/'), or 0x5c ('\') */
2909 /******************************************************************************
2913 ******************************************************************************/
2915 #ifndef OPP_INCLUDED
2916 #define OPP_INCLUDED FALSE
2919 /* This is set to enable OPP client capabilities. */
2920 #ifndef OPP_CLIENT_INCLUDED
2921 #define OPP_CLIENT_INCLUDED FALSE
2924 /* This is set to enable OPP server capabilities. */
2925 #ifndef OPP_SERVER_INCLUDED
2926 #define OPP_SERVER_INCLUDED FALSE
2929 /* if the optional formating functions are to be included or not */
2930 #ifndef OPP_FORMAT_INCLUDED
2931 #define OPP_FORMAT_INCLUDED FALSE
2934 /* Maximum number of client sessions allowed by server */
2935 #ifndef OPP_MAX_SRVR_SESS
2936 #define OPP_MAX_SRVR_SESS 3
2939 /******************************************************************************
2943 ******************************************************************************/
2945 #ifndef FTP_INCLUDED
2946 #define FTP_INCLUDED FALSE
2949 /* This is set to enable FTP client capabilities. */
2950 #ifndef FTP_CLIENT_INCLUDED
2951 #define FTP_CLIENT_INCLUDED TRUE
2954 /* This is set to enable FTP server capabilities. */
2955 #ifndef FTP_SERVER_INCLUDED
2956 #define FTP_SERVER_INCLUDED TRUE
2959 /******************************************************************************
2963 ******************************************************************************/
2965 #ifndef XML_STACK_SIZE
2966 #define XML_STACK_SIZE 7
2969 /******************************************************************************
2973 ******************************************************************************/
2975 #define BPP_DEBUG FALSE
2978 #ifndef BPP_INCLUDED
2979 #define BPP_INCLUDED FALSE
2982 #ifndef BPP_SND_INCLUDED
2983 #define BPP_SND_INCLUDED FALSE
2986 /* Maximum number of senders allowed to connect simultaneously
2987 ** The maximum is 6 or (OBX_NUM_SERVERS / 2), whichever is smaller
2989 #ifndef BPP_PR_MAX_CON
2990 #define BPP_PR_MAX_CON 3
2993 /* Service Name. maximum length: 248
2994 #ifndef BPP_SERVICE_NAME
2995 #define BPP_SERVICE_NAME "Basic Printing"
2998 /* Document Format Supported. ASCII comma-delimited list of MIME type:version string
2999 #ifndef BPP_DOC_FORMAT_SUPPORTED
3000 #define BPP_DOC_FORMAT_SUPPORTED "application/vnd.pwg-xhtml-print:1.0,application/vnd.hp-PCL:5E,application/PDF"
3003 #ifndef BPP_DOC_FORMAT_SUPPORTED_LEN
3004 #define BPP_DOC_FORMAT_SUPPORTED_LEN 77
3007 /* Character repertoires.
3008 #ifndef BPP_CHARACTER_REPERTOIRES
3009 #define BPP_CHARACTER_REPERTOIRES {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}
3013 #ifndef BPP_XHTML_PRINT_FORMATS
3014 #define BPP_XHTML_PRINT_FORMATS "image/gif:89A,image/jpeg"
3017 #ifndef BPP_XHTML_PRINT_FORMATS_LEN
3018 #define BPP_XHTML_PRINT_FORMATS_LEN 24
3022 #ifndef BPP_COLOR_SUPORTED
3023 #define BPP_COLOR_SUPORTED FALSE
3026 /* 1284 ID string. First 2 bytes are the length.
3028 #define BPP_1284ID "\x00\x48MANUFACTURER:ACME Manufacturing;COMMAND SET:PCL,MPL;MODEL:LaserBeam \?;"
3031 #ifndef BPP_1284ID_LEN
3032 #define BPP_1284ID_LEN 72
3036 #ifndef BPP_PRINTER_NAME
3037 #define BPP_PRINTER_NAME "My Printer"
3040 #ifndef BPP_PRINTER_NAME_LEN
3041 #define BPP_PRINTER_NAME_LEN 10
3045 /* Printer location.
3046 #ifndef BPP_PRINTER_LOCATION
3047 #define BPP_PRINTER_LOCATION "Hotel Lobby"
3050 #ifndef BPP_PRINTER_LOCATION_LEN
3051 #define BPP_PRINTER_LOCATION_LEN 11
3054 /* Duplex printing supported.
3055 #ifndef BPP_DUPLEX_SUPPORTED
3056 #define BPP_DUPLEX_SUPPORTED TRUE
3060 /* Media types supported.
3061 #ifndef BPP_MEDIA_TYPES_SUPPORTED
3062 #define BPP_MEDIA_TYPES_SUPPORTED "stationary,continuous-long,photographic-high-gloss,cardstock"
3065 #ifndef BPP_MEDIA_TYPES_SUPPORTED_LEN
3066 #define BPP_MEDIA_TYPES_SUPPORTED_LEN 60
3069 /* Maximum media with supported.
3070 #ifndef BPP_MAX_MEDIA_WIDTH
3071 #define BPP_MAX_MEDIA_WIDTH 205
3074 /* Maximum media length supported.
3075 #ifndef BPP_MAX_MEDIA_LENGTH
3076 #define BPP_MAX_MEDIA_LENGTH 285
3079 /* the maximum string len for the media size of medium loaded */
3080 #ifndef BPP_MEDIA_SIZE_LEN
3081 #define BPP_MEDIA_SIZE_LEN 33
3084 /* Debug Trace the SOAP object, if TRUE */
3085 #ifndef BPP_TRACE_XML
3086 #define BPP_TRACE_XML TRUE
3089 /* in case that the SOAP object does not all come in one OBEX packet,
3090 * this size of data may be kept in the BPP control block for continuing parsing.
3091 * The maximum is the size of the biggest GKI buffer (GKI_MAX_BUF_SIZE) */
3092 #ifndef BPP_SOAP_KEEP_SIZE
3093 #define BPP_SOAP_KEEP_SIZE 200
3097 /******************************************************************************
3101 ******************************************************************************/
3102 #ifndef BIP_INCLUDED
3103 #define BIP_INCLUDED FALSE
3106 /* TRUE to include imaging initiator */
3107 #ifndef BIP_INITR_INCLUDED
3108 #define BIP_INITR_INCLUDED FALSE
3111 /* TRUE to include imaging responder */
3112 #ifndef BIP_RSPDR_INCLUDED
3113 #define BIP_RSPDR_INCLUDED FALSE
3116 /* TRUE to include image push feature */
3117 #ifndef BIP_PUSH_INCLUDED
3118 #define BIP_PUSH_INCLUDED TRUE
3121 /* TRUE to include image pull feature */
3122 #ifndef BIP_PULL_INCLUDED
3123 #define BIP_PULL_INCLUDED TRUE
3126 /* TRUE to include advanced image printing feature */
3127 #ifndef BIP_PRINTING_INCLUDED
3128 #define BIP_PRINTING_INCLUDED TRUE
3131 /* TRUE to include automatic archive feature */
3132 #ifndef BIP_ARCHIVE_INCLUDED
3133 #define BIP_ARCHIVE_INCLUDED TRUE
3136 /* TRUE to include remote camera feature */
3137 #ifndef BIP_CAMERA_INCLUDED
3138 #define BIP_CAMERA_INCLUDED TRUE
3141 /* TRUE to include remote display feature */
3142 #ifndef BIP_DISPLAY_INCLUDED
3143 #define BIP_DISPLAY_INCLUDED TRUE
3146 /* TRUE to include sanity check code for API functions */
3147 #ifndef BIP_SANITY_CHECKS
3148 #define BIP_SANITY_CHECKS TRUE
3151 /* TRUE to show the received XML object in trace for conformance tests */
3152 #ifndef BIP_TRACE_XML
3153 #define BIP_TRACE_XML TRUE
3156 /* in case that the received XML object is not complete, the XML parser state machine needs
3157 * to keep a copy of the data from the last '<'
3158 * This macro specifies the maximun amount of data for this purpose */
3159 #ifndef BIP_XML_CARRY_OVER_LEN
3160 #define BIP_XML_CARRY_OVER_LEN 100
3163 /* minimum 4, maximum is 255. The value should be set to the maximum size of encoding string + 1. JPEG2000.
3164 * If vendor specific format is supported, it might be bigger than 9 */
3165 #ifndef BIP_IMG_ENCODE_SIZE
3166 #define BIP_IMG_ENCODE_SIZE 9
3169 /* MIME type: text/plain */
3170 #ifndef BIP_TYPE_SIZE
3171 #define BIP_TYPE_SIZE 20
3174 /* example: iso-8895-1 */
3175 #ifndef BIP_CHARSET_SIZE
3176 #define BIP_CHARSET_SIZE 10
3180 #ifndef BIP_FNAME_SIZE
3181 #define BIP_FNAME_SIZE 20
3185 #ifndef BIP_SNAME_SIZE
3186 #define BIP_SNAME_SIZE 60
3189 /* temporary storage file name(for file system access, may include path) */
3190 #ifndef BIP_TEMP_NAME_SIZE
3191 #define BIP_TEMP_NAME_SIZE 200
3194 /* image file name */
3195 #ifndef BIP_IMG_NAME_SIZE
3196 #define BIP_IMG_NAME_SIZE 200
3199 /* attachment file name */
3200 #ifndef BIP_ATT_NAME_SIZE
3201 #define BIP_ATT_NAME_SIZE 200
3204 /* object (image, attachment, thumbnail) file name (may be used for file system) */
3205 #ifndef BIP_OBJ_NAME_SIZE
3206 #define BIP_OBJ_NAME_SIZE 200
3211 /******************************************************************************
3215 ******************************************************************************/
3217 #ifndef HCRP_INCLUDED
3218 #define HCRP_INCLUDED FALSE
3221 /* This is set to enable server. */
3222 #ifndef HCRP_SERVER_INCLUDED
3223 #define HCRP_SERVER_INCLUDED FALSE
3226 /* This is set to enable client. */
3227 #ifndef HCRP_CLIENT_INCLUDED
3228 #define HCRP_CLIENT_INCLUDED FALSE
3231 /* TRUE enables the notification option of the profile. */
3232 #ifndef HCRP_NOTIFICATION_INCLUDED
3233 #define HCRP_NOTIFICATION_INCLUDED TRUE
3236 /* TRUE enables the vendor specific option of the profile. */
3237 #ifndef HCRP_VENDOR_SPEC_INCLUDED
3238 #define HCRP_VENDOR_SPEC_INCLUDED TRUE
3241 /* TRUE enables state machine traces. */
3242 #ifndef HCRP_FSM_DEBUG
3243 #define HCRP_FSM_DEBUG FALSE
3246 /* TRUE enables protocol message traces. */
3247 #ifndef HCRP_PROTO_DEBUG
3248 #define HCRP_PROTO_DEBUG FALSE
3251 /* Maximum length used to store the service name (Minimum 1). */
3252 #ifndef HCRP_MAX_SERVICE_NAME_LEN
3253 #define HCRP_MAX_SERVICE_NAME_LEN 32
3256 /* Maximum length used to store the device name (Minimum 1). */
3257 #ifndef HCRP_MAX_DEVICE_NAME_LEN
3258 #define HCRP_MAX_DEVICE_NAME_LEN 32
3261 /* Maximum length of device location (Minimum 1) */
3262 #ifndef HCRP_MAX_DEVICE_LOC_LEN
3263 #define HCRP_MAX_DEVICE_LOC_LEN 32
3266 /* Maximum length used to store the friendly name (Minimum 1). */
3267 #ifndef HCRP_MAX_FRIENDLY_NAME_LEN
3268 #define HCRP_MAX_FRIENDLY_NAME_LEN 32
3271 /* Maximum length used to store the 1284 id string (Minimum 2 byte length field). */
3272 #ifndef HCRP_MAX_SDP_1284_ID_LEN
3273 #define HCRP_MAX_SDP_1284_ID_LEN 128
3276 /* Maximum length for parameters to be processed for vendor specific commands. */
3277 #ifndef HCRP_MAX_VEND_SPEC_LEN
3278 #define HCRP_MAX_VEND_SPEC_LEN 4
3281 /* Number of seconds to wait for 2nd GAP to open. */
3282 #ifndef HCRP_OPEN_CHAN_TOUT
3283 #define HCRP_OPEN_CHAN_TOUT 5
3286 /* Number of seconds to wait for 2nd GAP to close. */
3287 #ifndef HCRP_CLOSE_CHAN_TOUT
3288 #define HCRP_CLOSE_CHAN_TOUT 3
3291 /* Number of seconds to wait for the application to respond to a protocol request. */
3292 #ifndef HCRP_APPL_RSP_TOUT
3293 #define HCRP_APPL_RSP_TOUT 5
3296 /* Number of seconds to wait for the peer device to respond to a protocol request. */
3297 #ifndef HCRP_CMD_RSP_TOUT
3298 #define HCRP_CMD_RSP_TOUT 7
3301 /* Number of seconds between subsequent credit requests to the server when the send watermark has been exceeded. */
3302 #ifndef HCRP_CREDIT_REQ_UPDATES
3303 #define HCRP_CREDIT_REQ_UPDATES 1
3306 /* Maximum number of results to return in a HCRP_FindServices search. */
3307 #ifndef HCRP_MAX_SEARCH_RESULTS
3308 #define HCRP_MAX_SEARCH_RESULTS 1
3311 /* Maximum number of bytes to be reserved for searching for the client's notification record. */
3312 #ifndef HCRP_MAX_NOTIF_DISC_BUF
3313 #define HCRP_MAX_NOTIF_DISC_BUF 300
3316 /* Maximum number of clients the server will allow to be registered for notifications. */
3317 #ifndef HCRP_MAX_NOTIF_CLIENTS
3318 #define HCRP_MAX_NOTIF_CLIENTS 3
3321 /* Spec says minimum of two notification retries. */
3322 #ifndef HCRP_NOTIF_NUM_RETRIES
3323 #define HCRP_NOTIF_NUM_RETRIES 4
3326 /*************************************************************************
3327 ** Definitions for Multi-Client Server HCRP
3328 ** Note: Many of the above HCRP definitions are also used
3329 ** Maximum number of clients allowed to connect simultaneously
3330 ** Must be less than ((GAP_MAX_CONNECTIONS - 1) / 2)
3332 #ifndef HCRPM_MAX_CLIENTS
3333 #define HCRPM_MAX_CLIENTS 3
3337 /******************************************************************************
3341 ******************************************************************************/
3343 #ifndef PAN_INCLUDED
3344 #define PAN_INCLUDED FALSE
3348 /******************************************************************************
3352 ******************************************************************************/
3354 #ifndef SAP_SERVER_INCLUDED
3355 #define SAP_SERVER_INCLUDED FALSE
3359 /*************************************************************************
3362 #ifndef A2D_INCLUDED
3363 #define A2D_INCLUDED TRUE
3366 /* TRUE to include SBC utility functions */
3367 #ifndef A2D_SBC_INCLUDED
3368 #define A2D_SBC_INCLUDED A2D_INCLUDED
3371 /* TRUE to include MPEG-1,2 (mp3) utility functions */
3372 #ifndef A2D_M12_INCLUDED
3373 #define A2D_M12_INCLUDED A2D_INCLUDED
3376 /* TRUE to include MPEG-2,4 (aac) utility functions */
3377 #ifndef A2D_M24_INCLUDED
3378 #define A2D_M24_INCLUDED A2D_INCLUDED
3381 /******************************************************************************
3385 ******************************************************************************/
3387 #ifndef AVCT_INCLUDED
3388 #define AVCT_INCLUDED TRUE
3391 /* Number of simultaneous ACL links to different peer devices. */
3392 #ifndef AVCT_NUM_LINKS
3393 #define AVCT_NUM_LINKS 2
3396 /* Number of simultaneous AVCTP connections. */
3397 #ifndef AVCT_NUM_CONN
3398 #define AVCT_NUM_CONN 3
3401 /* Pool ID where to reassemble the SDU.
3402 This Pool allows buffers to be used that are larger than
3403 the L2CAP_MAX_MTU. */
3404 #ifndef AVCT_BR_USER_RX_POOL_ID
3405 #define AVCT_BR_USER_RX_POOL_ID HCI_ACL_POOL_ID
3408 /* Pool ID where to hold the SDU.
3409 This Pool allows buffers to be used that are larger than
3410 the L2CAP_MAX_MTU. */
3411 #ifndef AVCT_BR_USER_TX_POOL_ID
3412 #define AVCT_BR_USER_TX_POOL_ID HCI_ACL_POOL_ID
3416 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
3418 #ifndef AVCT_BR_FCR_RX_POOL_ID
3419 #define AVCT_BR_FCR_RX_POOL_ID HCI_ACL_POOL_ID
3423 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
3424 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
3425 Note: This pool needs to have enough buffers to hold two times the window size negotiated
3426 in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions.
3427 The size of each buffer must be able to hold the maximum MPS segment size passed in
3428 tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
3430 #ifndef AVCT_BR_FCR_TX_POOL_ID
3431 #define AVCT_BR_FCR_TX_POOL_ID HCI_ACL_POOL_ID
3434 /* AVCTP Browsing channel FCR Option:
3435 Size of the transmission window when using enhanced retransmission mode. Not used
3436 in basic and streaming modes. Range: 1 - 63
3438 #ifndef AVCT_BR_FCR_OPT_TX_WINDOW_SIZE
3439 #define AVCT_BR_FCR_OPT_TX_WINDOW_SIZE 10
3442 /* AVCTP Browsing channel FCR Option:
3443 Number of transmission attempts for a single I-Frame before taking
3444 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
3447 0 - infinite retransmissions
3448 1 - single transmission
3450 #ifndef AVCT_BR_FCR_OPT_MAX_TX_B4_DISCNT
3451 #define AVCT_BR_FCR_OPT_MAX_TX_B4_DISCNT 20
3454 /* AVCTP Browsing channel FCR Option: Retransmission Timeout
3455 The AVRCP specification set a value in the range of 300 - 2000 ms
3456 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
3457 Range: Minimum 2000 (2 secs) when supporting PBF.
3459 #ifndef AVCT_BR_FCR_OPT_RETX_TOUT
3460 #define AVCT_BR_FCR_OPT_RETX_TOUT 2000
3463 /* AVCTP Browsing channel FCR Option: Monitor Timeout
3464 The AVRCP specification set a value in the range of 300 - 2000 ms
3465 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
3466 Range: Minimum 12000 (12 secs) when supporting PBF.
3468 #ifndef AVCT_BR_FCR_OPT_MONITOR_TOUT
3469 #define AVCT_BR_FCR_OPT_MONITOR_TOUT 12000
3472 /******************************************************************************
3476 ******************************************************************************/
3478 #ifndef AVRC_INCLUDED
3479 #define AVRC_INCLUDED TRUE
3482 #ifndef AVRC_METADATA_INCLUDED
3483 #define AVRC_METADATA_INCLUDED TRUE
3486 /******************************************************************************
3490 ******************************************************************************/
3491 #ifndef MCA_INCLUDED
3492 #define MCA_INCLUDED FALSE
3495 /* TRUE to support Clock Synchronization OpCodes */
3496 #ifndef MCA_SYNC_INCLUDED
3497 #define MCA_SYNC_INCLUDED FALSE
3500 /* The MTU size for the L2CAP configuration on control channel. 48 is the minimal */
3501 #ifndef MCA_CTRL_MTU
3502 #define MCA_CTRL_MTU 60
3505 /* The maximum number of registered MCAP instances. */
3506 #ifndef MCA_NUM_REGS
3507 #define MCA_NUM_REGS 12
3510 /* The maximum number of control channels (to difference devices) per registered MCAP instances. */
3511 #ifndef MCA_NUM_LINKS
3512 #define MCA_NUM_LINKS 3
3515 /* The maximum number of MDEP (including HDP echo) per registered MCAP instances. */
3516 #ifndef MCA_NUM_DEPS
3517 #define MCA_NUM_DEPS 13
3520 /* The maximum number of MDL link per control channel. */
3521 #ifndef MCA_NUM_MDLS
3522 #define MCA_NUM_MDLS 4
3525 /* Pool ID where to reassemble the SDU. */
3526 #ifndef MCA_USER_RX_POOL_ID
3527 #define MCA_USER_RX_POOL_ID HCI_ACL_POOL_ID
3530 /* Pool ID where to hold the SDU. */
3531 #ifndef MCA_USER_TX_POOL_ID
3532 #define MCA_USER_TX_POOL_ID HCI_ACL_POOL_ID
3536 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
3538 #ifndef MCA_FCR_RX_POOL_ID
3539 #define MCA_FCR_RX_POOL_ID HCI_ACL_POOL_ID
3543 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
3544 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
3545 Note: This pool needs to have enough buffers to hold two times the window size negotiated
3546 in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions.
3547 The size of each buffer must be able to hold the maximum MPS segment size passed in
3548 tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
3550 #ifndef MCA_FCR_TX_POOL_ID
3551 #define MCA_FCR_TX_POOL_ID HCI_ACL_POOL_ID
3554 /* MCAP control channel FCR Option:
3555 Size of the transmission window when using enhanced retransmission mode.
3556 1 is defined by HDP specification for control channel.
3558 #ifndef MCA_FCR_OPT_TX_WINDOW_SIZE
3559 #define MCA_FCR_OPT_TX_WINDOW_SIZE 1
3562 /* MCAP control channel FCR Option:
3563 Number of transmission attempts for a single I-Frame before taking
3564 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
3567 0 - infinite retransmissions
3568 1 - single transmission
3570 #ifndef MCA_FCR_OPT_MAX_TX_B4_DISCNT
3571 #define MCA_FCR_OPT_MAX_TX_B4_DISCNT 20
3574 /* MCAP control channel FCR Option: Retransmission Timeout
3575 The AVRCP specification set a value in the range of 300 - 2000 ms
3576 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
3577 Range: Minimum 2000 (2 secs) when supporting PBF.
3579 #ifndef MCA_FCR_OPT_RETX_TOUT
3580 #define MCA_FCR_OPT_RETX_TOUT 2000
3583 /* MCAP control channel FCR Option: Monitor Timeout
3584 The AVRCP specification set a value in the range of 300 - 2000 ms
3585 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
3586 Range: Minimum 12000 (12 secs) when supporting PBF.
3588 #ifndef MCA_FCR_OPT_MONITOR_TOUT
3589 #define MCA_FCR_OPT_MONITOR_TOUT 12000
3592 /* MCAP control channel FCR Option: Maximum PDU payload size.
3593 The maximum number of payload octets that the local device can receive in a single PDU.
3595 #ifndef MCA_FCR_OPT_MPS_SIZE
3596 #define MCA_FCR_OPT_MPS_SIZE 1000
3599 /* Shared transport */
3600 #ifndef NFC_SHARED_TRANSPORT_ENABLED
3601 #define NFC_SHARED_TRANSPORT_ENABLED FALSE
3604 /******************************************************************************
3608 ******************************************************************************/
3610 #ifndef SER_INCLUDED
3611 #define SER_INCLUDED FALSE
3614 /* Task which runs the serial application. */
3616 #define SER_TASK BTE_APPL_TASK
3619 /* Mailbox used by serial application. */
3621 #define SER_MBOX TASK_MBOX_1
3625 #ifndef SER_MBOX_MASK
3626 #define SER_MBOX_MASK TASK_MBOX_1_EVT_MASK
3629 /* TX path application event. */
3630 #ifndef SER_TX_PATH_APPL_EVT
3631 #define SER_TX_PATH_APPL_EVT EVENT_MASK(APPL_EVT_3)
3634 /* RX path application event. */
3635 #ifndef SER_RX_PATH_APPL_EVT
3636 #define SER_RX_PATH_APPL_EVT EVENT_MASK(APPL_EVT_4)
3639 /******************************************************************************
3641 ** Sleep Mode (Low Power Mode)
3643 ******************************************************************************/
3645 #ifndef HCILP_INCLUDED
3646 #define HCILP_INCLUDED TRUE
3649 /******************************************************************************
3653 ******************************************************************************/
3655 #ifndef RPC_INCLUDED
3656 #define RPC_INCLUDED FALSE
3659 /* RPCT task mailbox ID for messages coming from rpcgen code. */
3661 #define RPCT_MBOX TASK_MBOX_0
3664 /* RPCT task event for mailbox. */
3665 #ifndef RPCT_RPC_MBOX_EVT
3666 #define RPCT_RPC_MBOX_EVT TASK_MBOX_0_EVT_MASK
3669 /* RPCT task event from driver indicating RX data is ready. */
3670 #ifndef RPCT_RX_READY_EVT
3671 #define RPCT_RX_READY_EVT APPL_EVT_0
3674 /* RPCT task event from driver indicating data TX is done. */
3675 #ifndef RPCT_TX_DONE_EVT
3676 #define RPCT_TX_DONE_EVT APPL_EVT_1
3679 /* RPCT task event indicating data is in the circular buffer. */
3680 #ifndef RPCT_UCBUF_EVT
3681 #define RPCT_UCBUF_EVT APPL_EVT_2
3684 /* Task ID of RPCGEN task. */
3686 #define RPCGEN_TASK BTU_TASK
3689 /* RPCGEN task event for messages coming from RPCT. */
3690 #ifndef RPCGEN_MSG_EVT
3691 #define RPCGEN_MSG_EVT TASK_MBOX_1_EVT_MASK
3694 #ifndef RPCGEN_MSG_MBOX
3695 #define RPCGEN_MSG_MBOX TASK_MBOX_1
3698 /* Size of circular buffer used to store diagnostic messages. */
3699 #ifndef RPCT_UCBUF_SIZE
3700 #define RPCT_UCBUF_SIZE 2000
3703 /******************************************************************************
3705 ** SAP - Sample applications
3707 ******************************************************************************/
3709 #ifndef MMI_INCLUDED
3710 #define MMI_INCLUDED FALSE
3713 /******************************************************************************
3715 ** APPL - Application Task
3717 ******************************************************************************/
3718 /* When TRUE indicates that an application task is to be run */
3719 #ifndef APPL_INCLUDED
3720 #define APPL_INCLUDED TRUE
3723 /* When TRUE remote terminal code included (RPC MUST be included) */
3724 #ifndef RSI_INCLUDED
3725 #define RSI_INCLUDED TRUE
3730 #define L2CAP_FEATURE_REQ_ID 73
3731 #define L2CAP_FEATURE_RSP_ID 173
3734 /******************************************************************************
3738 ******************************************************************************/
3739 /* BTA EIR canned UUID list (default is dynamic) */
3740 #ifndef BTA_EIR_CANNED_UUID_LIST
3741 #define BTA_EIR_CANNED_UUID_LIST FALSE
3744 /* Number of supported customer UUID in EIR */
3745 #ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID
3746 #define BTA_EIR_SERVER_NUM_CUSTOM_UUID 8
3749 /* CHLD override for bluedroid */
3750 #ifndef BTA_AG_CHLD_VAL_ECC
3751 #define BTA_AG_CHLD_VAL_ECC "(0,1,1x,2,2x,3)"
3754 #ifndef BTA_AG_CHLD_VAL
3755 #define BTA_AG_CHLD_VAL "(0,1,2,3)"
3758 /* Set the CIND to match HFP 1.5 */
3759 #ifndef BTA_AG_CIND_INFO
3760 #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))"
3764 /******************************************************************************
3768 ******************************************************************************/
3769 #ifndef BTE_PLATFORM_IDLE
3770 #define BTE_PLATFORM_IDLE
3773 #ifndef BTE_IDLE_TASK_INCLUDED
3774 #define BTE_IDLE_TASK_INCLUDED FALSE
3777 #ifndef BTE_PLATFORM_INITHW
3778 #define BTE_PLATFORM_INITHW
3781 #ifndef BTE_BTA_CODE_INCLUDED
3782 #define BTE_BTA_CODE_INCLUDED FALSE
3785 /******************************************************************************
3789 ******************************************************************************/
3790 /* Whether to parse and display traces-> Platform specific implementation */
3792 #define BTTRC_DISP BTTRC_DispOnInsight
3795 /******************************************************************************
3797 ** Tracing: Include trace header file here.
3799 ******************************************************************************/
3801 #include "bt_trace.h"
3803 #endif /* BT_TARGET_H */