1/******************************************************************************
2 *
3 *  Copyright (C) 1999-2012 Broadcom Corporation
4 *
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:
8 *
9 *  http://www.apache.org/licenses/LICENSE-2.0
10 *
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.
16 *
17 ******************************************************************************/
18#ifndef BT_TARGET_H
19#define BT_TARGET_H
20
21#include "data_types.h"
22
23#ifdef BUILDCFG
24#include "buildcfg.h"
25#endif
26
27/* Include common GKI definitions used by this platform */
28#include "gki_target.h"
29
30#include "bt_types.h"   /* This must be defined AFTER buildcfg.h */
31#include "dyn_mem.h"    /* defines static and/or dynamic memory for components */
32
33/* #define BYPASS_AVDATATRACE */
34
35/******************************************************************************
36**
37** Platform-Specific
38**
39******************************************************************************/
40
41#ifndef BT_BRCM_VS_INCLUDED
42#define BT_BRCM_VS_INCLUDED             TRUE
43#endif
44
45/* set to FALSE unless using Zeevo */
46#ifndef ZEEVO_CTRL_DEFINED
47#define ZEEVO_CTRL_DEFINED FALSE
48#endif
49
50/* Supporting GPS shared transport */
51#ifndef GPS_INCLUDED
52#define GPS_INCLUDED               TRUE
53#endif
54
55/* API macros for simulator */
56
57#define BTAPI
58
59#ifndef BTE_BSE_WRAPPER
60#ifdef  BTE_SIM_APP
61#undef  BTAPI
62#define BTAPI         __declspec(dllexport)
63#endif
64#endif
65
66#define BT_API          BTAPI
67#define BTU_API         BTAPI
68#define A2D_API         BTAPI
69#define VDP_API         BTAPI
70#define AVDT_API        BTAPI
71#define AVCT_API        BTAPI
72#define AVRC_API        BTAPI
73#define BIP_API         BTAPI
74#define BNEP_API        BTAPI
75#define BPP_API         BTAPI
76#define BTM_API         BTAPI
77#define CTP_API         BTAPI
78#define DUN_API         BTAPI
79#define FTP_API         BTAPI
80#define GAP_API         BTAPI
81#define GOEP_API        BTAPI
82#define HCI_API         BTAPI
83#define HCRP_API        BTAPI
84#define HID_API         BTAPI
85#define HFP_API         BTAPI
86#define HSP2_API        BTAPI
87#define ICP_API         BTAPI
88#define L2C_API         BTAPI
89#define OBX_API         BTAPI
90#define OPP_API         BTAPI
91#define PAN_API         BTAPI
92#define RFC_API         BTAPI
93#define RPC_API         BTAPI
94#define SDP_API         BTAPI
95#define SPP_API         BTAPI
96#define TCS_API         BTAPI
97#define XML_API         BTAPI
98#define BTA_API         BTAPI
99#define SBC_API         BTAPI
100#define LPM_API         BTAPI
101#define AMP_API         BTAPI
102#define MCE_API         BTAPI
103#define MCA_API         BTAPI
104#define GATT_API        BTAPI
105#define SMP_API         BTAPI
106
107
108/******************************************************************************
109**
110** GKI Buffer Pools
111**
112******************************************************************************/
113
114/* Receives HCI events from the lower-layer. */
115#ifndef HCI_CMD_POOL_ID
116#define HCI_CMD_POOL_ID             GKI_POOL_ID_2
117#endif
118
119#ifndef HCI_CMD_POOL_BUF_SIZE
120#define HCI_CMD_POOL_BUF_SIZE       GKI_BUF2_SIZE
121#endif
122
123/* Receives ACL data packets from thelower-layer. */
124#ifndef HCI_ACL_POOL_ID
125#define HCI_ACL_POOL_ID             GKI_POOL_ID_3
126#endif
127
128#ifndef HCI_ACL_POOL_BUF_SIZE
129#define HCI_ACL_POOL_BUF_SIZE       GKI_BUF3_SIZE
130#endif
131
132/* Maximum number of buffers available for ACL receive data. */
133#ifndef HCI_ACL_BUF_MAX
134#define HCI_ACL_BUF_MAX             GKI_BUF3_MAX
135#endif
136
137/* Receives SCO data packets from the lower-layer. */
138#ifndef HCI_SCO_POOL_ID
139#define HCI_SCO_POOL_ID             GKI_POOL_ID_6
140#endif
141
142/* Not used. */
143#ifndef HCI_DATA_DESCR_POOL_ID
144#define HCI_DATA_DESCR_POOL_ID      GKI_POOL_ID_0
145#endif
146
147/* Sends SDP data packets. */
148#ifndef SDP_POOL_ID
149#define SDP_POOL_ID                 GKI_POOL_ID_2
150#endif
151
152/* Sends RFCOMM command packets. */
153#ifndef RFCOMM_CMD_POOL_ID
154#define RFCOMM_CMD_POOL_ID          GKI_POOL_ID_2
155#endif
156
157#ifndef RFCOMM_CMD_POOL_BUF_SIZE
158#define RFCOMM_CMD_POOL_BUF_SIZE    GKI_BUF2_SIZE
159#endif
160
161/* Sends RFCOMM data packets. */
162#ifndef RFCOMM_DATA_POOL_ID
163#define RFCOMM_DATA_POOL_ID         GKI_POOL_ID_3
164#endif
165
166#ifndef RFCOMM_DATA_POOL_BUF_SIZE
167#define RFCOMM_DATA_POOL_BUF_SIZE   GKI_BUF3_SIZE
168#endif
169
170/* Sends L2CAP packets to the peer and HCI messages to the controller. */
171#ifndef L2CAP_CMD_POOL_ID
172#define L2CAP_CMD_POOL_ID           GKI_POOL_ID_2
173#endif
174
175/* Sends L2CAP segmented packets in ERTM mode */
176#ifndef L2CAP_FCR_TX_POOL_ID
177#define L2CAP_FCR_TX_POOL_ID        HCI_ACL_POOL_ID
178#endif
179
180/* Receives L2CAP segmented packets in ERTM mode */
181#ifndef L2CAP_FCR_RX_POOL_ID
182#define L2CAP_FCR_RX_POOL_ID        HCI_ACL_POOL_ID
183#endif
184
185/* Used by BTM when it sends HCI commands to the controller. */
186#ifndef BTM_CMD_POOL_ID
187#define BTM_CMD_POOL_ID             GKI_POOL_ID_2
188#endif
189
190/* Sends TCS messages. */
191#ifndef TCS_MSG_POOL_ID
192#define TCS_MSG_POOL_ID             GKI_POOL_ID_2
193#endif
194
195#ifndef OBX_CMD_POOL_SIZE
196#define OBX_CMD_POOL_SIZE           GKI_BUF2_SIZE
197#endif
198
199#ifndef OBX_LRG_DATA_POOL_SIZE
200#define OBX_LRG_DATA_POOL_SIZE      GKI_BUF4_SIZE
201#endif
202
203#ifndef OBX_LRG_DATA_POOL_ID
204#define OBX_LRG_DATA_POOL_ID        GKI_POOL_ID_4
205#endif
206
207/* Used for CTP discovery database. */
208#ifndef CTP_SDP_DB_POOL_ID
209#define CTP_SDP_DB_POOL_ID          GKI_POOL_ID_3
210#endif
211
212/* Used for CTP data exchange feature. */
213#ifndef CTP_DATA_EXCHG_POOL_ID
214#define CTP_DATA_EXCHG_POOL_ID      GKI_POOL_ID_2
215#endif
216
217/* Used to send data to L2CAP. */
218#ifndef GAP_DATA_POOL_ID
219#define GAP_DATA_POOL_ID            GKI_POOL_ID_3
220#endif
221
222/* Used for SPP inquiry and discovery databases. */
223#ifndef SPP_DB_POOL_ID
224#define SPP_DB_POOL_ID              GKI_POOL_ID_3
225#endif
226
227#ifndef SPP_DB_SIZE
228#define SPP_DB_SIZE                 GKI_BUF3_SIZE
229#endif
230
231/* HCRP protocol and internal commands. */
232#ifndef HCRP_CMD_POOL_ID
233#define HCRP_CMD_POOL_ID            GKI_POOL_ID_2
234#endif
235
236#ifndef HCRP_CMD_POOL_SIZE
237#define HCRP_CMD_POOL_SIZE          GKI_BUF2_SIZE
238#endif
239
240#ifndef BIP_EVT_POOL_SIZE
241#define BIP_EVT_POOL_SIZE           GKI_BUF3_SIZE
242#endif
243
244#ifndef BIP_DB_SIZE
245#define BIP_DB_SIZE                 GKI_BUF3_SIZE
246#endif
247
248
249/* BNEP data and protocol messages. */
250#ifndef BNEP_POOL_ID
251#define BNEP_POOL_ID                GKI_POOL_ID_3
252#endif
253
254/* RPC pool for temporary trace message buffers. */
255#ifndef RPC_SCRATCH_POOL_ID
256#define RPC_SCRATCH_POOL_ID         GKI_POOL_ID_2
257#endif
258
259/* RPC scratch buffer size (not related to RPC_SCRATCH_POOL_ID) */
260#ifndef RPC_SCRATCH_BUF_SIZE
261#define RPC_SCRATCH_BUF_SIZE        GKI_BUF3_SIZE
262#endif
263
264/* RPC pool for protocol messages */
265#ifndef RPC_MSG_POOL_ID
266#define RPC_MSG_POOL_ID             GKI_POOL_ID_3
267#endif
268
269#ifndef RPC_MSG_POOL_SIZE
270#define RPC_MSG_POOL_SIZE           GKI_BUF3_SIZE
271#endif
272
273/* AVDTP pool for protocol messages */
274#ifndef AVDT_CMD_POOL_ID
275#define AVDT_CMD_POOL_ID            GKI_POOL_ID_2
276#endif
277
278/* AVDTP pool size for media packets in case of fragmentation */
279#ifndef AVDT_DATA_POOL_SIZE
280#define AVDT_DATA_POOL_SIZE         GKI_BUF3_SIZE
281#endif
282
283#ifndef PAN_POOL_ID
284#define PAN_POOL_ID                 GKI_POOL_ID_3
285#endif
286
287/* UNV pool for read/write serialization */
288#ifndef UNV_MSG_POOL_ID
289#define UNV_MSG_POOL_ID             GKI_POOL_ID_2
290#endif
291
292#ifndef UNV_MSG_POOL_SIZE
293#define UNV_MSG_POOL_SIZE           GKI_BUF2_SIZE
294#endif
295
296/* AVCTP pool for protocol messages */
297#ifndef AVCT_CMD_POOL_ID
298#define AVCT_CMD_POOL_ID            GKI_POOL_ID_1
299#endif
300
301#ifndef AVCT_META_CMD_POOL_ID
302#define AVCT_META_CMD_POOL_ID       GKI_POOL_ID_2
303#endif
304
305/* AVRCP pool for protocol messages */
306#ifndef AVRC_CMD_POOL_ID
307#define AVRC_CMD_POOL_ID            GKI_POOL_ID_1
308#endif
309
310/* AVRCP pool size for protocol messages */
311#ifndef AVRC_CMD_POOL_SIZE
312#define AVRC_CMD_POOL_SIZE          GKI_BUF1_SIZE
313#endif
314
315/* AVRCP Metadata pool for protocol messages */
316#ifndef AVRC_META_CMD_POOL_ID
317#define AVRC_META_CMD_POOL_ID       GKI_POOL_ID_2
318#endif
319
320/* AVRCP Metadata pool size for protocol messages */
321#ifndef AVRC_META_CMD_POOL_SIZE
322#define AVRC_META_CMD_POOL_SIZE     GKI_BUF2_SIZE
323#endif
324
325
326/* AVRCP buffer size for browsing channel messages */
327#ifndef AVRC_BROWSE_POOL_SIZE
328#define AVRC_BROWSE_POOL_SIZE     GKI_MAX_BUF_SIZE
329#endif
330
331/*  HDP buffer size for the Pulse Oximeter  */
332#ifndef BTA_HL_LRG_DATA_POOL_SIZE
333#define BTA_HL_LRG_DATA_POOL_SIZE      GKI_BUF7_SIZE
334#endif
335
336#ifndef BTA_HL_LRG_DATA_POOL_ID
337#define BTA_HL_LRG_DATA_POOL_ID        GKI_POOL_ID_7
338#endif
339
340/* GATT Server Database pool ID */
341#ifndef GATT_DB_POOL_ID
342#define GATT_DB_POOL_ID                 GKI_POOL_ID_8
343#endif
344
345
346/******************************************************************************
347**
348** Lower Layer Interface
349**
350******************************************************************************/
351
352/* Sends ACL data received over HCI to the upper stack. */
353#ifndef HCI_ACL_DATA_TO_UPPER
354#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);}
355#endif
356
357/* Sends SCO data received over HCI to the upper stack. */
358#ifndef HCI_SCO_DATA_TO_UPPER
359#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);}
360#endif
361
362/* Sends an HCI event received over HCI to theupper stack. */
363#ifndef HCI_EVT_TO_UPPER
364#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);}
365#endif
366
367/* HCI 4 wire power management protocol. */
368#ifndef HCILL_INCLUDED
369#define HCILL_INCLUDED              FALSE
370#endif
371
372/* Macro for allocating buffer for HCI commands */
373#ifndef HCI_GET_CMD_BUF
374#if (!defined(HCI_USE_VARIABLE_SIZE_CMD_BUF) || (HCI_USE_VARIABLE_SIZE_CMD_BUF == FALSE))
375/* Allocate fixed-size buffer from HCI_CMD_POOL (default case) */
376#define HCI_GET_CMD_BUF(paramlen)    ((BT_HDR *)GKI_getpoolbuf (HCI_CMD_POOL_ID))
377#else
378/* Allocate smallest possible buffer (for platforms with limited RAM) */
379#define HCI_GET_CMD_BUF(paramlen)    ((BT_HDR *)GKI_getbuf ((UINT16)(BT_HDR_SIZE + HCIC_PREAMBLE_SIZE + (paramlen))))
380#endif
381#endif  /* HCI_GET_CMD_BUF */
382
383/******************************************************************************
384**
385** HCI Services (H4)
386**
387******************************************************************************/
388#ifndef HCISU_H4_INCLUDED
389#define HCISU_H4_INCLUDED               FALSE
390#endif
391
392#ifdef __cplusplus
393extern "C" {
394#endif
395BT_API extern void bte_ncisu_send (BT_HDR *p_pkt, UINT16 event);
396BT_API extern void bte_hcisu_send (BT_HDR *p_msg, UINT16 event);
397#if (HCISU_H4_INCLUDED == TRUE)
398BT_API extern void bte_hcisu_lp_allow_bt_device_sleep (void);
399BT_API extern void bte_hcisu_lp_wakeup_host (void);
400BT_API extern void bte_hcisu_lp_h4ibss_evt(UINT8 *p, UINT8 evt_len);
401#endif
402
403/* HCILL API for the applications */
404typedef void (tHCILL_SLEEP_ACK)(void);
405BT_API extern void HCILL_GoToSleep( tHCILL_SLEEP_ACK *sl_ack_fn);
406typedef void (tHCILL_STATE_CBACK)(BOOLEAN is_sleep);
407BT_API extern void HCILL_RegState( tHCILL_STATE_CBACK *p_cback);
408#ifdef __cplusplus
409}
410#endif
411
412/* Sends ACL data received from the upper stack to the BD/EDR HCI transport. */
413#ifndef HCI_ACL_DATA_TO_LOWER
414#define HCI_ACL_DATA_TO_LOWER(p)    bte_hcisu_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_ACL);
415#endif
416
417#ifndef HCI_BLE_ACL_DATA_TO_LOWER
418#define HCI_BLE_ACL_DATA_TO_LOWER(p)    bte_hcisu_send((BT_HDR *)(p), (UINT16)(BT_EVT_TO_LM_HCI_ACL|LOCAL_BLE_CONTROLLER_ID));
419#endif
420
421/* Sends ACL data received from the upper stack to the AMP HCI transport. */
422#ifndef HCI_AMP_DATA_TO_LOWER
423#define HCI_AMP_DATA_TO_LOWER(p,x)    bte_hcisu_send((BT_HDR *)(p), (UINT16)(BT_EVT_TO_LM_HCI_ACL|((UINT16)(x))));
424#endif
425
426/* Sends SCO data received from the upper stack to the HCI transport. */
427#ifndef HCI_SCO_DATA_TO_LOWER
428#define HCI_SCO_DATA_TO_LOWER(p)    bte_hcisu_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_SCO);
429#endif
430
431/* Sends an HCI command received from the upper stack to the BD/EDR HCI transport. */
432#ifndef HCI_CMD_TO_LOWER
433#define HCI_CMD_TO_LOWER(p)         bte_hcisu_send((BT_HDR *)(p), BT_EVT_TO_LM_HCI_CMD);
434#endif
435
436/* Sends an HCI command received from the upper stack to the AMP HCI transport. */
437#ifndef HCI_CMD_TO_AMP
438#define HCI_CMD_TO_AMP(x,p)         bte_hcisu_send((BT_HDR *)(p), (UINT16)(BT_EVT_TO_LM_HCI_CMD|((UINT16)(x))));
439#endif
440
441/* Sends an LM Diagnosic command received from the upper stack to the HCI transport. */
442#ifndef HCI_LM_DIAG_TO_LOWER
443#define HCI_LM_DIAG_TO_LOWER(p)     bte_hcisu_send((BT_HDR *)(p), BT_EVT_TO_LM_DIAG);
444#endif
445
446/* Send HCISU a message to allow BT sleep */
447#ifndef HCI_LP_ALLOW_BT_DEVICE_SLEEP
448#if (HCISU_H4_INCLUDED == TRUE)
449#define HCI_LP_ALLOW_BT_DEVICE_SLEEP()       bte_hcisu_lp_allow_bt_device_sleep()
450#else
451#define HCI_LP_ALLOW_BT_DEVICE_SLEEP()       HCILP_AllowBTDeviceSleep()
452#endif
453#endif
454
455/* Send HCISU a message to wakeup host */
456#ifndef HCI_LP_WAKEUP_HOST
457#if (HCISU_H4_INCLUDED == TRUE)
458#define HCI_LP_WAKEUP_HOST()        bte_hcisu_lp_wakeup_host()
459#else
460#define HCI_LP_WAKEUP_HOST()        HCILP_WakeupHost()
461#endif
462#endif
463
464/* Send HCISU the received H4IBSS event from controller */
465#ifndef HCI_LP_RCV_H4IBSS_EVT
466#if (HCISU_H4_INCLUDED == TRUE)
467#define HCI_LP_RCV_H4IBSS_EVT(p1, p2)  bte_hcisu_lp_h4ibss_evt((UINT8*)(p1), (UINT8)(p2))
468#else
469#define HCI_LP_RCV_H4IBSS_EVT(p1, p2)  h4ibss_sleep_mode_evt((UINT8*)(p1), (UINT8)(p2))
470#endif
471#endif
472
473/* If nonzero, the upper-layer sends at most this number of HCI commands to the lower-layer. */
474#ifndef HCI_MAX_SIMUL_CMDS
475#define HCI_MAX_SIMUL_CMDS          0
476#endif
477
478/* Timeout for receiving response to HCI command */
479#ifndef BTU_CMD_CMPL_TIMEOUT
480#define BTU_CMD_CMPL_TIMEOUT        8
481#endif
482
483/* If TRUE, BTU task will check HCISU again when HCI command timer expires */
484#ifndef BTU_CMD_CMPL_TOUT_DOUBLE_CHECK
485#define BTU_CMD_CMPL_TOUT_DOUBLE_CHECK      FALSE
486#endif
487
488/* If TRUE, stack is compiled to include MM dual stack functionality */
489#ifndef BTU_DUAL_STACK_MM_INCLUDED
490#define BTU_DUAL_STACK_MM_INCLUDED     FALSE
491#endif
492
493/* If TRUE, stack is compiled to support Embedded Lite Stack in BT chip */
494#ifndef BTU_DUAL_STACK_BTC_INCLUDED
495#define BTU_DUAL_STACK_BTC_INCLUDED      FALSE
496#endif
497
498/* If TRUE, stack is compiled to support Embedded Lite Stack for AV SNK in BT chip */
499#ifndef BTU_BTC_SNK_INCLUDED
500#define BTU_BTC_SNK_INCLUDED        FALSE
501#endif
502
503/* If TRUE, stack is compiled as Lite Stack in Multimedia chip */
504/* If FALSE, stack is compiled as Full Stack in Baseband chip */
505#ifndef BTU_STACK_LITE_ENABLED
506#define BTU_STACK_LITE_ENABLED      FALSE
507#endif
508
509/* Transport pause time (BT slot(0.625ms) unit) when switching between BB and MM */
510/* FW is using a tick which is 20 slot unit so if timeout is between 0 to 20 slot */
511/* then actual timeout would be 0 to 12.5ms because it could be beteen ticks. */
512/* if timeout is between 20 to 40 slot then actual timeout would be 12.5 to 25ms */
513#ifndef BTU_DUAL_TRANSPORT_PAUSE_TIME
514#define BTU_DUAL_TRANSPORT_PAUSE_TIME     40
515#endif
516
517/* if UART baudrate is different between BB and MM, it will be updated during switching */
518#ifndef BTU_DUAL_TRANSPORT_BB_BAUDRATE
519#define BTU_DUAL_TRANSPORT_BB_BAUDRATE      115200
520#endif
521
522#ifndef BTU_DUAL_TRANSPORT_MM_BAUDRATE
523#define BTU_DUAL_TRANSPORT_MM_BAUDRATE      921600
524#endif
525
526/* If TRUE, stack is compiled to include the multi-av feature (A2DP packets are duplicated inside controller) */
527#ifndef BTU_MULTI_AV_INCLUDED
528#define BTU_MULTI_AV_INCLUDED       FALSE
529#endif
530
531/* Use 2 second for low-resolution systems, override to 1 for high-resolution systems */
532#ifndef BT_1SEC_TIMEOUT
533#define BT_1SEC_TIMEOUT             (2)
534#endif
535
536/* Quick Timer */
537/* minimum should have 100 millisecond resolution for eL2CAP */
538/* if HCILP_INCLUDED is TRUE     then it should have 100 millisecond resolution */
539/* if SLIP_INCLUDED is TRUE      then it should have 10 millisecond resolution  */
540/* if BRCM_USE_DELAY is FALSE then it should have 10 millisecond resolution  */
541/* if none of them is included then QUICK_TIMER_TICKS_PER_SEC is set to 0 to exclude quick timer */
542#ifndef QUICK_TIMER_TICKS_PER_SEC
543#define QUICK_TIMER_TICKS_PER_SEC   100       /* 10ms timer */
544#endif
545
546/******************************************************************************
547**
548** BTM
549**
550******************************************************************************/
551/* if set to TRUE, stack will automatically send an HCI reset at start-up. To be
552set to FALSE for advanced start-up / shut-down procedures using USER_HW_ENABLE_API
553and USER_HW_DISABLE_API macros */
554#ifndef BTM_AUTOMATIC_HCI_RESET
555#define BTM_AUTOMATIC_HCI_RESET      TRUE
556#endif
557
558/* Cancel Inquiry on incoming SSP - Work around code for a FW issue (CQ#167446). */
559#ifndef BTM_NO_SSP_ON_INQUIRY
560#define BTM_NO_SSP_ON_INQUIRY       FALSE
561#endif
562
563/* Include the implemenation needed by Pre-Lisbon controller (2.0_EDR or older) */
564#ifndef BTM_PRE_LISBON_INCLUDED
565#define BTM_PRE_LISBON_INCLUDED     TRUE
566#endif
567
568/* Includes SCO if TRUE */
569#ifndef BTM_SCO_INCLUDED
570#define BTM_SCO_INCLUDED            TRUE       /* TRUE includes SCO code */
571#endif
572
573/* Includes SCO if TRUE */
574#ifndef BTM_SCO_HCI_INCLUDED
575#define BTM_SCO_HCI_INCLUDED            FALSE       /* TRUE includes SCO over HCI code */
576#endif
577
578/* Includes WBS if TRUE */
579#ifndef BTM_WBS_INCLUDED
580#define BTM_WBS_INCLUDED            FALSE       /* TRUE includes WBS code */
581#endif
582
583/* Includes PCM2 support if TRUE */
584#ifndef BTM_PCM2_INCLUDED
585#define BTM_PCM2_INCLUDED           FALSE
586#endif
587
588/* If FALSE, AFH channel automatically adjusted based on AMP channel in use */
589/* Set TRUE, if want to bypass AFH channel automatic adjustment and use */
590/* BTA_DM_API_SET_AFH_CHANNELS_ API */
591
592#ifndef BTM_BYPASS_AMP_AUTO_AFH
593#define BTM_BYPASS_AMP_AUTO_AFH     FALSE
594#endif
595
596
597/**************************
598** Initial SCO TX credit
599*************************/
600/* max TX SCO data packet size */
601#ifndef BTM_SCO_DATA_SIZE_MAX
602#define BTM_SCO_DATA_SIZE_MAX       240
603#endif
604
605/* maximum BTM buffering capacity */
606#ifndef BTM_SCO_MAX_BUF_CAP
607#define BTM_SCO_MAX_BUF_CAP     (BTM_SCO_INIT_XMIT_CREDIT * 4)
608#endif
609
610/* The size in bytes of the BTM inquiry database. */
611#ifndef BTM_INQ_DB_SIZE
612#define BTM_INQ_DB_SIZE             12
613#endif
614
615/* This is set to always try to acquire the remote device name. */
616#ifndef BTM_INQ_GET_REMOTE_NAME
617#define BTM_INQ_GET_REMOTE_NAME     FALSE
618#endif
619
620/* The inquiry duration in 1.28 second units when auto inquiry is enabled. */
621#ifndef BTM_DEFAULT_INQ_DUR
622#define BTM_DEFAULT_INQ_DUR         5
623#endif
624
625/* The inquiry mode when auto inquiry is enabled. */
626#ifndef BTM_DEFAULT_INQ_MODE
627#define BTM_DEFAULT_INQ_MODE        BTM_GENERAL_INQUIRY
628#endif
629
630/* The default periodic inquiry maximum delay when auto inquiry is enabled, in 1.28 second units. */
631#ifndef BTM_DEFAULT_INQ_MAX_DELAY
632#define BTM_DEFAULT_INQ_MAX_DELAY   30
633#endif
634
635/* The default periodic inquiry minimum delay when auto inquiry is enabled, in 1.28 second units. */
636#ifndef BTM_DEFAULT_INQ_MIN_DELAY
637#define BTM_DEFAULT_INQ_MIN_DELAY   20
638#endif
639
640/* TRUE if controller does not support inquiry event filtering. */
641#ifndef BTM_BYPASS_EVENT_FILTERING
642#define BTM_BYPASS_EVENT_FILTERING  FALSE
643#endif
644
645/* TRUE if inquiry filtering is desired from BTM. */
646#ifndef BTM_USE_INQ_RESULTS_FILTER
647#define BTM_USE_INQ_RESULTS_FILTER  TRUE
648#endif
649
650/* The default scan mode */
651#ifndef BTM_DEFAULT_SCAN_TYPE
652#define BTM_DEFAULT_SCAN_TYPE       BTM_SCAN_TYPE_INTERLACED
653#endif
654
655/* Should connections to unknown devices be allowed when not discoverable? */
656#ifndef BTM_ALLOW_CONN_IF_NONDISCOVER
657#define BTM_ALLOW_CONN_IF_NONDISCOVER   FALSE
658#endif
659
660/* When connectable mode is set to TRUE, the device will respond to paging. */
661#ifndef BTM_IS_CONNECTABLE
662#define BTM_IS_CONNECTABLE          FALSE
663#endif
664
665/* Sets the Page_Scan_Window:  the length of time that the device is performing a page scan. */
666#ifndef BTM_DEFAULT_CONN_WINDOW
667#define BTM_DEFAULT_CONN_WINDOW     0x0012
668#endif
669
670/* Sets the Page_Scan_Activity:  the interval between the start of two consecutive page scans. */
671#ifndef BTM_DEFAULT_CONN_INTERVAL
672#define BTM_DEFAULT_CONN_INTERVAL   0x0800
673#endif
674
675/* This is set to automatically perform inquiry scan on startup. */
676#ifndef BTM_IS_DISCOVERABLE
677#define BTM_IS_DISCOVERABLE         FALSE
678#endif
679
680/* When automatic inquiry scan is enabled, this sets the discovery mode. */
681#ifndef BTM_DEFAULT_DISC_MODE
682#define BTM_DEFAULT_DISC_MODE       BTM_GENERAL_DISCOVERABLE
683#endif
684
685/* When automatic inquiry scan is enabled, this sets the inquiry scan window. */
686#ifndef BTM_DEFAULT_DISC_WINDOW
687#define BTM_DEFAULT_DISC_WINDOW     0x0012
688#endif
689
690/* When automatic inquiry scan is enabled, this sets the inquiry scan interval. */
691#ifndef BTM_DEFAULT_DISC_INTERVAL
692#define BTM_DEFAULT_DISC_INTERVAL   0x0800
693#endif
694
695/* Number of milliseconds to delay BTU task startup upon device initialization. */
696#ifndef BTU_STARTUP_DELAY
697#define BTU_STARTUP_DELAY           0
698#endif
699
700/* Whether BTA is included in BTU task. */
701#ifndef BTU_BTA_INCLUDED
702#define BTU_BTA_INCLUDED            FALSE
703#endif
704
705/* Number of seconds to wait to send an HCI Reset command upon device initialization. */
706#ifndef BTM_FIRST_RESET_DELAY
707#define BTM_FIRST_RESET_DELAY       0
708#endif
709
710/* The number of seconds to wait for controller module to reset after issuing an HCI Reset command. */
711#ifndef BTM_AFTER_RESET_TIMEOUT
712#define BTM_AFTER_RESET_TIMEOUT     0
713#endif
714
715/* The default class of device. */
716#ifndef BTM_INIT_CLASS_OF_DEVICE
717#define BTM_INIT_CLASS_OF_DEVICE    "\x00\x1F\x00"
718#endif
719
720/* The number of SCO links. */
721#ifndef BTM_MAX_SCO_LINKS
722#define BTM_MAX_SCO_LINKS           3
723#endif
724
725/* The preferred type of SCO links (2-eSCO, 0-SCO). */
726#ifndef BTM_DEFAULT_SCO_MODE
727#define BTM_DEFAULT_SCO_MODE        2
728#endif
729
730/* The number of security records for peer devices. */
731#ifndef BTM_SEC_MAX_DEVICE_RECORDS
732#define BTM_SEC_MAX_DEVICE_RECORDS  8
733#endif
734
735/* The number of security records for services. */
736#ifndef BTM_SEC_MAX_SERVICE_RECORDS
737#define BTM_SEC_MAX_SERVICE_RECORDS 24
738#endif
739
740/* If True, force a retrieval of remote device name for each bond in case it's changed */
741#ifndef BTM_SEC_FORCE_RNR_FOR_DBOND
742#define BTM_SEC_FORCE_RNR_FOR_DBOND  TRUE
743#endif
744
745/* Maximum device name length used in btm database. */
746#ifndef BTM_MAX_REM_BD_NAME_LEN
747#define BTM_MAX_REM_BD_NAME_LEN     20
748#endif
749
750/* Maximum local device name length stored btm database.
751  '0' disables storage of the local name in BTM */
752#ifndef BTM_MAX_LOC_BD_NAME_LEN
753#define BTM_MAX_LOC_BD_NAME_LEN     31
754#endif
755
756/* TRUE if default string is used, FALSE if device name is set in the application */
757#ifndef BTM_USE_DEF_LOCAL_NAME
758#define BTM_USE_DEF_LOCAL_NAME      FALSE
759#endif
760
761/* Fixed Default String (Ignored if BTM_USE_DEF_LOCAL_NAME is FALSE) */
762#ifndef BTM_DEF_LOCAL_NAME
763#define BTM_DEF_LOCAL_NAME      ""
764#endif
765
766/* Maximum service name stored with security authorization (0 if not needed) */
767#ifndef BTM_SEC_SERVICE_NAME_LEN
768#define BTM_SEC_SERVICE_NAME_LEN    BT_MAX_SERVICE_NAME_LEN
769#endif
770
771/* Maximum number of pending security callback */
772#ifndef BTM_SEC_MAX_CALLBACKS
773#define BTM_SEC_MAX_CALLBACKS       7
774#endif
775
776/* Maximum length of the service name. */
777#ifndef BT_MAX_SERVICE_NAME_LEN
778#define BT_MAX_SERVICE_NAME_LEN     21
779#endif
780
781/* ACL buffer size in HCI Host Buffer Size command. */
782#ifndef BTM_ACL_BUF_SIZE
783#define BTM_ACL_BUF_SIZE            0
784#endif
785
786/* This is set to use the BTM power manager. */
787#ifndef BTM_PWR_MGR_INCLUDED
788#define BTM_PWR_MGR_INCLUDED        TRUE
789#endif
790
791/* The maximum number of clients that can register with the power manager. */
792#ifndef BTM_MAX_PM_RECORDS
793#define BTM_MAX_PM_RECORDS          2
794#endif
795
796/* This is set to show debug trace messages for the power manager. */
797#ifndef BTM_PM_DEBUG
798#define BTM_PM_DEBUG                FALSE
799#endif
800
801/* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */
802#ifndef BTM_SCO_WAKE_PARKED_LINK
803#define BTM_SCO_WAKE_PARKED_LINK    TRUE
804#endif
805
806/* May be set to the the name of a function used for vendor specific chip initialization */
807#ifndef BTM_APP_DEV_INIT
808/* #define BTM_APP_DEV_INIT         myInitFunction() */
809#endif
810
811/* This is set to TRUE if the busy level change event is desired. (replace ACL change event) */
812#ifndef BTM_BUSY_LEVEL_CHANGE_INCLUDED
813#define BTM_BUSY_LEVEL_CHANGE_INCLUDED  TRUE
814#endif
815
816/* If the user does not respond to security process requests within this many seconds,
817 * a negative response would be sent automatically.
818 * It's recommended to use a value between 30 and OBX_TIMEOUT_VALUE
819 * 30 is LMP response timeout value */
820#ifndef BTM_SEC_TIMEOUT_VALUE
821#define BTM_SEC_TIMEOUT_VALUE           35
822#endif
823
824/* Maximum number of callbacks that can be registered using BTM_RegisterForVSEvents */
825#ifndef BTM_MAX_VSE_CALLBACKS
826#define BTM_MAX_VSE_CALLBACKS           6
827#endif
828
829/* Number of streams for dual stack */
830#ifndef BTM_SYNC_INFO_NUM_STR
831#define BTM_SYNC_INFO_NUM_STR           2
832#endif
833
834/* Number of streams for dual stack in BT Controller */
835#ifndef BTM_SYNC_INFO_NUM_STR_BTC
836#define BTM_SYNC_INFO_NUM_STR_BTC       2
837#endif
838
839/******************************************
840**    Lisbon Features
841*******************************************/
842/* This is set to TRUE if the server Extended Inquiry Response feature is desired. */
843/* server sends EIR to client */
844#ifndef BTM_EIR_SERVER_INCLUDED
845#define BTM_EIR_SERVER_INCLUDED         TRUE
846#endif
847
848/* This is set to TRUE if the client Extended Inquiry Response feature is desired. */
849/* client inquiry to server */
850#ifndef BTM_EIR_CLIENT_INCLUDED
851#define BTM_EIR_CLIENT_INCLUDED         TRUE
852#endif
853
854/* This is set to TRUE if the FEC is required for EIR packet. */
855#ifndef BTM_EIR_DEFAULT_FEC_REQUIRED
856#define BTM_EIR_DEFAULT_FEC_REQUIRED    TRUE
857#endif
858
859/* User defined UUID look up table */
860#ifndef BTM_EIR_UUID_LKUP_TBL
861#endif
862
863/* The IO capability of the local device (for Simple Pairing) */
864#ifndef BTM_LOCAL_IO_CAPS
865#define BTM_LOCAL_IO_CAPS               BTM_IO_CAP_IO
866#endif
867
868/* The default MITM Protection Requirement (for Simple Pairing)
869 * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */
870#ifndef BTM_DEFAULT_AUTH_REQ
871#define BTM_DEFAULT_AUTH_REQ            BTM_AUTH_SP_NO
872#endif
873
874/* The default MITM Protection Requirement for dedicated bonding using Simple Pairing
875 * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */
876#ifndef BTM_DEFAULT_DD_AUTH_REQ
877#define BTM_DEFAULT_DD_AUTH_REQ         BTM_AUTH_AP_YES
878#endif
879
880/* Include Out-of-Band implementation for Simple Pairing */
881#ifndef BTM_OOB_INCLUDED
882#define BTM_OOB_INCLUDED                TRUE
883#endif
884
885/* TRUE to include Sniff Subrating */
886#ifndef BTM_SSR_INCLUDED
887#define BTM_SSR_INCLUDED                TRUE
888#endif
889
890/*************************
891** End of Lisbon Features
892**************************/
893
894/* This is set to use the BTM TBFC Supported. */
895#ifndef BTM_TBFC_INCLUDED
896#define BTM_TBFC_INCLUDED               FALSE
897#endif
898
899/* TRUE to include bi-directionnal TBFC */
900#ifndef BTM_BI_DIR_TBFC_INCLUDED
901#define BTM_BI_DIR_TBFC_INCLUDED        FALSE
902#endif
903
904/* TRUE to include CLB (ConnectionLess Slave Broadcast) */
905#ifndef BTM_CLB_INCLUDED
906#define BTM_CLB_INCLUDED                FALSE
907#endif
908
909/* TRUE to include CLB Rx (ConnectionLess Broadcast Reception) */
910#ifndef BTM_CLB_RX_INCLUDED
911#define BTM_CLB_RX_INCLUDED             FALSE
912#endif
913
914/* Used for conformance testing ONLY */
915#ifndef BTM_BLE_CONFORMANCE_TESTING
916#define BTM_BLE_CONFORMANCE_TESTING     FALSE
917#endif
918
919
920/******************************************************************************
921**
922** L2CAP
923**
924******************************************************************************/
925
926/* The maximum number of simultaneous links that L2CAP can support. */
927#ifndef MAX_L2CAP_LINKS
928#define MAX_L2CAP_LINKS             4
929#endif
930
931/* The maximum number of simultaneous channels that L2CAP can support. */
932#ifndef MAX_L2CAP_CHANNELS
933#define MAX_L2CAP_CHANNELS          10
934#endif
935
936/* The maximum number of simultaneous applications that can register with L2CAP. */
937#ifndef MAX_L2CAP_CLIENTS
938#define MAX_L2CAP_CLIENTS           8
939#endif
940
941/* The number of seconds of link inactivity before a link is disconnected. */
942#ifndef L2CAP_LINK_INACTIVITY_TOUT
943#define L2CAP_LINK_INACTIVITY_TOUT  3
944#endif
945
946/* The number of seconds of link inactivity after bonding before a link is disconnected. */
947#ifndef L2CAP_BONDING_TIMEOUT
948#define L2CAP_BONDING_TIMEOUT       3
949#endif
950
951/* The time from the HCI connection complete to disconnect if no channel is established. */
952#ifndef L2CAP_LINK_STARTUP_TOUT
953#define L2CAP_LINK_STARTUP_TOUT     60
954#endif
955
956/* The L2CAP MTU; must be in accord with the HCI ACL pool size. */
957#ifndef L2CAP_MTU_SIZE
958#define L2CAP_MTU_SIZE              1691
959#endif
960
961/* The L2CAP MPS over Bluetooth; must be in accord with the FCR tx pool size and ACL down buffer size. */
962#ifndef L2CAP_MPS_OVER_BR_EDR
963#define L2CAP_MPS_OVER_BR_EDR       1010
964#endif
965
966/* The L2CAP MPS over AMP; must be in accord with the FCR tx pool size and ACL down buffer size. */
967#ifndef L2CAP_MPS_OVER_AMP
968#define L2CAP_MPS_OVER_AMP          1480
969#endif
970
971/* This is set to enable host flow control. */
972#ifndef L2CAP_HOST_FLOW_CTRL
973#define L2CAP_HOST_FLOW_CTRL        FALSE
974#endif
975
976/* If host flow control enabled, this is the number of buffers the controller can have unacknowledged. */
977#ifndef L2CAP_HOST_FC_ACL_BUFS
978#define L2CAP_HOST_FC_ACL_BUFS      20
979#endif
980
981/* The percentage of the queue size allowed before a congestion event is sent to the L2CAP client (typically 120%). */
982#ifndef L2CAP_FWD_CONG_THRESH
983#define L2CAP_FWD_CONG_THRESH       120
984#endif
985
986/* This is set to enable L2CAP to  take the ACL link out of park mode when ACL data is to be sent. */
987#ifndef L2CAP_WAKE_PARKED_LINK
988#define L2CAP_WAKE_PARKED_LINK      TRUE
989#endif
990
991/* Whether link wants to be the master or the slave. */
992#ifndef L2CAP_DESIRED_LINK_ROLE
993#define L2CAP_DESIRED_LINK_ROLE     HCI_ROLE_SLAVE
994#endif
995
996/* Include Non-Flushable Packet Boundary Flag feature of Lisbon */
997#ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED
998#define L2CAP_NON_FLUSHABLE_PB_INCLUDED     TRUE
999#endif
1000
1001/* max queued Multi-AV packets per link including controller */
1002#ifndef L2CAP_MULTI_AV_TOTAL_QUEUED_BUF
1003#define L2CAP_MULTI_AV_TOTAL_QUEUED_BUF     6
1004#endif
1005
1006/* max links supported by Multi-AV feature */
1007#ifndef L2CAP_MAX_MULTI_AV_CID
1008#define L2CAP_MAX_MULTI_AV_CID              5
1009#endif
1010
1011/* Minimum number of ACL credit for high priority link */
1012#ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
1013#define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA       4
1014#endif
1015
1016/* used for monitoring HCI ACL credit management */
1017#ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG
1018#define L2CAP_HCI_FLOW_CONTROL_DEBUG        TRUE
1019#endif
1020
1021/* Used for calculating transmit buffers off of */
1022#ifndef L2CAP_NUM_XMIT_BUFFS
1023#define L2CAP_NUM_XMIT_BUFFS                HCI_ACL_BUF_MAX
1024#endif
1025
1026/* Unicast Connectionless Data */
1027#ifndef L2CAP_UCD_INCLUDED
1028#define L2CAP_UCD_INCLUDED                  FALSE
1029#endif
1030
1031/* Unicast Connectionless Data MTU */
1032#ifndef L2CAP_UCD_MTU
1033#define L2CAP_UCD_MTU                       L2CAP_MTU_SIZE
1034#endif
1035
1036/* Unicast Connectionless Data Idle Timeout */
1037#ifndef L2CAP_UCD_IDLE_TIMEOUT
1038#define L2CAP_UCD_IDLE_TIMEOUT              2
1039#endif
1040
1041/* Unicast Connectionless Data Idle Timeout */
1042#ifndef L2CAP_UCD_CH_PRIORITY
1043#define L2CAP_UCD_CH_PRIORITY               L2CAP_CHNL_PRIORITY_MEDIUM
1044#endif
1045
1046/* Max clients on Unicast Connectionless Data */
1047#ifndef L2CAP_MAX_UCD_CLIENTS
1048#define L2CAP_MAX_UCD_CLIENTS               5
1049#endif
1050
1051/* Used for features using fixed channels; set to zero if no fixed channels supported (AMP, BLE, etc.) */
1052/* Excluding L2CAP signaling channel and UCD */
1053#ifndef L2CAP_NUM_FIXED_CHNLS
1054#define L2CAP_NUM_FIXED_CHNLS               4
1055#endif
1056
1057/* First fixed channel supported; 3 if AMP supported */
1058#ifndef L2CAP_FIRST_FIXED_CHNL
1059#define L2CAP_FIRST_FIXED_CHNL              3
1060#endif
1061
1062#ifndef L2CAP_LAST_FIXED_CHNL
1063#define L2CAP_LAST_FIXED_CHNL           (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
1064#endif
1065
1066/* Round Robin service channels in link */
1067#ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
1068#define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE   TRUE
1069#endif
1070
1071/* Reconfig after move channel between BR/EDR and AMP */
1072#ifndef L2CAP_MOVE_CH_RECONFIG_INCLUDED
1073#define L2CAP_MOVE_CH_RECONFIG_INCLUDED     FALSE
1074#endif
1075
1076/* Initiate reconfig after move channel between BR/EDR and AMP */
1077#ifndef L2CAP_MOVE_CH_RECONFIG_INTITIATOR
1078#define L2CAP_MOVE_CH_RECONFIG_INTITIATOR   FALSE
1079#endif
1080
1081/* Adjust our monitor timeout in ms plus peer's processing time on class 2 AMP controller */
1082#ifndef L2CAP_AMP_ADJUST_MONITOR_TOUT
1083#define L2CAP_AMP_ADJUST_MONITOR_TOUT       500
1084#endif
1085
1086/* Adjust our retrans timeout in ms plus peer's processing time on class 2 AMP controller */
1087#ifndef L2CAP_AMP_ADJUST_RETRANS_TOUT
1088#define L2CAP_AMP_ADJUST_RETRANS_TOUT       500
1089#endif
1090
1091/* Default local device's processing time (ms) */
1092#ifndef L2CAP_AMP_PROCESSING_TIME
1093#define L2CAP_AMP_PROCESSING_TIME           500
1094#endif
1095
1096/* Used for calculating transmit buffers off of */
1097#ifndef L2CAP_NUM_XMIT_BUFFS
1098#define L2CAP_NUM_XMIT_BUFFS                HCI_ACL_BUF_MAX
1099#endif
1100
1101/* Used for features using fixed channels; set to zero if no fixed channels supported (AMP, BLE, etc.) */
1102#ifndef L2CAP_NUM_FIXED_CHNLS
1103#define L2CAP_NUM_FIXED_CHNLS               1
1104#endif
1105
1106/* First fixed channel supported; 3 if AMP supported */
1107#ifndef L2CAP_FIRST_FIXED_CHNL
1108#define L2CAP_FIRST_FIXED_CHNL              3
1109#endif
1110
1111#ifndef L2CAP_LAST_FIXED_CHNL
1112#define L2CAP_LAST_FIXED_CHNL           (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
1113#endif
1114
1115/* used for monitoring eL2CAP data flow */
1116#ifndef L2CAP_ERTM_STATS
1117#define L2CAP_ERTM_STATS                    FALSE
1118#endif
1119
1120/* USED FOR FCR TEST ONLY:  When TRUE generates bad tx and rx packets */
1121#ifndef L2CAP_CORRUPT_ERTM_PKTS
1122#define L2CAP_CORRUPT_ERTM_PKTS             FALSE
1123#endif
1124
1125/* Used for conformance testing ONLY:  When TRUE lets scriptwrapper overwrite info response */
1126#ifndef L2CAP_CONFORMANCE_TESTING
1127#define L2CAP_CONFORMANCE_TESTING           FALSE
1128#endif
1129
1130/******************************************************************************
1131**
1132** AMP
1133**
1134******************************************************************************/
1135
1136#ifndef AMP_INCLUDED
1137#define AMP_INCLUDED            FALSE
1138#endif
1139
1140/* TRUE if AMP includes debug functionality. */
1141#ifndef AMP_DEBUG
1142#define AMP_DEBUG               FALSE
1143#endif
1144
1145/* Maximum number of simultaneous remote AMP Hosts in system */
1146#ifndef AMP_MAX_REMOTE_HOSTS
1147#define AMP_MAX_REMOTE_HOSTS    MAX_L2CAP_LINKS
1148#endif
1149
1150/* Maximum number of simultaneous remote AMP controllers in system (BR/EDR excluded) */
1151#ifndef AMP_MAX_REMOTE_CTRLS
1152#define AMP_MAX_REMOTE_CTRLS    2
1153#endif
1154
1155/* Maximum number of UUIDs per remote AMP host */
1156#ifndef AMP_MAX_UUIDS_PER_REM_HOST
1157#define AMP_MAX_UUIDS_PER_REM_HOST  4
1158#endif
1159
1160/* Maximum number of simultaneous local AMP controllers in system (BR/EDR excluded) */
1161#ifndef AMP_MAX_LOCAL_CTRLS
1162#define AMP_MAX_LOCAL_CTRLS     1
1163#endif
1164
1165/* Maximum number of simultaneous Physical Links in system */
1166#ifndef AMP_MAX_PHYS_LINKS
1167#define AMP_MAX_PHYS_LINKS      1
1168#endif
1169
1170/* The maximum number of simultaneous AMP logical links that L2CAP can support. */
1171#ifndef AMP_MAX_L2C_LOG_LINKS
1172#define AMP_MAX_L2C_LOG_LINKS   (MAX_L2CAP_LINKS * 2)
1173#endif
1174
1175/* The number of seconds of link inactivity on AMP fixed channel before the ACL is disconnected. */
1176#ifndef AMP_L2C_INACTIVITY_TIMER
1177#define AMP_L2C_INACTIVITY_TIMER    7
1178#endif
1179
1180#ifndef AMP_NUM_ALWAYS_PRESENT_LOC_CTRLRS
1181#define AMP_NUM_ALWAYS_PRESENT_LOC_CTRLRS       AMP_MAX_LOCAL_CTRLS
1182#endif
1183
1184/* If this is non-zero value then l2cap overwrites total ACL credit on AMP. */
1185/* This temporarily needs until number in dhd driver is finalized */
1186#ifndef AMP_TOTAL_NUM_BLOCKS
1187#define AMP_TOTAL_NUM_BLOCKS        0
1188#endif
1189
1190/****************************
1191** AMP Autoswitch Constants
1192*****************************/
1193/* AMP physical link inactivity timeout
1194** This is started when the last logical channel got disconnected */
1195#ifndef AMP_PHYS_LINK_INACT_DISC_TOUT
1196#define AMP_PHYS_LINK_INACT_DISC_TOUT               20
1197#endif
1198
1199/* interval between the moments to check if auto-switch ready connections
1200** on this AMP controller have to be moved to BR/EDR and if yes - to
1201** start to move the connections */
1202#ifndef AMP_AS_TOUT_ON_AMP
1203#define AMP_AS_TOUT_ON_AMP                          1
1204#endif
1205
1206/* on timeout all auto-switch ready connections
1207** have to be moved from BR/EDR to AMP */
1208#ifndef AMP_AS_TOUT_ON_BR_EDR
1209#define AMP_AS_TOUT_ON_BR_EDR                       1
1210#endif
1211
1212/* min time to stay on BR/EDR after auto-switch from AMP
1213** (during this time conditions to switch from BR/EDR to
1214** AMP are ignored) */
1215#ifndef AMP_AS_TOUT_NO_MOVE_TO_AMP
1216#define AMP_AS_TOUT_NO_MOVE_TO_AMP                  4
1217#endif
1218
1219/* TRUE means that "tout to check throughput on BR/EDR"
1220** is restarted after "no move to AMP" timer expires,
1221** i.e. move from BR/EDR will start not earlier than
1222**  AMP_AS_TOUT_NO_MOVE_TO_AMP + AMP_AS_TOUT_ON_BR_EDR
1223** FALSE means that "tout no move to AMP" and "tout
1224** to check throughput on BR/EDR" run in parallel, i.e.
1225** connections can be moved from BR/EDR any moment after
1226** "tout no move to AMP" expires. */
1227#ifndef AMP_AS_TOUT_ON_BR_EDR_AFTER_NO_MOVE_TO_AMP
1228#define AMP_AS_TOUT_ON_BR_EDR_AFTER_NO_MOVE_TO_AMP  TRUE
1229#endif
1230
1231/* Until the number of packets sent to L2CAP is <= than this
1232** value preparations for auto-switch BR/EDR->AMP do not start.
1233** If the number of packets sent to L2CAP falls to this
1234** value preparations for auto-switch BR/EDR->AMP stop. */
1235#ifndef AMP_AS_THRESHOLD_ON_BR_EDR
1236#define AMP_AS_THRESHOLD_ON_BR_EDR                  3
1237#endif
1238
1239/* the number of counters used to collect throughput data
1240** on AMP controller. Check for auto-switch conditions starts
1241** AMP_AMP_AS_COUNT_ARRAY_SIZE * AMP_AS_TOUT_ON_AMP
1242** sec after the first auto-switch ready connection is moved
1243** to this controller */
1244#ifndef AMP_AMP_AS_COUNT_ARRAY_SIZE
1245#define AMP_AMP_AS_COUNT_ARRAY_SIZE                 10
1246#endif
1247
1248/* meaning: flow spec modify is never sent to controller
1249**          best effort logical link is created with all
1250**          parameters sent to unknown...*/
1251#ifndef AMP_SIMPLISTIC_AGGREGATION
1252#define AMP_SIMPLISTIC_AGGREGATION  TRUE
1253#endif
1254
1255/* meaning: auto-switch ready connections start move
1256** BR/EDR->AMP after throughput to remote host passes
1257** some threshold in bytes (as opposite to move that
1258** starts if during some time the number of UNACKED
1259** L2CAP packets to remote host stays bigger than some
1260** threshold) */
1261#ifndef AMP_AUTO_SW_TO_AMP_BY_THROUGHPUT
1262#define AMP_AUTO_SW_TO_AMP_BY_THROUGHPUT TRUE
1263#endif
1264
1265/* the number of counters used to collect throughput data
1266** on BR/EDR controller. Check for auto-switch conditions starts
1267** AMP_BR_EDR_AS_COUNT_ARRAY_SIZE * AMP_AS_TOUT_ON_BR_EDR
1268** sec after the first auto-switch ready connection is moved
1269** to this controller */
1270#ifndef AMP_BR_EDR_AS_COUNT_ARRAY_SIZE
1271#define AMP_BR_EDR_AS_COUNT_ARRAY_SIZE              7
1272#endif
1273
1274/* if it takes more than this amount of time to transfer object on BR/EDR
1275** application(BTA) will initiate to AMP connection. */
1276#ifndef AMP_AS_TRANSFER_TIME_ON_BR_EDR
1277#define AMP_AS_TRANSFER_TIME_ON_BR_EDR              5
1278#endif
1279
1280
1281#ifndef AMP_RFC_TEST
1282#define AMP_RFC_TEST            FALSE
1283#endif
1284
1285
1286/******************************************************************************
1287**
1288** BLE
1289**
1290******************************************************************************/
1291
1292#ifndef BLE_INCLUDED
1293#define BLE_INCLUDED            FALSE
1294#endif
1295
1296#ifndef LOCAL_BLE_CONTROLLER_ID
1297#define LOCAL_BLE_CONTROLLER_ID         (AMP_MAX_LOCAL_CTRLS + 1)
1298#endif
1299
1300#ifndef BTM_BLE_PRIVACY_SPT
1301#define BTM_BLE_PRIVACY_SPT         FALSE
1302#endif
1303
1304#ifndef BTM_PERIPHERAL_ENABLED
1305#define BTM_PERIPHERAL_ENABLED     FALSE
1306#endif
1307
1308#ifndef HID_LE_INCLUDED
1309#define HID_LE_INCLUDED         FALSE
1310#endif
1311
1312#ifndef BLE_BRCM_INCLUDED
1313#define BLE_BRCM_INCLUDED         FALSE
1314#endif
1315
1316#ifndef BTM_DUMO_ADDR_CENTRAL_ENABLED
1317#define BTM_DUMO_ADDR_CENTRAL_ENABLED         FALSE
1318#endif
1319
1320
1321/******************************************************************************
1322**
1323** ATT/GATT Protocol/Profile Settings
1324**
1325******************************************************************************/
1326#ifndef ATT_DEBUG
1327#define ATT_DEBUG           FALSE
1328#endif
1329
1330#ifndef GATT_MAX_SR_PROFILES
1331#define GATT_MAX_SR_PROFILES        32 /* max is 32 */
1332#endif
1333
1334#ifndef GATT_MAX_APPS
1335#define GATT_MAX_APPS            10 /* note: 2 apps used internally GATT and GAP */
1336#endif
1337
1338#ifndef GATT_MAX_PHY_CHANNEL
1339#define GATT_MAX_PHY_CHANNEL        4 /* limited by the BLE controller upto 15 */
1340#endif
1341
1342/* Used for conformance testing ONLY */
1343#ifndef GATT_CONFORMANCE_TESTING
1344#define GATT_CONFORMANCE_TESTING           FALSE
1345#endif
1346
1347/* number of background connection device allowence, ideally to be the same as WL size
1348*/
1349#ifndef GATT_MAX_BG_CONN_DEV
1350#define GATT_MAX_BG_CONN_DEV        32
1351#endif
1352
1353/******************************************************************************
1354**
1355** SMP
1356**
1357******************************************************************************/
1358#ifndef SMP_INCLUDED
1359#define SMP_INCLUDED         FALSE
1360#endif
1361
1362#ifndef SMP_DEBUG
1363#define SMP_DEBUG            FALSE
1364#endif
1365
1366#ifndef SMP_DEFAULT_AUTH_REQ
1367#define SMP_DEFAULT_AUTH_REQ    SMP_AUTH_NB_ENC_ONLY
1368#endif
1369
1370#ifndef SMP_MAX_ENC_KEY_SIZE
1371#define SMP_MAX_ENC_KEY_SIZE    16
1372#endif
1373
1374#ifndef SMP_MIN_ENC_KEY_SIZE
1375#define SMP_MIN_ENC_KEY_SIZE    7
1376#endif
1377
1378/* Used for conformance testing ONLY */
1379#ifndef SMP_CONFORMANCE_TESTING
1380#define SMP_CONFORMANCE_TESTING           FALSE
1381#endif
1382
1383/******************************************************************************
1384**
1385** SDP
1386**
1387******************************************************************************/
1388
1389/* This is set to enable SDP server functionality. */
1390#ifndef SDP_SERVER_ENABLED
1391#define SDP_SERVER_ENABLED          TRUE
1392#endif
1393
1394/* The maximum number of SDP records the server can support. */
1395#ifndef SDP_MAX_RECORDS
1396#define SDP_MAX_RECORDS             20
1397#endif
1398
1399/* The maximum number of attributes in each record. */
1400#ifndef SDP_MAX_REC_ATTR
1401#define SDP_MAX_REC_ATTR            25
1402#endif
1403
1404#ifndef SDP_MAX_PAD_LEN
1405#define SDP_MAX_PAD_LEN             350
1406#endif
1407
1408/* The maximum length, in bytes, of an attribute. */
1409#ifndef SDP_MAX_ATTR_LEN
1410#define SDP_MAX_ATTR_LEN            256
1411#endif
1412
1413/* The maximum number of attribute filters supported by SDP databases. */
1414#ifndef SDP_MAX_ATTR_FILTERS
1415#define SDP_MAX_ATTR_FILTERS        12
1416#endif
1417
1418/* The maximum number of UUID filters supported by SDP databases. */
1419#ifndef SDP_MAX_UUID_FILTERS
1420#define SDP_MAX_UUID_FILTERS        3
1421#endif
1422
1423/* This is set to enable SDP client functionality. */
1424#ifndef SDP_CLIENT_ENABLED
1425#define SDP_CLIENT_ENABLED          TRUE
1426#endif
1427
1428/* The maximum number of record handles retrieved in a search. */
1429#ifndef SDP_MAX_DISC_SERVER_RECS
1430#define SDP_MAX_DISC_SERVER_RECS    21
1431#endif
1432
1433/* The size of a scratchpad buffer, in bytes, for storing the response to an attribute request. */
1434#ifndef SDP_MAX_LIST_BYTE_COUNT
1435#define SDP_MAX_LIST_BYTE_COUNT     1000
1436#endif
1437
1438/* The maximum number of parameters in an SDP protocol element. */
1439#ifndef SDP_MAX_PROTOCOL_PARAMS
1440#define SDP_MAX_PROTOCOL_PARAMS     2
1441#endif
1442
1443/* The maximum number of simultaneous client and server connections. */
1444#ifndef SDP_MAX_CONNECTIONS
1445#define SDP_MAX_CONNECTIONS         4
1446#endif
1447
1448/* The MTU size for the L2CAP configuration. */
1449#ifndef SDP_MTU_SIZE
1450#define SDP_MTU_SIZE                256
1451#endif
1452
1453/* The flush timeout for the L2CAP configuration. */
1454#ifndef SDP_FLUSH_TO
1455#define SDP_FLUSH_TO                0xFFFF
1456#endif
1457
1458/* The name for security authorization. */
1459#ifndef SDP_SERVICE_NAME
1460#define SDP_SERVICE_NAME            "Service Discovery"
1461#endif
1462
1463/* The security level for BTM. */
1464#ifndef SDP_SECURITY_LEVEL
1465#define SDP_SECURITY_LEVEL          BTM_SEC_NONE
1466#endif
1467
1468/******************************************************************************
1469**
1470** RFCOMM
1471**
1472******************************************************************************/
1473
1474#ifndef RFCOMM_INCLUDED
1475#define RFCOMM_INCLUDED             FALSE
1476#endif
1477
1478/* The maximum number of ports supported. */
1479#ifndef MAX_RFC_PORTS
1480#define MAX_RFC_PORTS               5
1481#endif
1482
1483/* The maximum simultaneous links to different devices. */
1484#ifndef MAX_BD_CONNECTIONS
1485#define MAX_BD_CONNECTIONS          1
1486#endif
1487
1488/* The port receive queue low watermark level, in bytes. */
1489#ifndef PORT_RX_LOW_WM
1490#define PORT_RX_LOW_WM              5000
1491#endif
1492
1493/* The port receive queue high watermark level, in bytes. */
1494#ifndef PORT_RX_HIGH_WM
1495#define PORT_RX_HIGH_WM             8000
1496#endif
1497
1498/* The port receive queue critical watermark level, in bytes. */
1499#ifndef PORT_RX_CRITICAL_WM
1500#define PORT_RX_CRITICAL_WM         12000
1501#endif
1502
1503/* The port receive queue low watermark level, in number of buffers. */
1504#ifndef PORT_RX_BUF_LOW_WM
1505#define PORT_RX_BUF_LOW_WM          8
1506#endif
1507
1508/* The port receive queue high watermark level, in number of buffers. */
1509#ifndef PORT_RX_BUF_HIGH_WM
1510#define PORT_RX_BUF_HIGH_WM         16
1511#endif
1512
1513/* The port receive queue critical watermark level, in number of buffers. */
1514#ifndef PORT_RX_BUF_CRITICAL_WM
1515#define PORT_RX_BUF_CRITICAL_WM     22
1516#endif
1517
1518/* The port transmit queue high watermark level, in bytes. */
1519#ifndef PORT_TX_HIGH_WM
1520#define PORT_TX_HIGH_WM             8000
1521#endif
1522
1523/* The port transmit queue critical watermark level, in bytes. */
1524#ifndef PORT_TX_CRITICAL_WM
1525#define PORT_TX_CRITICAL_WM         10000
1526#endif
1527
1528/* The port transmit queue high watermark level, in number of buffers. */
1529#ifndef PORT_TX_BUF_HIGH_WM
1530#define PORT_TX_BUF_HIGH_WM         16
1531#endif
1532
1533/* The port transmit queue high watermark level, in number of buffers. */
1534#ifndef PORT_TX_BUF_CRITICAL_WM
1535#define PORT_TX_BUF_CRITICAL_WM     22
1536#endif
1537
1538/* The RFCOMM multiplexer preferred flow control mechanism. */
1539#ifndef PORT_FC_DEFAULT
1540#define PORT_FC_DEFAULT             PORT_FC_CREDIT
1541#endif
1542
1543/* The maximum number of credits receiver sends to peer when using credit-based flow control. */
1544#ifndef PORT_CREDIT_RX_MAX
1545#define PORT_CREDIT_RX_MAX          16
1546#endif
1547
1548/* The credit low watermark level. */
1549#ifndef PORT_CREDIT_RX_LOW
1550#define PORT_CREDIT_RX_LOW          8
1551#endif
1552
1553/* if application like BTA, Java or script test engine is running on other than BTU thread, */
1554/* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_lock() or GKI_disable() */
1555#ifndef PORT_SCHEDULE_LOCK
1556#define PORT_SCHEDULE_LOCK          GKI_disable()
1557#endif
1558
1559/* if application like BTA, Java or script test engine is running on other than BTU thread, */
1560/* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_unlock() or GKI_enable() */
1561#ifndef PORT_SCHEDULE_UNLOCK
1562#define PORT_SCHEDULE_UNLOCK        GKI_enable()
1563#endif
1564
1565/******************************************************************************
1566**
1567** TCS
1568**
1569******************************************************************************/
1570
1571#ifndef TCS_INCLUDED
1572#define TCS_INCLUDED                FALSE
1573#endif
1574
1575/* If set to TRUE, gives lean TCS state machine configuration. */
1576#ifndef TCS_LEAN
1577#define TCS_LEAN                    FALSE
1578#endif
1579
1580/* To include/exclude point-to-multipoint broadcast SETUP configuration. */
1581#ifndef TCS_BCST_SETUP_INCLUDED
1582#define TCS_BCST_SETUP_INCLUDED     TRUE
1583#endif
1584
1585/* To include/exclude supplementary services. */
1586#ifndef TCS_SUPP_SVCS_INCLUDED
1587#define TCS_SUPP_SVCS_INCLUDED      TRUE
1588#endif
1589
1590/* To include/exclude WUG master role. */
1591#ifndef TCS_WUG_MASTER_INCLUDED
1592#define TCS_WUG_MASTER_INCLUDED     TRUE
1593#endif
1594
1595/* To include/exclude WUG member role. */
1596#ifndef TCS_WUG_MEMBER_INCLUDED
1597#define TCS_WUG_MEMBER_INCLUDED     TRUE
1598#endif
1599
1600/* Maximum number of WUG members. */
1601#ifndef TCS_MAX_WUG_MEMBERS
1602#define TCS_MAX_WUG_MEMBERS         7
1603#endif
1604
1605/* Widcomm specific acknowledgement message to ensure fast and robust operation of WUG FIMA procedure. */
1606#ifndef TCS_WUG_LISTEN_ACPT_ACK_INCLUDED
1607#define TCS_WUG_LISTEN_ACPT_ACK_INCLUDED TRUE
1608#endif
1609
1610/* The number of simultaneous calls supported. */
1611#ifndef TCS_MAX_NUM_SIMUL_CALLS
1612#define TCS_MAX_NUM_SIMUL_CALLS     3
1613#endif
1614
1615/* The number of devices the device can connect to. */
1616#ifndef TCS_MAX_NUM_ACL_CONNS
1617#define TCS_MAX_NUM_ACL_CONNS       7
1618#endif
1619
1620/* The maximum length, in bytes, of the company specific information element. */
1621#ifndef TCS_MAX_CO_SPEC_LEN
1622#define TCS_MAX_CO_SPEC_LEN         40
1623#endif
1624
1625/* The maximum length, in bytes, of the audio control information element . */
1626#ifndef TCS_MAX_AUDIO_CTL_LEN
1627#define TCS_MAX_AUDIO_CTL_LEN       40
1628#endif
1629
1630/* (Dis)allow EDR ESCO */
1631#ifndef TCS_AUDIO_USE_ESCO_EDR
1632#define TCS_AUDIO_USE_ESCO_EDR      FALSE
1633#endif
1634
1635/******************************************************************************
1636**
1637** OBX
1638**
1639******************************************************************************/
1640#ifndef OBX_INCLUDED
1641#define OBX_INCLUDED               FALSE
1642#endif
1643
1644#ifndef OBX_CLIENT_INCLUDED
1645#define OBX_CLIENT_INCLUDED        TRUE
1646#endif
1647
1648#ifndef OBX_SERVER_INCLUDED
1649#define OBX_SERVER_INCLUDED        TRUE
1650#endif
1651
1652/* TRUE to include OBEX authentication/MD5 test code */
1653#ifndef OBX_MD5_TEST_INCLUDED
1654#define OBX_MD5_TEST_INCLUDED       FALSE
1655#endif
1656
1657/* The timeout value (in seconds) for reliable sessions to remain in suspend. 0xFFFFFFFF for no timeout event. */
1658#ifndef OBX_SESS_TIMEOUT_VALUE
1659#define OBX_SESS_TIMEOUT_VALUE      600
1660#endif
1661
1662/* The idle timeout value. 0 for no timeout event. */
1663#ifndef OBX_TIMEOUT_VALUE
1664#define OBX_TIMEOUT_VALUE           60
1665#endif
1666
1667/* Timeout value used for disconnect */
1668#ifndef OBX_DISC_TOUT_VALUE
1669#define OBX_DISC_TOUT_VALUE         5
1670#endif
1671
1672/* The maximum number of registered servers. */
1673#ifndef OBX_NUM_SERVERS
1674#define OBX_NUM_SERVERS             12
1675#endif
1676
1677/* The maximum number of sessions for all registered servers.
1678 * (must be equal or bigger than OBX_NUM_SERVERS) */
1679#ifndef OBX_NUM_SR_SESSIONS
1680#define OBX_NUM_SR_SESSIONS         26
1681#endif
1682
1683/* The maximum number of sessions per registered server.
1684 * must be less than MAX_BD_CONNECTIONS */
1685#ifndef OBX_MAX_SR_SESSION
1686#define OBX_MAX_SR_SESSION          4
1687#endif
1688
1689/* The maximum number of suspended sessions per registered servers. */
1690#ifndef OBX_MAX_SUSPEND_SESSIONS
1691#define OBX_MAX_SUSPEND_SESSIONS    4
1692#endif
1693
1694/* The maximum number of active clients. */
1695#ifndef OBX_NUM_CLIENTS
1696#define OBX_NUM_CLIENTS             8
1697#endif
1698
1699/* The maximum length of OBEX target header.*/
1700#ifndef OBX_MAX_TARGET_LEN
1701#define OBX_MAX_TARGET_LEN          16
1702#endif
1703
1704/* The maximum length of authentication challenge realm.*/
1705#ifndef OBX_MAX_REALM_LEN
1706#define OBX_MAX_REALM_LEN           30
1707#endif
1708
1709/* The maximum of GKI buffer queued at OBX before flow control L2CAP */
1710#ifndef OBX_MAX_RX_QUEUE_COUNT
1711#define OBX_MAX_RX_QUEUE_COUNT      3
1712#endif
1713
1714/* This option is application when OBEX over L2CAP is in use
1715   Pool ID where to reassemble the SDU.
1716   This Pool will allow buffers to be used that are larger than
1717   the L2CAP_MAX_MTU. */
1718#ifndef OBX_USER_RX_POOL_ID
1719#define OBX_USER_RX_POOL_ID     OBX_LRG_DATA_POOL_ID
1720#endif
1721
1722/* This option is application when OBEX over L2CAP is in use
1723   Pool ID where to hold the SDU.
1724   This Pool will allow buffers to be used that are larger than
1725   the L2CAP_MAX_MTU. */
1726#ifndef OBX_USER_TX_POOL_ID
1727#define OBX_USER_TX_POOL_ID     OBX_LRG_DATA_POOL_ID
1728#endif
1729
1730/* This option is application when OBEX over L2CAP is in use
1731GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
1732*/
1733#ifndef OBX_FCR_RX_POOL_ID
1734#define OBX_FCR_RX_POOL_ID      HCI_ACL_POOL_ID
1735#endif
1736
1737/* This option is application when OBEX over L2CAP is in use
1738GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
1739L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
1740Note:  This pool needs to have enough buffers to hold two times the window size negotiated
1741 in the L2CA_SetFCROptions (2 * tx_win_size)  to allow for retransmissions.
1742 The size of each buffer must be able to hold the maximum MPS segment size passed in
1743 L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1744*/
1745#ifndef OBX_FCR_TX_POOL_ID
1746#define OBX_FCR_TX_POOL_ID      HCI_ACL_POOL_ID
1747#endif
1748
1749/* This option is application when OBEX over L2CAP is in use
1750Size of the transmission window when using enhanced retransmission mode. Not used
1751in basic and streaming modes. Range: 1 - 63
1752This is used when AMP_INCLUDED == FALSE
1753*/
1754#ifndef OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR
1755#define OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR       20
1756#endif
1757
1758/* This option is application when OBEX over L2CAP is in use
1759Size of the transmission window when using enhanced retransmission mode. Not used
1760in basic and streaming modes. Range: 1 - 63
1761This is used when AMP_INCLUDED == TRUE
1762*/
1763#ifndef OBX_FCR_OPT_TX_WINDOW_SIZE_AMP
1764#define OBX_FCR_OPT_TX_WINDOW_SIZE_AMP          45
1765#endif
1766
1767/* This option is application when OBEX over L2CAP is in use
1768Number of transmission attempts for a single I-Frame before taking
1769Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1770Streaming modes.
1771Range: 0, 1-0xFF
17720 - infinite retransmissions
17731 - single transmission
1774*/
1775#ifndef OBX_FCR_OPT_MAX_TX_B4_DISCNT
1776#define OBX_FCR_OPT_MAX_TX_B4_DISCNT    20
1777#endif
1778
1779/* This option is application when OBEX over L2CAP is in use
1780Retransmission Timeout
1781Range: Minimum 2000 (2 secs) on BR/EDR when supporting PBF.
1782 */
1783#ifndef OBX_FCR_OPT_RETX_TOUT
1784#define OBX_FCR_OPT_RETX_TOUT           2000
1785#endif
1786
1787/* This option is application when OBEX over L2CAP is in use
1788Monitor Timeout
1789Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
1790*/
1791#ifndef OBX_FCR_OPT_MONITOR_TOUT
1792#define OBX_FCR_OPT_MONITOR_TOUT        12000
1793#endif
1794
1795/******************************************************************************
1796**
1797** BNEP
1798**
1799******************************************************************************/
1800
1801#ifndef BNEP_INCLUDED
1802#define BNEP_INCLUDED               FALSE
1803#endif
1804
1805/* Protocol filtering is an optional feature. Bydefault it will be turned on */
1806#ifndef BNEP_SUPPORTS_PROT_FILTERS
1807#define BNEP_SUPPORTS_PROT_FILTERS          TRUE
1808#endif
1809
1810/* Multicast filtering is an optional feature. Bydefault it will be turned on */
1811#ifndef BNEP_SUPPORTS_MULTI_FILTERS
1812#define BNEP_SUPPORTS_MULTI_FILTERS         TRUE
1813#endif
1814
1815/* BNEP status API call is used mainly to get the L2CAP handle */
1816#ifndef BNEP_SUPPORTS_STATUS_API
1817#define BNEP_SUPPORTS_STATUS_API            TRUE
1818#endif
1819
1820/* This is just a debug function */
1821#ifndef BNEP_SUPPORTS_DEBUG_DUMP
1822#define BNEP_SUPPORTS_DEBUG_DUMP            TRUE
1823#endif
1824
1825#ifndef BNEP_SUPPORTS_ALL_UUID_LENGTHS
1826#define BNEP_SUPPORTS_ALL_UUID_LENGTHS      TRUE    /* Otherwise it will support only 16bit UUIDs */
1827#endif
1828
1829/*
1830** When BNEP connection changes roles after the connection is established
1831** we will do an authentication check again on the new role
1832*/
1833#ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH
1834#define BNEP_DO_AUTH_FOR_ROLE_SWITCH        TRUE
1835#endif
1836
1837
1838/* Maximum number of protocol filters supported. */
1839#ifndef BNEP_MAX_PROT_FILTERS
1840#define BNEP_MAX_PROT_FILTERS       5
1841#endif
1842
1843/* Maximum number of multicast filters supported. */
1844#ifndef BNEP_MAX_MULTI_FILTERS
1845#define BNEP_MAX_MULTI_FILTERS      5
1846#endif
1847
1848/* Minimum MTU size. */
1849#ifndef BNEP_MIN_MTU_SIZE
1850#define BNEP_MIN_MTU_SIZE           L2CAP_MTU_SIZE
1851#endif
1852
1853/* Preferred MTU size. */
1854#ifndef BNEP_MTU_SIZE
1855#define BNEP_MTU_SIZE               BNEP_MIN_MTU_SIZE
1856#endif
1857
1858/* Maximum size of user data, in bytes.  */
1859#ifndef BNEP_MAX_USER_DATA_SIZE
1860#define BNEP_MAX_USER_DATA_SIZE     1500
1861#endif
1862
1863/* Maximum number of buffers allowed in transmit data queue. */
1864#ifndef BNEP_MAX_XMITQ_DEPTH
1865#define BNEP_MAX_XMITQ_DEPTH        20
1866#endif
1867
1868/* Maximum number BNEP of connections supported. */
1869#ifndef BNEP_MAX_CONNECTIONS
1870#define BNEP_MAX_CONNECTIONS        7
1871#endif
1872
1873
1874/******************************************************************************
1875**
1876** AVDTP
1877**
1878******************************************************************************/
1879
1880#ifndef AVDT_INCLUDED
1881#define AVDT_INCLUDED               FALSE
1882#endif
1883
1884/* Include reporting capability in AVDTP */
1885#ifndef AVDT_REPORTING
1886#define AVDT_REPORTING              TRUE
1887#endif
1888
1889/* Include multiplexing capability in AVDTP */
1890#ifndef AVDT_MULTIPLEXING
1891#define AVDT_MULTIPLEXING           TRUE
1892#endif
1893
1894/* Number of simultaneous links to different peer devices. */
1895#ifndef AVDT_NUM_LINKS
1896#define AVDT_NUM_LINKS              2
1897#endif
1898
1899/* Number of simultaneous stream endpoints. */
1900#ifndef AVDT_NUM_SEPS
1901#define AVDT_NUM_SEPS               3
1902#endif
1903
1904/* Number of transport channels setup per media stream(audio or video) */
1905#ifndef AVDT_NUM_CHANNELS
1906
1907#if AVDT_REPORTING == TRUE
1908/* signaling, media and reporting channels */
1909#define AVDT_NUM_CHANNELS   3
1910#else
1911/* signaling and media channels */
1912#define AVDT_NUM_CHANNELS   2
1913#endif
1914
1915#endif
1916
1917/* Number of transport channels setup by AVDT for all media streams
1918 * AVDT_NUM_CHANNELS * Number of simultaneous streams.
1919 */
1920#ifndef AVDT_NUM_TC_TBL
1921#define AVDT_NUM_TC_TBL             6
1922#endif
1923
1924
1925/* Maximum size in bytes of the codec capabilities information element. */
1926#ifndef AVDT_CODEC_SIZE
1927#define AVDT_CODEC_SIZE             10
1928#endif
1929
1930/* Maximum size in bytes of the content protection information element. */
1931#ifndef AVDT_PROTECT_SIZE
1932#define AVDT_PROTECT_SIZE           90
1933#endif
1934
1935/* Maximum number of GKI buffers in the fragment queue (for video frames).
1936 * Must be less than the number of buffers in the buffer pool of size AVDT_DATA_POOL_SIZE */
1937#ifndef AVDT_MAX_FRAG_COUNT
1938#define AVDT_MAX_FRAG_COUNT         15
1939#endif
1940
1941/******************************************************************************
1942**
1943** PAN
1944**
1945******************************************************************************/
1946
1947#ifndef PAN_INCLUDED
1948#define PAN_INCLUDED                     FALSE
1949#endif
1950
1951/* This will enable the PANU role */
1952#ifndef PAN_SUPPORTS_ROLE_PANU
1953#define PAN_SUPPORTS_ROLE_PANU              TRUE
1954#endif
1955
1956/* This will enable the GN role */
1957#ifndef PAN_SUPPORTS_ROLE_GN
1958#define PAN_SUPPORTS_ROLE_GN                TRUE
1959#endif
1960
1961/* This will enable the NAP role */
1962#ifndef PAN_SUPPORTS_ROLE_NAP
1963#define PAN_SUPPORTS_ROLE_NAP               TRUE
1964#endif
1965
1966/* This is just for debugging purposes */
1967#ifndef PAN_SUPPORTS_DEBUG_DUMP
1968#define PAN_SUPPORTS_DEBUG_DUMP             TRUE
1969#endif
1970
1971
1972/* Maximum number of PAN connections allowed */
1973#ifndef MAX_PAN_CONNS
1974#define MAX_PAN_CONNS                    7
1975#endif
1976
1977/* Default service name for NAP role */
1978#ifndef PAN_NAP_DEFAULT_SERVICE_NAME
1979#define PAN_NAP_DEFAULT_SERVICE_NAME    "Network Access Point Service"
1980#endif
1981
1982/* Default service name for GN role */
1983#ifndef PAN_GN_DEFAULT_SERVICE_NAME
1984#define PAN_GN_DEFAULT_SERVICE_NAME     "Group Network Service"
1985#endif
1986
1987/* Default service name for PANU role */
1988#ifndef PAN_PANU_DEFAULT_SERVICE_NAME
1989#define PAN_PANU_DEFAULT_SERVICE_NAME   "PAN User Service"
1990#endif
1991
1992/* Default description for NAP role service */
1993#ifndef PAN_NAP_DEFAULT_DESCRIPTION
1994#define PAN_NAP_DEFAULT_DESCRIPTION     "Public NAP"
1995#endif
1996
1997/* Default description for GN role service */
1998#ifndef PAN_GN_DEFAULT_DESCRIPTION
1999#define PAN_GN_DEFAULT_DESCRIPTION      "Widcomm GN"
2000#endif
2001
2002/* Default description for PANU role service */
2003#ifndef PAN_PANU_DEFAULT_DESCRIPTION
2004#define PAN_PANU_DEFAULT_DESCRIPTION    "Laptop's PANU"
2005#endif
2006
2007/* Default Security level for PANU role. */
2008#ifndef PAN_PANU_SECURITY_LEVEL
2009#define PAN_PANU_SECURITY_LEVEL          0
2010#endif
2011
2012/* Default Security level for GN role. */
2013#ifndef PAN_GN_SECURITY_LEVEL
2014#define PAN_GN_SECURITY_LEVEL            0
2015#endif
2016
2017/* Default Security level for NAP role. */
2018#ifndef PAN_NAP_SECURITY_LEVEL
2019#define PAN_NAP_SECURITY_LEVEL           0
2020#endif
2021
2022
2023
2024
2025/******************************************************************************
2026**
2027** GAP
2028**
2029******************************************************************************/
2030
2031#ifndef GAP_INCLUDED
2032#define GAP_INCLUDED                FALSE
2033#endif
2034
2035/* This is set to enable use of GAP L2CAP connections. */
2036#ifndef GAP_CONN_INCLUDED
2037#define GAP_CONN_INCLUDED           TRUE
2038#endif
2039
2040/* This is set to enable posting event for data write */
2041#ifndef GAP_CONN_POST_EVT_INCLUDED
2042#define GAP_CONN_POST_EVT_INCLUDED  FALSE
2043#endif
2044
2045/* The maximum number of simultaneous GAP L2CAP connections. */
2046#ifndef GAP_MAX_CONNECTIONS
2047#define GAP_MAX_CONNECTIONS         8
2048#endif
2049
2050/******************************************************************************
2051**
2052** CTP
2053**
2054******************************************************************************/
2055
2056#ifndef CTP_INCLUDED
2057#define CTP_INCLUDED                FALSE
2058#endif
2059
2060/* To include CTP gateway functionality or not. */
2061#ifndef CTP_GW_INCLUDED
2062#define CTP_GW_INCLUDED             TRUE
2063#endif
2064
2065/* The number of terminals supported. */
2066#ifndef CTP_MAX_NUM_TLS
2067#define CTP_MAX_NUM_TLS             7
2068#endif
2069
2070/* If the controller can not support sniff mode when the SCO is up, set this to FALSE. */
2071#ifndef CTP_USE_SNIFF_ON_SCO
2072#define CTP_USE_SNIFF_ON_SCO        FALSE
2073#endif
2074
2075/* 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. */
2076#ifndef CTP_TL_IDLE_TIMEOUT
2077#define CTP_TL_IDLE_TIMEOUT         90
2078#endif
2079
2080/* To include CTP terminal functionality or not. */
2081#ifndef CTP_TL_INCLUDED
2082#define CTP_TL_INCLUDED             TRUE
2083#endif
2084
2085/* To include CTP device discovery functionality or not. */
2086#ifndef CTP_DISCOVERY_INCLUDED
2087#define CTP_DISCOVERY_INCLUDED      TRUE
2088#endif
2089
2090/* set to TRUE for controllers that do not support multi-point */
2091#ifndef CTP_TL_WAIT_DISC
2092#define CTP_TL_WAIT_DISC            TRUE
2093#endif
2094
2095/* The CTP inquiry database size. */
2096#ifndef CTP_INQ_DB_SIZE
2097#define CTP_INQ_DB_SIZE             CTP_DISC_REC_SIZE
2098#endif
2099
2100/* The CTP discovery record size. */
2101#ifndef CTP_DISC_REC_SIZE
2102#define CTP_DISC_REC_SIZE           60
2103#endif
2104
2105/* CTP TL would try to re-establish L2CAP channel after channel is disconnected for this amount of seconds. */
2106#ifndef CTP_GUARD_LINK_LOST
2107#define CTP_GUARD_LINK_LOST         1
2108#endif
2109
2110/* The link policy bitmap. */
2111#ifndef CTP_DEFAULT_LINK_POLICY
2112#define CTP_DEFAULT_LINK_POLICY     0x000F
2113#endif
2114
2115/* The minimum period interval used for the sniff and park modes. */
2116#ifndef CTP_DEF_LOWPWR_MIN_PERIOD
2117#define CTP_DEF_LOWPWR_MIN_PERIOD   0x100
2118#endif
2119
2120/* The maximum period interval used for the sniff and park modes. */
2121#ifndef CTP_DEF_LOWPWR_MAX_PERIOD
2122#define CTP_DEF_LOWPWR_MAX_PERIOD   0x1E0
2123#endif
2124
2125/* The number of baseband receive slot sniff attempts. */
2126#ifndef CTP_DEF_LOWPWR_ATTEMPT
2127#define CTP_DEF_LOWPWR_ATTEMPT      0x200
2128#endif
2129
2130/* The number of baseband receive slots for sniff timeout. */
2131#ifndef CTP_DEF_LOWPWR_TIMEOUT
2132#define CTP_DEF_LOWPWR_TIMEOUT      0x200
2133#endif
2134
2135/* This is set if CTP is to use park mode. */
2136#ifndef CTP_PARK_INCLUDED
2137#define CTP_PARK_INCLUDED           TRUE
2138#endif
2139
2140/* This is set if CTP is to use sniff mode. */
2141#ifndef CTP_SNIFF_INCLUDED
2142#define CTP_SNIFF_INCLUDED          TRUE
2143#endif
2144
2145/* To include CTP data exchange functionality or not. */
2146#ifndef CTP_DATA_EXCHG_FEATURE
2147#define CTP_DATA_EXCHG_FEATURE      FALSE
2148#endif
2149
2150/* To include CTP GW intercom functionality or not. */
2151#ifndef CTP_GW_INTERCOM_FEATURE
2152#define CTP_GW_INTERCOM_FEATURE     FALSE
2153#endif
2154
2155/* The MTU size for L2CAP channel. */
2156#ifndef CTP_MTU_SIZE
2157#define CTP_MTU_SIZE                200
2158#endif
2159
2160/* The L2CAP PSM for the data exchange feature. */
2161#ifndef CTP_DATA_EXCHG_PSM
2162#define CTP_DATA_EXCHG_PSM          13
2163#endif
2164
2165/* The flush timeout for L2CAP channels. */
2166#ifndef CTP_FLUSH_TO
2167#define CTP_FLUSH_TO                0xFFFF
2168#endif
2169
2170/* The default service name for CTP. */
2171#ifndef CTP_DEFAULT_SERVICE_NAME
2172#define CTP_DEFAULT_SERVICE_NAME    "Cordless Telephony"
2173#endif
2174
2175/* The CTP security level. */
2176#ifndef CTP_SECURITY_LEVEL
2177#define CTP_SECURITY_LEVEL          (BTM_SEC_IN_AUTHORIZE | BTM_SEC_IN_AUTHENTICATE | BTM_SEC_IN_ENCRYPT)
2178#endif
2179
2180/* The number of lines to the external network. */
2181#ifndef CTP_MAX_LINES
2182#define CTP_MAX_LINES               1
2183#endif
2184
2185/* Test if the number of resources in TCS is consistent with CTP setting. */
2186#ifndef CTP_TEST_FULL_TCS
2187#define CTP_TEST_FULL_TCS           TRUE
2188#endif
2189
2190/* The default inquiry mode. */
2191#ifndef CTP_DEFAULT_INQUIRY_MODE
2192#define CTP_DEFAULT_INQUIRY_MODE    BTM_GENERAL_INQUIRY
2193#endif
2194
2195/* The default inquiry duration. */
2196#ifndef CTP_DEFAULT_INQ_DURATION
2197#define CTP_DEFAULT_INQ_DURATION    4
2198#endif
2199
2200/* The maximum number of inquiry responses. */
2201#ifndef CTP_DEFAULT_INQ_MAX_RESP
2202#define CTP_DEFAULT_INQ_MAX_RESP    3
2203#endif
2204
2205/* When TL does not create another L2CAP channel within this period of time GW declares that it's "Connected Limited". */
2206#ifndef CTP_TL_CONN_TIMEOUT
2207#define CTP_TL_CONN_TIMEOUT         5
2208#endif
2209
2210/* The delay for ACL to completely disconnect (for intercom) before sending the connect request to GW. */
2211#ifndef CTP_RECONNECT_DELAY
2212#define CTP_RECONNECT_DELAY         5
2213#endif
2214
2215/* How many times to retry connection when it has failed. */
2216#ifndef CTP_RETRY_ON_CONN_ERR
2217#define CTP_RETRY_ON_CONN_ERR       5
2218#endif
2219
2220/******************************************************************************
2221**
2222** ICP
2223**
2224******************************************************************************/
2225
2226#ifndef ICP_INCLUDED
2227#define ICP_INCLUDED                FALSE
2228#endif
2229
2230/* The ICP default MTU. */
2231#ifndef ICP_MTU_SIZE
2232#define ICP_MTU_SIZE                100
2233#endif
2234
2235/* The ICP security level. */
2236#ifndef ICP_SECURITY_LEVEL
2237#define ICP_SECURITY_LEVEL          BTM_SEC_NONE
2238#endif
2239
2240/* The default service name for ICP. */
2241#ifndef ICP_DEFAULT_SERVICE_NAME
2242#define ICP_DEFAULT_SERVICE_NAME    "Intercom"
2243#endif
2244
2245/* The flush timeout for L2CAP channels. */
2246#ifndef ICP_FLUSH_TO
2247#define ICP_FLUSH_TO                0xFFFF
2248#endif
2249
2250/******************************************************************************
2251**
2252** SPP
2253**
2254******************************************************************************/
2255
2256#ifndef SPP_INCLUDED
2257#define SPP_INCLUDED                FALSE
2258#endif
2259
2260/* The SPP default MTU. */
2261#ifndef SPP_DEFAULT_MTU
2262#define SPP_DEFAULT_MTU             127
2263#endif
2264
2265/* The interval, in seconds, that a client tries to reconnect to a service. */
2266#ifndef SPP_RETRY_CONN_INTERVAL
2267#define SPP_RETRY_CONN_INTERVAL     1
2268#endif
2269
2270/* The SPP discoverable mode: limited or general. */
2271#ifndef SPP_DISCOVERABLE_MODE
2272#define SPP_DISCOVERABLE_MODE       BTM_GENERAL_DISCOVERABLE
2273#endif
2274
2275/* The maximum number of inquiry results returned in by inquiry procedure. */
2276#ifndef SPP_DEF_INQ_MAX_RESP
2277#define SPP_DEF_INQ_MAX_RESP        10
2278#endif
2279
2280/* The SPP discovery record size. */
2281#ifndef SPP_DISC_REC_SIZE
2282#define SPP_DISC_REC_SIZE           60
2283#endif
2284
2285#ifndef SPP_MAX_RECS_PER_DEVICE
2286#define SPP_MAX_RECS_PER_DEVICE     (SPP_DB_SIZE / SPP_DISC_REC_SIZE)
2287#endif
2288
2289/* Inquiry duration in 1.28 second units. */
2290#ifndef SPP_DEF_INQ_DURATION
2291#define SPP_DEF_INQ_DURATION        9
2292#endif
2293
2294/* keep the raw data received from SDP server in database. */
2295#ifndef SDP_RAW_DATA_INCLUDED
2296#define SDP_RAW_DATA_INCLUDED       FALSE
2297#endif
2298
2299/* TRUE, to allow JV to create L2CAP connection on SDP PSM. */
2300#ifndef SDP_FOR_JV_INCLUDED
2301#define SDP_FOR_JV_INCLUDED         FALSE
2302#endif
2303
2304/* Inquiry duration in 1.28 second units. */
2305#ifndef SDP_DEBUG
2306#define SDP_DEBUG                   TRUE
2307#endif
2308
2309/******************************************************************************
2310**
2311** HSP2, HFP
2312**
2313******************************************************************************/
2314
2315#ifndef HSP2_INCLUDED
2316#define HSP2_INCLUDED               FALSE
2317#endif
2318
2319/* Include the ability to perform inquiry for peer devices. */
2320#ifndef HSP2_INQUIRY_INCLUDED
2321#define HSP2_INQUIRY_INCLUDED       TRUE
2322#endif
2323
2324/* Include Audio Gateway specific code. */
2325#ifndef HSP2_AG_INCLUDED
2326#define HSP2_AG_INCLUDED            TRUE
2327#endif
2328
2329/* Include Headset Specific Code. */
2330#ifndef HSP2_HS_INCLUDED
2331#define HSP2_HS_INCLUDED            TRUE
2332#endif
2333
2334/* Include the ability to open an SCO connection for In-Band Ringing. */
2335#ifndef HSP2_IB_RING_INCLUDED
2336#define HSP2_IB_RING_INCLUDED       TRUE
2337#endif
2338
2339/* Include the ability to repeat a ring. */
2340#ifndef HSP2_AG_REPEAT_RING
2341#define HSP2_AG_REPEAT_RING         TRUE
2342#endif
2343
2344#ifndef HSP2_APP_CLOSES_ON_CKPD
2345#define HSP2_APP_CLOSES_ON_CKPD     FALSE
2346#endif
2347
2348
2349/* Include the ability to park a connection. */
2350#ifndef HSP2_PARK_INCLUDED
2351#define HSP2_PARK_INCLUDED          TRUE
2352#endif
2353
2354/* Include HSP State Machine debug trace messages. */
2355#ifndef HSP2_FSM_DEBUG
2356#define HSP2_FSM_DEBUG              TRUE
2357#endif
2358
2359/* The Module's Inquiry Scan Window. */
2360#ifndef HSP2_INQ_SCAN_WINDOW
2361#define HSP2_INQ_SCAN_WINDOW        0
2362#endif
2363
2364/* The Module's Inquiry Scan Interval. */
2365#ifndef HSP2_INQ_SCAN_INTERVAL
2366#define HSP2_INQ_SCAN_INTERVAL      0
2367#endif
2368
2369/* The Module's Page Scan Interval. */
2370#ifndef HSP2_PAGE_SCAN_INTERVAL
2371#define HSP2_PAGE_SCAN_INTERVAL     0
2372#endif
2373
2374/* The Module's Page Scan Window. */
2375#ifndef HSP2_PAGE_SCAN_WINDOW
2376#define HSP2_PAGE_SCAN_WINDOW       0
2377#endif
2378
2379/* The Park Mode's Minimum Beacon Period. */
2380#ifndef HSP2_BEACON_MIN_PERIOD
2381#define HSP2_BEACON_MIN_PERIOD      450
2382#endif
2383
2384/* The Park Mode's Maximum Beacon Period. */
2385#ifndef HSP2_BEACON_MAX_PERIOD
2386#define HSP2_BEACON_MAX_PERIOD      500
2387#endif
2388
2389/* The duration of the inquiry in seconds. */
2390#ifndef HSP2_INQ_DURATION
2391#define HSP2_INQ_DURATION           4
2392#endif
2393
2394/* Maximum number of peer responses during an inquiry. */
2395#ifndef HSP2_INQ_MAX_NUM_RESPS
2396#define HSP2_INQ_MAX_NUM_RESPS      3
2397#endif
2398
2399/* Maximum number of times to retry an inquiry prior to failure. */
2400#ifndef HSP2_MAX_INQ_RETRY
2401#define HSP2_MAX_INQ_RETRY          6
2402#endif
2403
2404/* Maximum number of times to retry an RFCOMM connection prior to failure. */
2405#ifndef HSP2_MAX_CONN_RETRY
2406#define HSP2_MAX_CONN_RETRY         3
2407#endif
2408
2409/* If the connect request failed for authentication reasons, do not retry */
2410#ifndef HSP2_NO_RETRY_ON_AUTH_FAIL
2411#define HSP2_NO_RETRY_ON_AUTH_FAIL  TRUE
2412#endif
2413
2414/* Maximum number of characters in an HSP2 device name. */
2415#ifndef HSP2_MAX_NAME_LEN
2416#define HSP2_MAX_NAME_LEN           32
2417#endif
2418
2419/* The minimum speaker and/or microphone gain setting. */
2420#ifndef HSP2_MIN_GAIN
2421#define HSP2_MIN_GAIN               0
2422#endif
2423
2424/* The maximum speaker and/or microphone setting. */
2425#ifndef HSP2_MAX_GAIN
2426#define HSP2_MAX_GAIN               15
2427#endif
2428
2429/* The default value to send on an AT+CKPD. */
2430#ifndef HSP2_KEYPRESS_DEFAULT
2431#define HSP2_KEYPRESS_DEFAULT       200
2432#endif
2433
2434/* Maximum amount a data that can be received per RFCOMM frame. */
2435#ifndef HSP2_MAX_RFC_READ_LEN
2436#define HSP2_MAX_RFC_READ_LEN       128
2437#endif
2438
2439/* The time in seconds to wait for completion of a partial AT command or response from the peer. */
2440#ifndef HSP2_AT_TO_INTERVAL
2441#define HSP2_AT_TO_INTERVAL         30
2442#endif
2443
2444/* The time to wait before repeating a ring to a peer Headset. */
2445#ifndef HSP2_REPEAT_RING_TO
2446#define HSP2_REPEAT_RING_TO         4
2447#endif
2448
2449/* Time to wait for a response for an AT command */
2450#ifndef HSP2_AT_RSP_TO
2451#define HSP2_AT_RSP_TO              20
2452#endif
2453
2454/* SCO packet type(s) to use (bitmask: see spec), 0 - device default (recommended) */
2455#ifndef HSP2_SCO_PKT_TYPES
2456#define HSP2_SCO_PKT_TYPES          ((UINT16)0x0000)
2457#endif
2458
2459/* The default settings of the SCO voice link. */
2460#ifndef HSP2_DEFAULT_VOICE_SETTINGS
2461#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)
2462#endif
2463
2464#ifndef HSP2_MAX_AT_CMD_LENGTH
2465#define HSP2_MAX_AT_CMD_LENGTH       16
2466#endif
2467
2468#ifndef HSP2_MAX_AT_VAL_LENGTH
2469#if (defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE)
2470#define HSP2_MAX_AT_VAL_LENGTH       310
2471#else
2472#define HSP2_MAX_AT_VAL_LENGTH       5
2473#endif
2474#endif
2475
2476
2477#ifndef HSP2_SDP_DB_SIZE
2478#define HSP2_SDP_DB_SIZE             300
2479#endif
2480
2481
2482/******************************************************************************
2483**
2484** HFP
2485**
2486******************************************************************************/
2487
2488#ifndef HFP_INCLUDED
2489#define HFP_INCLUDED                FALSE
2490#endif
2491
2492/* Include Audio Gateway specific code. */
2493#ifndef HFP_AG_INCLUDED
2494#define HFP_AG_INCLUDED             TRUE
2495#endif
2496
2497/* Include Hand Free Specific Code. */
2498#ifndef HFP_HF_INCLUDED
2499#define HFP_HF_INCLUDED             TRUE
2500#endif
2501
2502/* Use AT interface instead of full blown API */
2503#ifndef AT_INTERFACE
2504#define AT_INTERFACE            FALSE
2505#endif
2506
2507/* HFP Manages SCO establishement for various procedures */
2508#ifndef HFP_SCO_MGMT_INCLUDED
2509#define HFP_SCO_MGMT_INCLUDED             TRUE
2510#endif
2511
2512/* CCAP compliant features and behavior desired */
2513#ifndef CCAP_COMPLIANCE
2514#define CCAP_COMPLIANCE             TRUE
2515#endif
2516
2517/* Caller ID string, part of +CLIP result code */
2518#ifndef HFP_MAX_CLIP_INFO
2519#define HFP_MAX_CLIP_INFO             45
2520#endif
2521
2522#ifndef HFP_RPT_PEER_INFO_INCLUDED
2523#define HFP_RPT_PEER_INFO_INCLUDED  TRUE  /* Reporting of peer features enabled */
2524#endif
2525
2526/******************************************************************************
2527**
2528** HID
2529**
2530******************************************************************************/
2531
2532/* HID Device Role Included */
2533#ifndef HID_DEV_INCLUDED
2534#define HID_DEV_INCLUDED             FALSE
2535#endif
2536
2537#ifndef HID_DEV_PM_INCLUDED
2538#define HID_DEV_PM_INCLUDED         TRUE
2539#endif
2540
2541/* The HID Device is a virtual cable */
2542#ifndef HID_DEV_VIRTUAL_CABLE
2543#define HID_DEV_VIRTUAL_CABLE       TRUE
2544#endif
2545
2546/* The HID device initiates the reconnections */
2547#ifndef HID_DEV_RECONN_INITIATE
2548#define HID_DEV_RECONN_INITIATE     TRUE
2549#endif
2550
2551/* THe HID device is normally connectable */
2552#ifndef HID_DEV_NORMALLY_CONN
2553#define HID_DEV_NORMALLY_CONN       FALSE
2554#endif
2555
2556/* The device is battery powered */
2557#ifndef HID_DEV_BATTERY_POW
2558#define HID_DEV_BATTERY_POW         TRUE
2559#endif
2560
2561/* Device is capable of waking up the host */
2562#ifndef HID_DEV_REMOTE_WAKE
2563#define HID_DEV_REMOTE_WAKE         TRUE
2564#endif
2565
2566/* Device needs host to close SDP channel after SDP is over */
2567#ifndef HID_DEV_SDP_DISABLE
2568#define HID_DEV_SDP_DISABLE         TRUE
2569#endif
2570
2571#ifndef HID_DEV_MTU_SIZE
2572#define HID_DEV_MTU_SIZE                 64
2573#endif
2574
2575#ifndef HID_DEV_FLUSH_TO
2576#define HID_DEV_FLUSH_TO                 0xffff
2577#endif
2578
2579#ifndef HID_DEV_PAGE_SCAN_WIN
2580#define HID_DEV_PAGE_SCAN_WIN       (0)
2581#endif
2582
2583#ifndef HID_DEV_PAGE_SCAN_INT
2584#define HID_DEV_PAGE_SCAN_INT       (0)
2585#endif
2586
2587#ifndef HID_DEV_MAX_CONN_RETRY
2588#define HID_DEV_MAX_CONN_RETRY      (15)
2589#endif
2590
2591#ifndef HID_DEV_REPAGE_WIN
2592#define HID_DEV_REPAGE_WIN          (1)
2593#endif
2594
2595#ifndef HID_DEV_SVC_NAME
2596#define HID_DEV_SVC_NAME            "HID"
2597#endif
2598
2599#ifndef HID_DEV_SVC_DESCR
2600#define HID_DEV_SVC_DESCR           "3-button mouse and keyboard"
2601#endif
2602
2603#ifndef HID_DEV_PROVIDER_NAME
2604#define HID_DEV_PROVIDER_NAME       "Widcomm"
2605#endif
2606
2607#ifndef HID_DEV_REL_NUM
2608#define HID_DEV_REL_NUM             0x0100
2609#endif
2610
2611#ifndef HID_DEV_PARSER_VER
2612#define HID_DEV_PARSER_VER          0x0111
2613#endif
2614
2615#ifndef HID_DEV_SUBCLASS
2616#define HID_DEV_SUBCLASS            COD_MINOR_POINTING
2617#endif
2618
2619#ifndef HID_DEV_COUNTRY_CODE
2620#define HID_DEV_COUNTRY_CODE        0x33
2621#endif
2622
2623#ifndef HID_DEV_SUP_TOUT
2624#define HID_DEV_SUP_TOUT            0x8000
2625#endif
2626
2627#ifndef HID_DEV_NUM_LANGS
2628#define HID_DEV_NUM_LANGS           1
2629#endif
2630
2631#ifndef HID_DEV_INACT_TIMEOUT
2632#define HID_DEV_INACT_TIMEOUT       60
2633#endif
2634
2635#ifndef HID_DEV_BUSY_MODE_PARAMS
2636#define HID_DEV_BUSY_MODE_PARAMS    { 320, 160, 10, 20, HCI_MODE_ACTIVE }
2637#endif
2638
2639#ifndef HID_DEV_IDLE_MODE_PARAMS
2640#define HID_DEV_IDLE_MODE_PARAMS    { 320, 160, 10, 20, HCI_MODE_SNIFF }
2641#endif
2642
2643#ifndef HID_DEV_SUSP_MODE_PARAMS
2644#define HID_DEV_SUSP_MODE_PARAMS    { 640, 320,  0,    0, HCI_MODE_PARK }
2645#endif
2646
2647#ifndef HID_DEV_MAX_DESCRIPTOR_SIZE
2648#define HID_DEV_MAX_DESCRIPTOR_SIZE      128     /* Max descriptor size          */
2649#endif
2650
2651#ifndef HID_DEV_LANGUAGELIST
2652#define HID_DEV_LANGUAGELIST             {0x35, 0x06, 0x09, 0x04, 0x09, 0x09, 0x01, 0x00}
2653#endif
2654
2655#ifndef HID_DEV_LINK_SUPERVISION_TO
2656#define HID_DEV_LINK_SUPERVISION_TO      0x8000
2657#endif
2658
2659#ifndef HID_CONTROL_POOL_ID
2660#define HID_CONTROL_POOL_ID             2
2661#endif
2662
2663#ifndef HID_INTERRUPT_POOL_ID
2664#define HID_INTERRUPT_POOL_ID           2
2665#endif
2666
2667#ifndef UCD_HID_INCLUDED
2668#define UCD_HID_INCLUDED    FALSE
2669#endif
2670
2671#ifndef BRR_HID_INCLUDED
2672#define BRR_HID_INCLUDED    FALSE
2673#endif
2674
2675/*************************************************************************
2676** Definitions for Both HID-Host & Device
2677*/
2678#ifndef HID_MAX_SVC_NAME_LEN
2679#define HID_MAX_SVC_NAME_LEN  32
2680#endif
2681
2682#ifndef HID_MAX_SVC_DESCR_LEN
2683#define HID_MAX_SVC_DESCR_LEN 32
2684#endif
2685
2686#ifndef HID_MAX_PROV_NAME_LEN
2687#define HID_MAX_PROV_NAME_LEN 32
2688#endif
2689
2690/*************************************************************************
2691** Definitions for HID-Host
2692*/
2693#ifndef  HID_HOST_INCLUDED
2694#define HID_HOST_INCLUDED           FALSE
2695#endif
2696
2697#ifndef HID_HOST_MAX_DEVICES
2698#define HID_HOST_MAX_DEVICES        7
2699#endif
2700
2701#ifndef HID_HOST_MTU
2702#define HID_HOST_MTU                640
2703#endif
2704
2705#ifndef HID_HOST_FLUSH_TO
2706#define HID_HOST_FLUSH_TO                 0xffff
2707#endif
2708
2709#ifndef HID_HOST_MAX_CONN_RETRY
2710#define HID_HOST_MAX_CONN_RETRY     (15)
2711#endif
2712
2713#ifndef HID_HOST_REPAGE_WIN
2714#define HID_HOST_REPAGE_WIN          (2)
2715#endif
2716
2717
2718/******************************************************************************
2719**
2720** DUN and FAX
2721**
2722******************************************************************************/
2723
2724#ifndef DUN_INCLUDED
2725#define DUN_INCLUDED                FALSE
2726#endif
2727
2728
2729/******************************************************************************
2730**
2731** GOEP
2732**
2733******************************************************************************/
2734
2735#ifndef GOEP_INCLUDED
2736#define GOEP_INCLUDED               FALSE
2737#endif
2738
2739/* This is set to enable GOEP non-blocking file system access functions. */
2740#ifndef GOEP_FS_INCLUDED
2741#define GOEP_FS_INCLUDED        TRUE
2742#endif
2743
2744/* GOEP authentication key size. */
2745#ifndef GOEP_MAX_AUTH_KEY_SIZE
2746#define GOEP_MAX_AUTH_KEY_SIZE      16
2747#endif
2748
2749/* Maximum size of the realm authentication string. */
2750#ifndef GOEP_MAX_AUTH_REALM_SIZE
2751#define GOEP_MAX_AUTH_REALM_SIZE    16
2752#endif
2753
2754/* Realm Character Set */
2755#ifndef GOEP_REALM_CHARSET
2756#define GOEP_REALM_CHARSET          0       /* ASCII */
2757#endif
2758
2759/* This is set to the maximum length of path name allowed in the system (_MAX_PATH). */
2760#ifndef GOEP_MAX_PATH_SIZE
2761#define GOEP_MAX_PATH_SIZE          255
2762#endif
2763
2764/* Specifies whether or not client's user id is required during obex authentication */
2765#ifndef GOEP_SERVER_USERID_REQUIRED
2766#define GOEP_SERVER_USERID_REQUIRED FALSE
2767#endif
2768
2769/* This is set to the maximum length of file name allowed in the system (_MAX_FNAME). */
2770#ifndef GOEP_MAX_FILE_SIZE
2771#define GOEP_MAX_FILE_SIZE          128
2772#endif
2773
2774/* Character used as path separator */
2775#ifndef GOEP_PATH_SEPARATOR
2776#define GOEP_PATH_SEPARATOR         ((char) 0x5c)   /* 0x2f ('/'), or 0x5c ('\') */
2777#endif
2778
2779/******************************************************************************
2780**
2781** OPP
2782**
2783******************************************************************************/
2784
2785#ifndef OPP_INCLUDED
2786#define OPP_INCLUDED                FALSE
2787#endif
2788
2789/* This is set to enable OPP client capabilities. */
2790#ifndef OPP_CLIENT_INCLUDED
2791#define OPP_CLIENT_INCLUDED         FALSE
2792#endif
2793
2794/* This is set to enable OPP server capabilities. */
2795#ifndef OPP_SERVER_INCLUDED
2796#define OPP_SERVER_INCLUDED         FALSE
2797#endif
2798
2799/* if the optional formating functions are to be included or not */
2800#ifndef OPP_FORMAT_INCLUDED
2801#define OPP_FORMAT_INCLUDED         FALSE
2802#endif
2803
2804/* Maximum number of client sessions allowed by server */
2805#ifndef OPP_MAX_SRVR_SESS
2806#define OPP_MAX_SRVR_SESS           3
2807#endif
2808
2809/******************************************************************************
2810**
2811** FTP
2812**
2813******************************************************************************/
2814
2815#ifndef FTP_INCLUDED
2816#define FTP_INCLUDED                FALSE
2817#endif
2818
2819/* This is set to enable FTP client capabilities. */
2820#ifndef FTP_CLIENT_INCLUDED
2821#define FTP_CLIENT_INCLUDED         TRUE
2822#endif
2823
2824/* This is set to enable FTP server capabilities. */
2825#ifndef FTP_SERVER_INCLUDED
2826#define FTP_SERVER_INCLUDED         TRUE
2827#endif
2828
2829/******************************************************************************
2830**
2831** XML Parser
2832**
2833******************************************************************************/
2834
2835#ifndef XML_STACK_SIZE
2836#define XML_STACK_SIZE             7
2837#endif
2838
2839/******************************************************************************
2840**
2841** BPP Printer
2842**
2843******************************************************************************/
2844#ifndef BPP_DEBUG
2845#define BPP_DEBUG            FALSE
2846#endif
2847
2848#ifndef BPP_INCLUDED
2849#define BPP_INCLUDED                FALSE
2850#endif
2851
2852#ifndef BPP_SND_INCLUDED
2853#define BPP_SND_INCLUDED            FALSE
2854#endif
2855
2856/* Maximum number of senders allowed to connect simultaneously
2857** The maximum is 6 or (OBX_NUM_SERVERS / 2), whichever is smaller
2858*/
2859#ifndef BPP_PR_MAX_CON
2860#define BPP_PR_MAX_CON         3
2861#endif
2862
2863/* Service Name. maximum length: 248
2864#ifndef BPP_SERVICE_NAME
2865#define BPP_SERVICE_NAME            "Basic Printing"
2866#endif
2867 */
2868/* Document Format Supported. ASCII comma-delimited list of MIME type:version string
2869#ifndef BPP_DOC_FORMAT_SUPPORTED
2870#define BPP_DOC_FORMAT_SUPPORTED    "application/vnd.pwg-xhtml-print:1.0,application/vnd.hp-PCL:5E,application/PDF"
2871#endif
2872
2873#ifndef BPP_DOC_FORMAT_SUPPORTED_LEN
2874#define BPP_DOC_FORMAT_SUPPORTED_LEN    77
2875#endif
2876 */
2877/* Character repertoires.
2878#ifndef BPP_CHARACTER_REPERTOIRES
2879#define BPP_CHARACTER_REPERTOIRES {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}
2880#endif
2881 */
2882/* XHTML formats.
2883#ifndef BPP_XHTML_PRINT_FORMATS
2884#define BPP_XHTML_PRINT_FORMATS     "image/gif:89A,image/jpeg"
2885#endif
2886
2887#ifndef BPP_XHTML_PRINT_FORMATS_LEN
2888#define BPP_XHTML_PRINT_FORMATS_LEN 24
2889#endif
2890 */
2891/* Color supported.
2892#ifndef BPP_COLOR_SUPORTED
2893#define BPP_COLOR_SUPORTED          FALSE
2894#endif
2895 */
2896/* 1284 ID string. First 2 bytes are the length.
2897#ifndef BPP_1284ID
2898#define BPP_1284ID                  "\x00\x48MANUFACTURER:ACME Manufacturing;COMMAND SET:PCL,MPL;MODEL:LaserBeam \?;"
2899#endif
2900
2901#ifndef BPP_1284ID_LEN
2902#define BPP_1284ID_LEN              72
2903#endif
2904 */
2905/* Printer name.
2906#ifndef BPP_PRINTER_NAME
2907#define BPP_PRINTER_NAME            "My Printer"
2908#endif
2909
2910#ifndef BPP_PRINTER_NAME_LEN
2911#define BPP_PRINTER_NAME_LEN        10
2912#endif
2913 */
2914
2915/* Printer location.
2916#ifndef BPP_PRINTER_LOCATION
2917#define BPP_PRINTER_LOCATION        "Hotel Lobby"
2918#endif
2919
2920#ifndef BPP_PRINTER_LOCATION_LEN
2921#define BPP_PRINTER_LOCATION_LEN    11
2922#endif
2923 */
2924/* Duplex printing supported.
2925#ifndef BPP_DUPLEX_SUPPORTED
2926#define BPP_DUPLEX_SUPPORTED        TRUE
2927#endif
2928 */
2929
2930/* Media types supported.
2931#ifndef BPP_MEDIA_TYPES_SUPPORTED
2932#define BPP_MEDIA_TYPES_SUPPORTED   "stationary,continuous-long,photographic-high-gloss,cardstock"
2933#endif
2934
2935#ifndef BPP_MEDIA_TYPES_SUPPORTED_LEN
2936#define BPP_MEDIA_TYPES_SUPPORTED_LEN   60
2937#endif
2938 */
2939/* Maximum media with supported.
2940#ifndef BPP_MAX_MEDIA_WIDTH
2941#define BPP_MAX_MEDIA_WIDTH         205
2942#endif
2943 */
2944/* Maximum media length supported.
2945#ifndef BPP_MAX_MEDIA_LENGTH
2946#define BPP_MAX_MEDIA_LENGTH        285
2947#endif
2948 */
2949/* the maximum string len for the media size of medium loaded */
2950#ifndef BPP_MEDIA_SIZE_LEN
2951#define BPP_MEDIA_SIZE_LEN          33
2952#endif
2953
2954/* Debug Trace the SOAP object, if TRUE */
2955#ifndef BPP_TRACE_XML
2956#define BPP_TRACE_XML               TRUE
2957#endif
2958
2959/* in case that the SOAP object does not all come in one OBEX packet,
2960 * this size of data may be kept in the BPP control block for continuing parsing.
2961 * The maximum is the size of the biggest GKI buffer (GKI_MAX_BUF_SIZE) */
2962#ifndef BPP_SOAP_KEEP_SIZE
2963#define BPP_SOAP_KEEP_SIZE          200
2964#endif
2965
2966
2967/******************************************************************************
2968**
2969** BIP
2970**
2971******************************************************************************/
2972#ifndef BIP_INCLUDED
2973#define BIP_INCLUDED                FALSE
2974#endif
2975
2976/* TRUE to include imaging initiator */
2977#ifndef BIP_INITR_INCLUDED
2978#define BIP_INITR_INCLUDED          FALSE
2979#endif
2980
2981/* TRUE to include imaging responder */
2982#ifndef BIP_RSPDR_INCLUDED
2983#define BIP_RSPDR_INCLUDED          FALSE
2984#endif
2985
2986/* TRUE to include image push feature */
2987#ifndef BIP_PUSH_INCLUDED
2988#define BIP_PUSH_INCLUDED           TRUE
2989#endif
2990
2991/* TRUE to include image pull feature */
2992#ifndef BIP_PULL_INCLUDED
2993#define BIP_PULL_INCLUDED           TRUE
2994#endif
2995
2996/* TRUE to include advanced image printing feature */
2997#ifndef BIP_PRINTING_INCLUDED
2998#define BIP_PRINTING_INCLUDED       TRUE
2999#endif
3000
3001/* TRUE to include automatic archive feature */
3002#ifndef BIP_ARCHIVE_INCLUDED
3003#define BIP_ARCHIVE_INCLUDED        TRUE
3004#endif
3005
3006/* TRUE to include remote camera feature */
3007#ifndef BIP_CAMERA_INCLUDED
3008#define BIP_CAMERA_INCLUDED         TRUE
3009#endif
3010
3011/* TRUE to include remote display feature */
3012#ifndef BIP_DISPLAY_INCLUDED
3013#define BIP_DISPLAY_INCLUDED        TRUE
3014#endif
3015
3016/* TRUE to include sanity check code for API functions */
3017#ifndef BIP_SANITY_CHECKS
3018#define BIP_SANITY_CHECKS           TRUE
3019#endif
3020
3021/* TRUE to show the received XML object in trace for conformance tests */
3022#ifndef BIP_TRACE_XML
3023#define BIP_TRACE_XML               TRUE
3024#endif
3025
3026/* in case that the received XML object is not complete, the XML parser state machine needs
3027 * to keep a copy of the data from the last '<'
3028 * This macro specifies the maximun amount of data for this purpose */
3029#ifndef BIP_XML_CARRY_OVER_LEN
3030#define BIP_XML_CARRY_OVER_LEN      100
3031#endif
3032
3033/* minimum 4, maximum is 255. The value should be set to the maximum size of encoding string + 1. JPEG2000.
3034 * If vendor specific format is supported, it might be bigger than 9 */
3035#ifndef BIP_IMG_ENCODE_SIZE
3036#define BIP_IMG_ENCODE_SIZE         9
3037#endif
3038
3039/* MIME type: text/plain */
3040#ifndef BIP_TYPE_SIZE
3041#define BIP_TYPE_SIZE               20
3042#endif
3043
3044/* example: iso-8895-1 */
3045#ifndef BIP_CHARSET_SIZE
3046#define BIP_CHARSET_SIZE            10
3047#endif
3048
3049/* friendly name */
3050#ifndef BIP_FNAME_SIZE
3051#define BIP_FNAME_SIZE              20
3052#endif
3053
3054/* service name */
3055#ifndef BIP_SNAME_SIZE
3056#define BIP_SNAME_SIZE              60
3057#endif
3058
3059/* temporary storage file name(for file system access, may include path) */
3060#ifndef BIP_TEMP_NAME_SIZE
3061#define BIP_TEMP_NAME_SIZE          200
3062#endif
3063
3064/* image file name */
3065#ifndef BIP_IMG_NAME_SIZE
3066#define BIP_IMG_NAME_SIZE           200
3067#endif
3068
3069/* attachment file name */
3070#ifndef BIP_ATT_NAME_SIZE
3071#define BIP_ATT_NAME_SIZE           200
3072#endif
3073
3074/* object (image, attachment, thumbnail) file name (may be used for file system) */
3075#ifndef BIP_OBJ_NAME_SIZE
3076#define BIP_OBJ_NAME_SIZE           200
3077#endif
3078
3079
3080
3081/******************************************************************************
3082**
3083** HCRP
3084**
3085******************************************************************************/
3086
3087#ifndef HCRP_INCLUDED
3088#define HCRP_INCLUDED               FALSE
3089#endif
3090
3091/* This is set to enable server. */
3092#ifndef HCRP_SERVER_INCLUDED
3093#define HCRP_SERVER_INCLUDED       FALSE
3094#endif
3095
3096/* This is set to enable client. */
3097#ifndef HCRP_CLIENT_INCLUDED
3098#define HCRP_CLIENT_INCLUDED        FALSE
3099#endif
3100
3101/* TRUE enables the notification option of the profile. */
3102#ifndef HCRP_NOTIFICATION_INCLUDED
3103#define HCRP_NOTIFICATION_INCLUDED  TRUE
3104#endif
3105
3106/* TRUE enables the vendor specific option of the profile. */
3107#ifndef HCRP_VENDOR_SPEC_INCLUDED
3108#define HCRP_VENDOR_SPEC_INCLUDED   TRUE
3109#endif
3110
3111/* TRUE enables state machine traces. */
3112#ifndef HCRP_FSM_DEBUG
3113#define HCRP_FSM_DEBUG              FALSE
3114#endif
3115
3116/* TRUE enables protocol message traces. */
3117#ifndef HCRP_PROTO_DEBUG
3118#define HCRP_PROTO_DEBUG            FALSE
3119#endif
3120
3121/* Maximum length used to store the service name (Minimum 1). */
3122#ifndef HCRP_MAX_SERVICE_NAME_LEN
3123#define HCRP_MAX_SERVICE_NAME_LEN   32
3124#endif
3125
3126/* Maximum length used to store the device name (Minimum 1). */
3127#ifndef HCRP_MAX_DEVICE_NAME_LEN
3128#define HCRP_MAX_DEVICE_NAME_LEN    32
3129#endif
3130
3131/* Maximum length of device location (Minimum 1) */
3132#ifndef HCRP_MAX_DEVICE_LOC_LEN
3133#define HCRP_MAX_DEVICE_LOC_LEN     32
3134#endif
3135
3136/* Maximum length used to store the friendly name (Minimum 1). */
3137#ifndef HCRP_MAX_FRIENDLY_NAME_LEN
3138#define HCRP_MAX_FRIENDLY_NAME_LEN  32
3139#endif
3140
3141/* Maximum length used to store the 1284 id string (Minimum 2 byte length field). */
3142#ifndef HCRP_MAX_SDP_1284_ID_LEN
3143#define HCRP_MAX_SDP_1284_ID_LEN    128
3144#endif
3145
3146/* Maximum length for parameters to be processed for vendor specific commands. */
3147#ifndef HCRP_MAX_VEND_SPEC_LEN
3148#define HCRP_MAX_VEND_SPEC_LEN      4
3149#endif
3150
3151/* Number of seconds to wait for 2nd GAP to open. */
3152#ifndef HCRP_OPEN_CHAN_TOUT
3153#define HCRP_OPEN_CHAN_TOUT         5
3154#endif
3155
3156/* Number of seconds to wait for 2nd GAP to close. */
3157#ifndef HCRP_CLOSE_CHAN_TOUT
3158#define HCRP_CLOSE_CHAN_TOUT        3
3159#endif
3160
3161/* Number of seconds to wait for the application to respond to a protocol request. */
3162#ifndef HCRP_APPL_RSP_TOUT
3163#define HCRP_APPL_RSP_TOUT          5
3164#endif
3165
3166/* Number of seconds to wait for the peer device to respond to a protocol request. */
3167#ifndef HCRP_CMD_RSP_TOUT
3168#define HCRP_CMD_RSP_TOUT           7
3169#endif
3170
3171/* Number of seconds between subsequent credit requests to the server when the send watermark has been exceeded. */
3172#ifndef HCRP_CREDIT_REQ_UPDATES
3173#define HCRP_CREDIT_REQ_UPDATES     1
3174#endif
3175
3176/* Maximum number of results to return in a HCRP_FindServices search. */
3177#ifndef HCRP_MAX_SEARCH_RESULTS
3178#define HCRP_MAX_SEARCH_RESULTS     1
3179#endif
3180
3181/* Maximum number of bytes to be reserved for searching for the client's notification record. */
3182#ifndef HCRP_MAX_NOTIF_DISC_BUF
3183#define HCRP_MAX_NOTIF_DISC_BUF     300
3184#endif
3185
3186/* Maximum number of clients the server will allow to be registered for notifications. */
3187#ifndef HCRP_MAX_NOTIF_CLIENTS
3188#define HCRP_MAX_NOTIF_CLIENTS      3
3189#endif
3190
3191/* Spec says minimum of two notification retries. */
3192#ifndef HCRP_NOTIF_NUM_RETRIES
3193#define HCRP_NOTIF_NUM_RETRIES      4
3194#endif
3195
3196/*************************************************************************
3197** Definitions for Multi-Client Server HCRP
3198** Note: Many of the above HCRP definitions are also used
3199** Maximum number of clients allowed to connect simultaneously
3200** Must be less than ((GAP_MAX_CONNECTIONS - 1) / 2)
3201*/
3202#ifndef HCRPM_MAX_CLIENTS
3203#define HCRPM_MAX_CLIENTS           3
3204#endif
3205
3206
3207/******************************************************************************
3208**
3209** PAN
3210**
3211******************************************************************************/
3212
3213#ifndef PAN_INCLUDED
3214#define PAN_INCLUDED                FALSE
3215#endif
3216
3217
3218/******************************************************************************
3219**
3220** SAP
3221**
3222******************************************************************************/
3223
3224#ifndef SAP_SERVER_INCLUDED
3225#define SAP_SERVER_INCLUDED         FALSE
3226#endif
3227
3228
3229/*************************************************************************
3230 * A2DP Definitions
3231 */
3232#ifndef A2D_INCLUDED
3233#define A2D_INCLUDED            FALSE
3234#endif
3235
3236/* TRUE to include SBC utility functions */
3237#ifndef A2D_SBC_INCLUDED
3238#define A2D_SBC_INCLUDED        A2D_INCLUDED
3239#endif
3240
3241/* TRUE to include MPEG-1,2 (mp3) utility functions */
3242#ifndef A2D_M12_INCLUDED
3243#define A2D_M12_INCLUDED        A2D_INCLUDED
3244#endif
3245
3246/* TRUE to include MPEG-2,4 (aac) utility functions */
3247#ifndef A2D_M24_INCLUDED
3248#define A2D_M24_INCLUDED        A2D_INCLUDED
3249#endif
3250
3251/*************************************************************************
3252 * VDP Definitions
3253 */
3254#ifndef VDP_INCLUDED
3255#define VDP_INCLUDED            FALSE
3256#endif
3257
3258/******************************************************************************
3259**
3260** AVCTP
3261**
3262******************************************************************************/
3263
3264#ifndef AVCT_INCLUDED
3265#define AVCT_INCLUDED               FALSE
3266#endif
3267
3268/* Number of simultaneous ACL links to different peer devices. */
3269#ifndef AVCT_NUM_LINKS
3270#define AVCT_NUM_LINKS              2
3271#endif
3272
3273/* Number of simultaneous AVCTP connections. */
3274#ifndef AVCT_NUM_CONN
3275#define AVCT_NUM_CONN               3
3276#endif
3277
3278/* TRUE to support the browsing channel. */
3279#ifndef AVCT_BROWSE_INCLUDED
3280#define AVCT_BROWSE_INCLUDED        TRUE
3281#endif
3282
3283/* Pool ID where to reassemble the SDU.
3284   This Pool allows buffers to be used that are larger than
3285   the L2CAP_MAX_MTU. */
3286#ifndef AVCT_BR_USER_RX_POOL_ID
3287#define AVCT_BR_USER_RX_POOL_ID     HCI_ACL_POOL_ID
3288#endif
3289
3290/* Pool ID where to hold the SDU.
3291   This Pool allows buffers to be used that are larger than
3292   the L2CAP_MAX_MTU. */
3293#ifndef AVCT_BR_USER_TX_POOL_ID
3294#define AVCT_BR_USER_TX_POOL_ID     HCI_ACL_POOL_ID
3295#endif
3296
3297/*
3298GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
3299*/
3300#ifndef AVCT_BR_FCR_RX_POOL_ID
3301#define AVCT_BR_FCR_RX_POOL_ID      HCI_ACL_POOL_ID
3302#endif
3303
3304/*
3305GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
3306L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
3307Note:  This pool needs to have enough buffers to hold two times the window size negotiated
3308 in the tL2CAP_FCR_OPTIONS (2 * tx_win_size)  to allow for retransmissions.
3309 The size of each buffer must be able to hold the maximum MPS segment size passed in
3310 tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
3311*/
3312#ifndef AVCT_BR_FCR_TX_POOL_ID
3313#define AVCT_BR_FCR_TX_POOL_ID      HCI_ACL_POOL_ID
3314#endif
3315
3316/* AVCTP Browsing channel FCR Option:
3317Size of the transmission window when using enhanced retransmission mode. Not used
3318in basic and streaming modes. Range: 1 - 63
3319*/
3320#ifndef AVCT_BR_FCR_OPT_TX_WINDOW_SIZE
3321#define AVCT_BR_FCR_OPT_TX_WINDOW_SIZE      10
3322#endif
3323
3324/* AVCTP Browsing channel FCR Option:
3325Number of transmission attempts for a single I-Frame before taking
3326Down the connection. Used In ERTM mode only. Value is Ignored in basic and
3327Streaming modes.
3328Range: 0, 1-0xFF
33290 - infinite retransmissions
33301 - single transmission
3331*/
3332#ifndef AVCT_BR_FCR_OPT_MAX_TX_B4_DISCNT
3333#define AVCT_BR_FCR_OPT_MAX_TX_B4_DISCNT    20
3334#endif
3335
3336/* AVCTP Browsing channel FCR Option: Retransmission Timeout
3337The AVRCP specification set a value in the range of 300 - 2000 ms
3338Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
3339Range: Minimum 2000 (2 secs) when supporting PBF.
3340 */
3341#ifndef AVCT_BR_FCR_OPT_RETX_TOUT
3342#define AVCT_BR_FCR_OPT_RETX_TOUT           2000
3343#endif
3344
3345/* AVCTP Browsing channel FCR Option: Monitor Timeout
3346The AVRCP specification set a value in the range of 300 - 2000 ms
3347Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
3348Range: Minimum 12000 (12 secs) when supporting PBF.
3349*/
3350#ifndef AVCT_BR_FCR_OPT_MONITOR_TOUT
3351#define AVCT_BR_FCR_OPT_MONITOR_TOUT        12000
3352#endif
3353
3354/******************************************************************************
3355**
3356** AVRCP
3357**
3358******************************************************************************/
3359
3360#ifndef AVRC_INCLUDED
3361#define AVRC_INCLUDED               FALSE
3362#endif
3363
3364/* TRUE to support AVRCP 1.3 - Metadata. */
3365#ifndef AVRC_METADATA_INCLUDED
3366#define AVRC_METADATA_INCLUDED      TRUE
3367#endif
3368
3369/* TRUE to support AVRCP 1.4 - Advanced Control. */
3370#ifndef AVRC_ADV_CTRL_INCLUDED
3371#define AVRC_ADV_CTRL_INCLUDED      TRUE
3372#endif
3373
3374/******************************************************************************
3375**
3376** MCAP
3377**
3378******************************************************************************/
3379#ifndef MCA_INCLUDED
3380#define MCA_INCLUDED                FALSE
3381#endif
3382
3383/* TRUE to support Clock Synchronization OpCodes */
3384#ifndef MCA_SYNC_INCLUDED
3385#define MCA_SYNC_INCLUDED           FALSE
3386#endif
3387
3388/* The MTU size for the L2CAP configuration on control channel. 48 is the minimal */
3389#ifndef MCA_CTRL_MTU
3390#define MCA_CTRL_MTU    60
3391#endif
3392
3393/* The maximum number of registered MCAP instances. */
3394#ifndef MCA_NUM_REGS
3395#define MCA_NUM_REGS    3
3396#endif
3397
3398/* The maximum number of control channels (to difference devices) per registered MCAP instances. */
3399#ifndef MCA_NUM_LINKS
3400#define MCA_NUM_LINKS   3
3401#endif
3402
3403/* The maximum number of MDEP (including HDP echo) per registered MCAP instances. */
3404#ifndef MCA_NUM_DEPS
3405#define MCA_NUM_DEPS    3
3406#endif
3407
3408/* The maximum number of MDL link per control channel. */
3409#ifndef MCA_NUM_MDLS
3410#define MCA_NUM_MDLS    4
3411#endif
3412
3413/* Pool ID where to reassemble the SDU. */
3414#ifndef MCA_USER_RX_POOL_ID
3415#define MCA_USER_RX_POOL_ID     HCI_ACL_POOL_ID
3416#endif
3417
3418/* Pool ID where to hold the SDU. */
3419#ifndef MCA_USER_TX_POOL_ID
3420#define MCA_USER_TX_POOL_ID     HCI_ACL_POOL_ID
3421#endif
3422
3423/*
3424GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
3425*/
3426#ifndef MCA_FCR_RX_POOL_ID
3427#define MCA_FCR_RX_POOL_ID      HCI_ACL_POOL_ID
3428#endif
3429
3430/*
3431GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
3432L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
3433Note:  This pool needs to have enough buffers to hold two times the window size negotiated
3434 in the tL2CAP_FCR_OPTIONS (2 * tx_win_size)  to allow for retransmissions.
3435 The size of each buffer must be able to hold the maximum MPS segment size passed in
3436 tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
3437*/
3438#ifndef MCA_FCR_TX_POOL_ID
3439#define MCA_FCR_TX_POOL_ID      HCI_ACL_POOL_ID
3440#endif
3441
3442/* MCAP control channel FCR Option:
3443Size of the transmission window when using enhanced retransmission mode.
34441 is defined by HDP specification for control channel.
3445*/
3446#ifndef MCA_FCR_OPT_TX_WINDOW_SIZE
3447#define MCA_FCR_OPT_TX_WINDOW_SIZE      1
3448#endif
3449
3450/* MCAP control channel FCR Option:
3451Number of transmission attempts for a single I-Frame before taking
3452Down the connection. Used In ERTM mode only. Value is Ignored in basic and
3453Streaming modes.
3454Range: 0, 1-0xFF
34550 - infinite retransmissions
34561 - single transmission
3457*/
3458#ifndef MCA_FCR_OPT_MAX_TX_B4_DISCNT
3459#define MCA_FCR_OPT_MAX_TX_B4_DISCNT    20
3460#endif
3461
3462/* MCAP control channel FCR Option: Retransmission Timeout
3463The AVRCP specification set a value in the range of 300 - 2000 ms
3464Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
3465Range: Minimum 2000 (2 secs) when supporting PBF.
3466 */
3467#ifndef MCA_FCR_OPT_RETX_TOUT
3468#define MCA_FCR_OPT_RETX_TOUT           2000
3469#endif
3470
3471/* MCAP control channel FCR Option: Monitor Timeout
3472The AVRCP specification set a value in the range of 300 - 2000 ms
3473Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
3474Range: Minimum 12000 (12 secs) when supporting PBF.
3475*/
3476#ifndef MCA_FCR_OPT_MONITOR_TOUT
3477#define MCA_FCR_OPT_MONITOR_TOUT        12000
3478#endif
3479
3480/* MCAP control channel FCR Option: Maximum PDU payload size.
3481The maximum number of payload octets that the local device can receive in a single PDU.
3482*/
3483#ifndef MCA_FCR_OPT_MPS_SIZE
3484#define MCA_FCR_OPT_MPS_SIZE            1000
3485#endif
3486
3487/* Shared transport */
3488#ifndef NFC_SHARED_TRANSPORT_ENABLED
3489#define NFC_SHARED_TRANSPORT_ENABLED    FALSE
3490#endif
3491
3492/******************************************************************************
3493**
3494** SER
3495**
3496******************************************************************************/
3497
3498#ifndef SER_INCLUDED
3499#define SER_INCLUDED                FALSE
3500#endif
3501
3502/* Task which runs the serial application. */
3503#ifndef SER_TASK
3504#define SER_TASK                    BTE_APPL_TASK
3505#endif
3506
3507/* Mailbox used by serial application. */
3508#ifndef SER_MBOX
3509#define SER_MBOX                    TASK_MBOX_1
3510#endif
3511
3512/* Mailbox mask. */
3513#ifndef SER_MBOX_MASK
3514#define SER_MBOX_MASK               TASK_MBOX_1_EVT_MASK
3515#endif
3516
3517/* TX path application event. */
3518#ifndef SER_TX_PATH_APPL_EVT
3519#define SER_TX_PATH_APPL_EVT        EVENT_MASK(APPL_EVT_3)
3520#endif
3521
3522/* RX path application event. */
3523#ifndef SER_RX_PATH_APPL_EVT
3524#define SER_RX_PATH_APPL_EVT        EVENT_MASK(APPL_EVT_4)
3525#endif
3526
3527/******************************************************************************
3528**
3529** HCI Services
3530**
3531******************************************************************************/
3532/* Event mask reserved for handling HCIS events HCISU_TASK */
3533#ifndef HCISU_EVT_MASK
3534#define HCISU_EVT_MASK              EVENT_MASK(APPL_EVT_0)
3535#endif
3536
3537/* MBox reserved for handling HCIS events HCISU_TASK */
3538#ifndef HCISU_MBOX
3539#define HCISU_MBOX                  TASK_MBOX_2
3540#endif
3541
3542/* MBox event mask reserved for handling HCIS events HCISU_TASK */
3543#ifndef HCISU_MBOX_EVT_MASK
3544#define HCISU_MBOX_EVT_MASK         TASK_MBOX_2_EVT_MASK
3545#endif
3546
3547/* Timer reserved for handling HCIS events HCISU_TASK */
3548#ifndef HCISU_TIMER
3549#define HCISU_TIMER                 TIMER_2
3550#endif
3551
3552/* Timer event mask reserved for handling HCIS events HCISU_TASK */
3553#ifndef HCISU_TIMER_EVT_MASK
3554#define HCISU_TIMER_EVT_MASK        TIMER_2_EVT_MASK
3555#endif
3556
3557/******************************************************************************
3558**
3559** HCI UART
3560**
3561******************************************************************************/
3562#ifndef BAUDRATE_UPDATE_ENCODED_INCLUDED
3563#define BAUDRATE_UPDATE_ENCODED_INCLUDED    FALSE
3564#endif
3565
3566/******************************************************************************
3567**
3568** HCI Services (H5 3 wired uart), H4 plus SLIP enabled
3569**
3570******************************************************************************/
3571#ifndef SLIP_INCLUDED
3572#define SLIP_INCLUDED                   TRUE
3573#endif
3574
3575#ifndef SLIP_STATIS_INCLUDED
3576#define SLIP_STATIS_INCLUDED            TRUE
3577#endif
3578
3579#ifndef SLIP_SW_FLOW_CTRL
3580#define SLIP_SW_FLOW_CTRL               TRUE
3581#endif
3582
3583#ifndef BT_TRACE_SLIP
3584#define BT_TRACE_SLIP                   FALSE
3585#endif
3586
3587#ifndef SLIP_HOST_SLIDING_WINDOW_SIZE
3588#define SLIP_HOST_SLIDING_WINDOW_SIZE   7
3589#endif
3590
3591#ifndef SLIP_MAX_RETRANSMIT
3592#define SLIP_MAX_RETRANSMIT             10
3593#endif
3594
3595/* time (in ms) interval between WAKEUP messages */
3596#ifndef SLIP_WAKEUP_INTERVAL
3597#define SLIP_WAKEUP_INTERVAL            10
3598#endif
3599
3600/* max trial to send WAKEUP messages up to 255 */
3601#ifndef SLIP_MAX_WAKEUP_TRIAL
3602#define SLIP_MAX_WAKEUP_TRIAL           10
3603#endif
3604
3605/*
3606The H5 work around sequence will be:
3607
36081. controller sends CONFIG with configuration field. (This is not spec compliance.
3609   Controller shall not have configuration field. This initiates work around.)
36102. host ignore the configuration field.
36113. Host sends CONFIG with configuration field.
36124. controller reponse CONFIG_RESPONSE with configuration field. This shall be the
3613   final configuration both FW and STACK use. (spec compliance).
36145. Host copied the configuration field over and sent CONFIG_RESPONSE with this
3615   configuration field (workaround)
3616*/
3617
3618#ifndef SLIP_CONFIG_FIELD_WORK_AROUND_INCLUDED
3619#define SLIP_CONFIG_FIELD_WORK_AROUND_INCLUDED       TRUE
3620#endif
3621
3622/******************************************************************************
3623**
3624** Sleep Mode (Low Power Mode)
3625**
3626******************************************************************************/
3627#ifndef HCILP_INCLUDED
3628#define HCILP_INCLUDED                  TRUE
3629#endif
3630
3631/* sleep mode
3632
3633    0: disable
3634    1: UART with Host wake/BT wake out of band signals
3635    4: H4IBSS, UART with in band signal without Host/BT wake
3636    9: H5 with in band signal of SLIP without Host/BT wake
3637*/
3638#ifndef HCILP_SLEEP_MODE
3639#define HCILP_SLEEP_MODE                (0)
3640#endif
3641
3642/* Host Stack Idle Threshold in 300ms or 25ms, it depends on controller
3643
3644  In sleep mode 1, this is the number of firmware loops executed with no activity
3645    before the Host wake line is deasserted. Activity includes HCI traffic excluding
3646    certain sleep mode commands and the presence of SCO connections if the
3647    "Allow Host Sleep During SCO" flag is not set to 1. Each count of this
3648    parameter is roughly equivalent to 300ms or 25ms.
3649
3650  Not applicable for sleep mode 4(H4IBSS) and 9(H5)
3651*/
3652#ifndef HCILP_IDLE_THRESHOLD
3653#define HCILP_IDLE_THRESHOLD             (1)
3654#endif
3655
3656/* Host Controller Idle Threshold in 300ms or 25ms, it depends on controller
3657
3658    This is the number of firmware loops executed with no activity before the HC is
3659    considered idle. Depending on the mode, HC may then attempt to sleep.
3660    Activity includes HCI traffic excluding certain sleep mode commands and
3661    the presence of ACL/SCO connections.
3662
3663  Not applicable for sleep mode 4(H4IBSS)
3664*/
3665#ifndef HCILP_HC_IDLE_THRESHOLD
3666#define HCILP_HC_IDLE_THRESHOLD          (1)
3667#endif
3668
3669/* GPIO for BT_WAKE signal */
3670/* Not applicable for sleep mode 4(H4IBSS) and 9(H5) */
3671#ifndef HCILP_BT_WAKE_GPIO
3672#define HCILP_BT_WAKE_GPIO              UPIO_GENERAL1
3673#endif
3674
3675/* GPIO for HOST_WAKE signal */
3676/* Not applicable for sleep mode 4(H4IBSS) and 9(H5) */
3677#ifndef HCILP_HOST_WAKE_GPIO
3678#define HCILP_HOST_WAKE_GPIO            UPIO_GENERAL2
3679#endif
3680
3681/* BT_WAKE Polarity - 0=Active Low, 1= Active High */
3682/* Not applicable for sleep mode 4(H4IBSS) and 9(H5) */
3683#ifndef HCILP_BT_WAKE_POLARITY
3684#define HCILP_BT_WAKE_POLARITY          0
3685#endif
3686
3687/* HOST_WAKE Polarity - 0=Active Low, 1= Active High */
3688/* Not applicable for sleep mode 4(H4IBSS) and 9(H5) */
3689#ifndef HCILP_HOST_WAKE_POLARITY
3690#define HCILP_HOST_WAKE_POLARITY        0
3691#endif
3692
3693/* HCILP_ALLOW_HOST_SLEEP_DURING_SCO
3694
3695    When this flag is set to 0, the host is not allowed to sleep while
3696    an SCO is active. In sleep mode 1, the device will keep the host
3697    wake line asserted while an SCO is active.
3698    When this flag is set to 1, the host can sleep while an SCO is active.
3699    This flag should only be set to 1 if SCO traffic is directed to the PCM interface.
3700
3701    Not applicable for sleep mode 4(H4IBSS) and 9(H5)
3702*/
3703#ifndef HCILP_ALLOW_HOST_SLEEP_DURING_SCO
3704#define HCILP_ALLOW_HOST_SLEEP_DURING_SCO       1
3705#endif
3706
3707/* HCILP_COMBINE_SLEEP_MODE_AND_LPM
3708
3709    In Mode 0, always set byte 7 to 0. In sleep mode 1, device always
3710    requires permission to sleep between scans / periodic inquiries regardless
3711    of the setting of this byte. In sleep mode 1, if byte is set, device must
3712    have "permission" to sleep during the low power modes of sniff, hold, and park.
3713    If byte is not set, device can sleep without permission during these modes.
3714    Permission to sleep in Mode 1 is obtained if the BT_WAKE signal is not asserted.
3715
3716    Not applicable for sleep mode 4(H4IBSS) and 9(H5)
3717*/
3718#ifndef HCILP_COMBINE_SLEEP_MODE_AND_LPM
3719#define HCILP_COMBINE_SLEEP_MODE_AND_LPM        1
3720#endif
3721
3722/* HCILP_ENABLE_UART_TXD_TRI_STATE
3723
3724    When set to 0, the device will not tristate its UART TX line before going to sleep.
3725    When set to 1, the device will tristate its UART TX line before going to sleep.
3726
3727    Not applicable for sleep mode 4(H4IBSS) and 9(H5)
3728*/
3729#ifndef HCILP_ENABLE_UART_TXD_TRI_STATE
3730#define HCILP_ENABLE_UART_TXD_TRI_STATE        0
3731#endif
3732
3733/* HCILP_PULSED_HOST_WAKE
3734
3735    Not applicable for sleep mode 4(H4IBSS) and 9(H5)
3736*/
3737#ifndef HCILP_PULSED_HOST_WAKE
3738#define HCILP_PULSED_HOST_WAKE        0
3739#endif
3740
3741/* HCILP_SLEEP_GUARD_TIME
3742
3743    Only for sleep mode 4(H4IBSS)
3744    Time in 12.5ms between starting to monitor controller's CTS and raising its RTS
3745*/
3746#ifndef HCILP_SLEEP_GUARD_TIME
3747#define HCILP_SLEEP_GUARD_TIME                 5
3748#endif
3749
3750/* HCILP_WAKEUP_GUARD_TIME
3751
3752    Only for sleep mode 4(H4IBSS)
3753    Time in 12.5ms between starting to monitor controller's CTS and lowering its RTS
3754*/
3755#ifndef HCILP_WAKEUP_GUARD_TIME
3756#define HCILP_WAKEUP_GUARD_TIME                 5
3757#endif
3758
3759/* HCILP_TXD_CONFIG
3760
3761    Only for sleep mode 4(H4IBSS)
3762    0: controller's TXD stays low in sleep mode
3763    1: controller's TXD stays high in sleep mode (default)
3764*/
3765#ifndef HCILP_TXD_CONFIG
3766#define HCILP_TXD_CONFIG                        1
3767#endif
3768
3769/* HCILP_BT_WAKE_IDLE_TIMEOUT
3770
3771    host's idle time in ms before initiating sleep procedure
3772*/
3773#ifndef HCILP_BT_WAKE_IDLE_TIMEOUT
3774#define HCILP_BT_WAKE_IDLE_TIMEOUT              50
3775#endif
3776
3777#ifndef H4IBSS_INCLUDED
3778#define H4IBSS_INCLUDED                 FALSE  /* !!!! Android must use FALSE */
3779#endif
3780
3781/* display H4IBSS state and event in text */
3782#ifndef H4IBSS_DEBUG
3783#define H4IBSS_DEBUG                    TRUE
3784#endif
3785
3786/* time interval before going into sleep after having sent or received SLEEP_REQ_ACK */
3787/* Valid range is 20 - 50 ms */
3788#ifndef H4IBSS_SLEEP_GUARD_TIME
3789#define H4IBSS_SLEEP_GUARD_TIME         (40)
3790#endif
3791
3792/* timeout(msec) to wait for response of sleep request */
3793#ifndef H4IBSS_SLEEP_REQ_RESP_TIME
3794#define H4IBSS_SLEEP_REQ_RESP_TIME      (50)
3795#endif
3796
3797/******************************************************************************
3798**
3799** RPC
3800**
3801******************************************************************************/
3802
3803#ifndef RPC_INCLUDED
3804#define RPC_INCLUDED                FALSE
3805#endif
3806
3807/* RPCT task mailbox ID for messages coming from rpcgen code. */
3808#ifndef RPCT_MBOX
3809#define RPCT_MBOX                   TASK_MBOX_0
3810#endif
3811
3812/* RPCT task event for mailbox. */
3813#ifndef RPCT_RPC_MBOX_EVT
3814#define RPCT_RPC_MBOX_EVT           TASK_MBOX_0_EVT_MASK
3815#endif
3816
3817/* RPCT task event from driver indicating RX data is ready. */
3818#ifndef RPCT_RX_READY_EVT
3819#define RPCT_RX_READY_EVT           APPL_EVT_0
3820#endif
3821
3822/* RPCT task event from driver indicating data TX is done. */
3823#ifndef RPCT_TX_DONE_EVT
3824#define RPCT_TX_DONE_EVT            APPL_EVT_1
3825#endif
3826
3827/* RPCT task event indicating data is in the circular buffer. */
3828#ifndef RPCT_UCBUF_EVT
3829#define RPCT_UCBUF_EVT              APPL_EVT_2
3830#endif
3831
3832/* Task ID of RPCGEN task. */
3833#ifndef RPCGEN_TASK
3834#define RPCGEN_TASK                 BTU_TASK
3835#endif
3836
3837/* RPCGEN task event for messages coming from RPCT. */
3838#ifndef RPCGEN_MSG_EVT
3839#define RPCGEN_MSG_EVT              TASK_MBOX_1_EVT_MASK
3840#endif
3841
3842#ifndef RPCGEN_MSG_MBOX
3843#define RPCGEN_MSG_MBOX             TASK_MBOX_1
3844#endif
3845
3846/* Size of circular buffer used to store diagnostic messages. */
3847#ifndef RPCT_UCBUF_SIZE
3848#define RPCT_UCBUF_SIZE             2000
3849#endif
3850
3851/******************************************************************************
3852**
3853** SAP - Sample ICP and HSP applications
3854**
3855******************************************************************************/
3856
3857#ifndef SAP_INCLUDED
3858#define SAP_INCLUDED                FALSE
3859#endif
3860
3861#ifndef ICA_INCLUDED
3862#define ICA_INCLUDED                FALSE
3863#endif
3864
3865#ifndef HSA_HS_INCLUDED
3866#define HSA_HS_INCLUDED             FALSE
3867#endif
3868
3869#ifndef HSA_AG_INCLUDED
3870#define HSA_AG_INCLUDED             FALSE
3871#endif
3872
3873#ifndef MMI_INCLUDED
3874#define MMI_INCLUDED                FALSE
3875#endif
3876
3877/* MMI task event from driver indicating RX data is ready. */
3878#ifndef MMI_RX_READY_EVT
3879#define MMI_RX_READY_EVT           APPL_EVT_0
3880#endif
3881
3882/******************************************************************************
3883**
3884** APPL - Application Task
3885**
3886******************************************************************************/
3887/* When TRUE indicates that an application task is to be run */
3888#ifndef APPL_INCLUDED
3889#define APPL_INCLUDED                FALSE
3890#endif
3891
3892/* When TRUE remote terminal code included (RPC MUST be included) */
3893#ifndef RSI_INCLUDED
3894#define RSI_INCLUDED                FALSE
3895#endif
3896
3897
3898
3899#define L2CAP_FEATURE_REQ_ID      73
3900#define L2CAP_FEATURE_RSP_ID     173
3901
3902
3903#define L2CAP_ENHANCED_FEATURES   0
3904
3905
3906
3907/* Use gki_delay for patch ram */
3908#ifndef BRCM_USE_DELAY
3909#if ( SLIP_INCLUDED == TRUE )
3910/* H5 need to be initialized after sending download mini driver HCI command */
3911#define BRCM_USE_DELAY           FALSE
3912#else
3913#define BRCM_USE_DELAY           TRUE
3914#endif
3915#endif
3916
3917/******************************************************************************
3918**
3919** BTA
3920**
3921******************************************************************************/
3922/* BTA EIR canned UUID list (default is dynamic) */
3923#ifndef BTA_EIR_CANNED_UUID_LIST
3924#define BTA_EIR_CANNED_UUID_LIST FALSE
3925#endif
3926
3927/* Number of supported customer UUID in EIR */
3928#ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID
3929#define BTA_EIR_SERVER_NUM_CUSTOM_UUID     8
3930#endif
3931
3932/* MIP A2DP Feature enabled */
3933#ifndef BTA_MIP_INCLUDED
3934#define BTA_MIP_INCLUDED   FALSE
3935#endif
3936
3937/* No 3D sync profile debug by default */
3938#ifndef BTA_3DS_DEBUG
3939#define BTA_3DS_DEBUG FALSE
3940#endif
3941/******************************************************************************
3942**
3943** BTE
3944**
3945******************************************************************************/
3946#ifndef BTE_PLATFORM_IDLE
3947#define BTE_PLATFORM_IDLE
3948#endif
3949
3950#ifndef BTE_IDLE_TASK_INCLUDED
3951#define BTE_IDLE_TASK_INCLUDED TRUE
3952#endif
3953
3954#ifndef BTE_PLATFORM_INITHW
3955#define BTE_PLATFORM_INITHW
3956#endif
3957
3958#ifndef BTE_BTA_CODE_INCLUDED
3959#define BTE_BTA_CODE_INCLUDED FALSE
3960#endif
3961
3962
3963/******************************************************************************
3964**
3965** BTTRC
3966**
3967******************************************************************************/
3968/* Whether to parse and display traces-> Platform specific implementation */
3969#ifndef BTTRC_DISP
3970#define BTTRC_DISP        BTTRC_DispOnInsight
3971#endif
3972
3973/******************************************************************************
3974**
3975** Tracing:  Include trace header file here.
3976**
3977******************************************************************************/
3978
3979#include "bt_trace.h"
3980
3981#endif /* BT_TARGET_H */
3982
3983