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