1 /******************************************************************************
2  *
3  *  Copyright (c) 2014 The Android Open Source Project
4  *  Copyright (C) 1999-2012 Broadcom Corporation
5  *
6  *  Licensed under the Apache License, Version 2.0 (the "License");
7  *  you may not use this file except in compliance with the License.
8  *  You may obtain a copy of the License at:
9  *
10  *  http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *  Unless required by applicable law or agreed to in writing, software
13  *  distributed under the License is distributed on an "AS IS" BASIS,
14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *  See the License for the specific language governing permissions and
16  *  limitations under the License.
17  *
18  ******************************************************************************/
19 
20 #ifndef BT_TARGET_H
21 #define BT_TARGET_H
22 
23 #include <bt_common.h>
24 
25 #ifndef BUILDCFG
26 #define BUILDCFG
27 #endif
28 
29 /*
30 #if !defined(HAS_BDROID_BUILDCFG) && !defined(HAS_NO_BDROID_BUILDCFG)
31 #error "An Android.mk file did not include bdroid_CFLAGS and possibly not bdorid_C_INCLUDES"
32 #endif
33 */
34 
35 #ifdef HAS_BDROID_BUILDCFG
36 #include "bdroid_buildcfg.h"
37 #endif
38 
39 #include "bluedroid_user_config.h"
40 #include "stack/bt_types.h"   /* This must be defined AFTER buildcfg.h */
41 
42 #include "stack/dyn_mem.h"    /* defines static and/or dynamic memory for components */
43 
44 
45 /* OS Configuration from User config (eg: sdkconfig) */
46 #define BT_BTU_TASK_STACK_SIZE      UC_BTU_TASK_STACK_SIZE
47 
48 /******************************************************************************
49 **
50 ** Classic BT features
51 **
52 ******************************************************************************/
53 #if (UC_BT_CLASSIC_ENABLED == TRUE)
54 #define CLASSIC_BT_INCLUDED         TRUE
55 #define BTC_SM_INCLUDED             TRUE
56 #define BTC_PRF_QUEUE_INCLUDED      TRUE
57 #define BTC_GAP_BT_INCLUDED         TRUE
58 #define BTA_SDP_INCLUDED            TRUE
59 #define BTA_DM_PM_INCLUDED          TRUE
60 #define BTC_DM_PM_INCLUDED          TRUE
61 #define SDP_INCLUDED                TRUE
62 #define BTA_DM_QOS_INCLUDED         TRUE
63 
64 #if (UC_BT_A2DP_ENABLED == TRUE)
65 #define BTA_AR_INCLUDED             TRUE
66 #define BTA_AV_INCLUDED             TRUE
67 #define AVDT_INCLUDED               TRUE
68 #define A2D_INCLUDED                TRUE
69 #define AVCT_INCLUDED               TRUE
70 #define AVRC_INCLUDED               TRUE
71 #define BTC_AV_INCLUDED             TRUE
72 #define BTA_AV_SINK_INCLUDED        TRUE
73 #define BTC_AV_SINK_INCLUDED        TRUE
74 #define SBC_DEC_INCLUDED            TRUE
75 #define BTC_AV_SRC_INCLUDED         TRUE
76 #define SBC_ENC_INCLUDED            TRUE
77 #endif /* UC_BT_A2DP_ENABLED */
78 
79 #if (UC_BT_SPP_ENABLED == TRUE)
80 #define RFCOMM_INCLUDED             TRUE
81 #define BTA_JV_INCLUDED             TRUE
82 #define BTA_JV_RFCOMM_INCLUDED      TRUE
83 #define BTC_SPP_INCLUDED            TRUE
84 #endif /* UC_BT_SPP_ENABLED */
85 
86 #if (UC_BT_L2CAP_ENABLED == TRUE)
87 #define BTA_JV_INCLUDED             TRUE
88 #define BTC_L2CAP_INCLUDED          TRUE
89 #define BTC_SDP_INCLUDED            TRUE
90 #define VND_BT_JV_BTA_L2CAP         TRUE
91 #endif /* UC_BT_L2CAP_ENABLED */
92 
93 #if (UC_BT_HFP_AG_ENABLED == TRUE)
94 #define BTC_HF_INCLUDED             TRUE
95 #define BTA_AG_INCLUDED             TRUE
96 #define PLC_INCLUDED                TRUE
97 #define BTA_JV_RFCOMM_INCLUDED      TRUE
98 #ifndef RFCOMM_INCLUDED
99 #define RFCOMM_INCLUDED             TRUE
100 #endif
101 #ifndef BTM_SCO_INCLUDED
102 #define BTM_SCO_INCLUDED            TRUE
103 #endif
104 #ifndef BTM_MAX_SCO_LINKS
105 #define BTM_MAX_SCO_LINKS           (1)
106 #endif
107 #ifndef SBC_DEC_INCLUDED
108 #define SBC_DEC_INCLUDED            TRUE
109 #endif
110 #ifndef SBC_ENC_INCLUDED
111 #define SBC_ENC_INCLUDED            TRUE
112 #endif
113 #endif  /* UC_BT_HFP_AG_ENABLED */
114 
115 #if (UC_BT_HFP_CLIENT_ENABLED == TRUE)
116 #define BTC_HF_CLIENT_INCLUDED      TRUE
117 #define BTA_HF_INCLUDED             TRUE
118 #define PLC_INCLUDED                TRUE
119 #ifndef RFCOMM_INCLUDED
120 #define RFCOMM_INCLUDED             TRUE
121 #endif
122 #ifndef BTM_SCO_INCLUDED
123 #define BTM_SCO_INCLUDED            TRUE
124 #endif
125 #ifndef BTM_MAX_SCO_LINKS
126 #define BTM_MAX_SCO_LINKS           (1)
127 #endif
128 
129 #ifndef SBC_DEC_INCLUDED
130 #define SBC_DEC_INCLUDED            TRUE
131 #endif
132 #ifndef SBC_ENC_INCLUDED
133 #define SBC_ENC_INCLUDED            TRUE
134 #endif
135 #endif  /* UC_BT_HFP_CLIENT_ENABLED */
136 
137 #if UC_BT_SSP_ENABLED
138 #define BT_SSP_INCLUDED             TRUE
139 #endif /* UC_BT_SSP_ENABLED */
140 
141 #if UC_BT_HID_ENABLED
142 #define BT_HID_INCLUDED             TRUE
143 #endif /* UC_BT_HID_ENABLED */
144 
145 #if UC_BT_HID_HOST_ENABLED
146 #define HID_HOST_INCLUDED           TRUE
147 #define BTA_HH_INCLUDED             TRUE
148 #define BTC_HH_INCLUDED             TRUE
149 #endif /* UC_BT_HID_HOST_ENABLED */
150 
151 #if UC_BT_HID_DEVICE_ENABLED
152 #define HID_DEV_INCLUDED            TRUE
153 #define BTA_HD_INCLUDED             TRUE
154 #define BTC_HD_INCLUDED             TRUE
155 #endif /* UC_BT_HID_DEVICE_ENABLED */
156 
157 #endif /* UC_BT_CLASSIC_ENABLED */
158 
159 /* This is set to enable use of GAP L2CAP connections. */
160 #if (VND_BT_JV_BTA_L2CAP == TRUE)
161 #define BTA_JV_L2CAP_INCLUDED       TRUE
162 #define GAP_CONN_INCLUDED           TRUE
163 #endif /* VND_BT_JV_BTA_L2CAP */
164 
165 #ifndef CLASSIC_BT_INCLUDED
166 #define CLASSIC_BT_INCLUDED         FALSE
167 #endif /* CLASSIC_BT_INCLUDED */
168 
169 #ifndef CLASSIC_BT_GATT_INCLUDED
170 #define CLASSIC_BT_GATT_INCLUDED    FALSE
171 #endif /* CLASSIC_BT_GATT_INCLUDED */
172 /******************************************************************************
173 **
174 ** BLE features
175 **
176 ******************************************************************************/
177 #if (UC_BT_BLE_ENABLED ==TRUE)
178 #define BLE_INCLUDED              TRUE
179 #else
180 #define BLE_INCLUDED              FALSE
181 #endif /* UC_BT_BLE_ENABLED */
182 
183 #if (UC_BT_BLE_50_FEATURES_SUPPORTED == TRUE)
184 #define BLE_50_FEATURE_SUPPORT   TRUE
185 #else
186 #define BLE_50_FEATURE_SUPPORT   FALSE
187 #endif
188 
189 #if (UC_BT_BLE_42_FEATURES_SUPPORTED == TRUE || BLE_50_FEATURE_SUPPORT == FALSE)
190 #define BLE_42_FEATURE_SUPPORT   TRUE
191 #else
192 #define BLE_42_FEATURE_SUPPORT   FALSE
193 #endif
194 
195 #if (UC_BT_BLE_RPA_SUPPORTED  == TRUE)
196 #define CONTROLLER_RPA_LIST_ENABLE   TRUE
197 #else
198 #define CONTROLLER_RPA_LIST_ENABLE   FALSE
199 #endif
200 
201 #if (UC_BT_GATTS_ENABLE)
202 #define GATTS_INCLUDED              TRUE
203 #else
204 #define GATTS_INCLUDED              FALSE
205 #endif /* UC_BT_GATTS_ENABLE */
206 
207 #if (UC_BT_GATTC_ENABLE)
208 #define GATTC_INCLUDED              TRUE
209 #else
210 #define GATTC_INCLUDED              FALSE
211 #endif  /* UC_BT_GATTC_ENABLE */
212 
213 #if (UC_BT_GATTC_ENABLE && UC_BT_GATTC_CACHE_NVS_FLASH_ENABLED)
214 #define GATTC_CACHE_NVS             TRUE
215 #else
216 #define GATTC_CACHE_NVS             FALSE
217 #endif  /* UC_BT_GATTC_ENABLE && UC_BT_GATTC_CACHE_NVS_FLASH_ENABLED */
218 
219 #if (UC_BT_GATTC_ENABLE && UC_BT_GATTC_CONNECT_RETRY_COUNT)
220 #define GATTC_CONNECT_RETRY_COUNT             UC_BT_GATTC_CONNECT_RETRY_COUNT
221 #else
222 #define GATTC_CONNECT_RETRY_COUNT             0
223 #endif  /* UC_BT_GATTC_ENABLE && UC_BT_GATTC_CONNECT_RETRY_COUNT */
224 
225 #if (GATTC_CONNECT_RETRY_COUNT > 0)
226 #define GATTC_CONNECT_RETRY_EN     TRUE
227 #else
228 #define GATTC_CONNECT_RETRY_EN     FALSE
229 #endif
230 
231 #if (UC_BT_SMP_ENABLE)
232 #define SMP_INCLUDED                TRUE
233 #if (BLE_INCLUDED == TRUE)
234 #define BLE_PRIVACY_SPT             TRUE
235 #else
236 #define BLE_PRIVACY_SPT             FALSE
237 #endif  /*BLE_INCLUDED*/
238 #else
239 #define SMP_INCLUDED                FALSE
240 #define BLE_PRIVACY_SPT             FALSE
241 #endif  /* UC_BT_SMP_ENABLE */
242 
243 #if(UC_BT_SMP_SLAVE_CON_PARAMS_UPD_ENABLE)
244 #define SMP_SLAVE_CON_PARAMS_UPD_ENABLE     TRUE
245 #else
246 #define SMP_SLAVE_CON_PARAMS_UPD_ENABLE     FALSE
247 #endif /* UC_BT_SMP_SLAVE_CON_PARAMS_UPD_ENABLE */
248 
249 #ifdef UC_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP
250 #define BLE_ADV_REPORT_FLOW_CONTROL         (UC_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP && BLE_INCLUDED)
251 #endif /* UC_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP */
252 
253 #ifdef UC_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM
254 #define BLE_ADV_REPORT_FLOW_CONTROL_NUM     UC_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM
255 #endif /* UC_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM */
256 
257 #ifdef UC_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD
258 #define BLE_ADV_REPORT_DISCARD_THRSHOLD     UC_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD
259 #endif /* UC_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD */
260 
261 #ifdef UC_BT_ACL_CONNECTIONS
262 #define MAX_ACL_CONNECTIONS         UC_BT_ACL_CONNECTIONS
263 #define GATT_MAX_PHY_CHANNEL        UC_BT_ACL_CONNECTIONS
264 #endif  /* UC_BT_ACL_CONNECTIONS */
265 
266 #ifdef UC_BT_MULTI_CONNECTION_ENBALE
267 #define BT_MULTI_CONNECTION_ENBALE  UC_BT_MULTI_CONNECTION_ENBALE
268 #endif
269 
270 #if(BT_MULTI_CONNECTION_ENBALE && (CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3))
271 #define BLE_CE_LEN_MIN           5
272 #else
273 #define BLE_CE_LEN_MIN           0
274 #endif
275 
276 #ifdef UC_BT_BLE_ESTAB_LINK_CONN_TOUT
277 #define BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT UC_BT_BLE_ESTAB_LINK_CONN_TOUT
278 #endif
279 
280 //------------------Added from bdroid_buildcfg.h---------------------
281 #ifndef L2CAP_EXTFEA_SUPPORTED_MASK
282 #define L2CAP_EXTFEA_SUPPORTED_MASK (L2CAP_EXTFEA_ENH_RETRANS | L2CAP_EXTFEA_STREAM_MODE | L2CAP_EXTFEA_NO_CRC | L2CAP_EXTFEA_FIXED_CHNLS)
283 #endif
284 
285 #ifndef BTUI_OPS_FORMATS
286 #define BTUI_OPS_FORMATS (BTA_OP_VCARD21_MASK | BTA_OP_ANY_MASK)
287 #endif
288 
289 #ifndef BTA_RFC_MTU_SIZE
290 #define BTA_RFC_MTU_SIZE (L2CAP_MTU_SIZE-L2CAP_MIN_OFFSET-RFCOMM_DATA_OVERHEAD)
291 #endif
292 
293 #ifndef SBC_NO_PCM_CPY_OPTION
294 #define SBC_NO_PCM_CPY_OPTION FALSE
295 #endif
296 
297 #ifndef BT_APP_DEMO
298 #define BT_APP_DEMO TRUE
299 #endif
300 
301 #ifndef BTIF_INCLUDED
302 #define BTIF_INCLUDED FALSE
303 #endif
304 
305 /******************************************************************************
306 **
307 ** BTC-layer components
308 **
309 ******************************************************************************/
310 #ifndef BTC_GAP_BT_INCLUDED
311 #define BTC_GAP_BT_INCLUDED FALSE
312 #endif
313 
314 #ifndef BTC_PRF_QUEUE_INCLUDED
315 #define BTC_PRF_QUEUE_INCLUDED FALSE
316 #endif
317 
318 #ifndef BTC_SM_INCLUDED
319 #define BTC_SM_INCLUDED FALSE
320 #endif
321 
322 #ifndef BTC_AV_INCLUDED
323 #define BTC_AV_INCLUDED FALSE
324 #endif
325 
326 #ifndef BTC_AV_SINK_INCLUDED
327 #define BTC_AV_SINK_INCLUDED FALSE
328 #endif
329 
330 #ifndef BTC_AV_SRC_INCLUDED
331 #define BTC_AV_SRC_INCLUDED FALSE
332 #endif
333 
334 #ifndef BTC_SPP_INCLUDED
335 #define BTC_SPP_INCLUDED FALSE
336 #endif
337 
338 #ifndef BTC_HH_INCLUDED
339 #define BTC_HH_INCLUDED FALSE
340 #endif
341 
342 #ifndef BTC_HD_INCLUDED
343 #define BTC_HD_INCLUDED FALSE
344 #endif
345 
346 #ifndef SBC_DEC_INCLUDED
347 #define SBC_DEC_INCLUDED FALSE
348 #endif
349 
350 #ifndef SBC_ENC_INCLUDED
351 #define SBC_ENC_INCLUDED FALSE
352 #endif
353 
354 /******************************************************************************
355 **
356 ** BTA-layer components
357 **
358 ******************************************************************************/
359 #ifndef BTA_INCLUDED
360 #define BTA_INCLUDED TRUE
361 #endif
362 
363 #ifndef BTA_DM_PM_INCLUDED
364 #define BTA_DM_PM_INCLUDED FALSE
365 #endif
366 
367 #ifndef BTA_DM_QOS_INCLUDED
368 #define BTA_DM_QOS_INCLUDED FALSE
369 #endif
370 
371 #ifndef BTA_PAN_INCLUDED
372 #define BTA_PAN_INCLUDED FALSE
373 #endif
374 
375 #ifndef BTA_HD_INCLUDED
376 #define BTA_HD_INCLUDED FALSE
377 #endif
378 
379 #ifndef BTA_HH_INCLUDED
380 #define BTA_HH_INCLUDED FALSE
381 #endif
382 
383 #ifndef BTA_HH_ROLE
384 #define BTA_HH_ROLE BTA_MASTER_ROLE_PREF
385 #endif
386 
387 #ifndef BTA_HH_LE_INCLUDED
388 #define BTA_HH_LE_INCLUDED FALSE
389 #endif
390 
391 #ifndef BTA_AR_INCLUDED
392 #define BTA_AR_INCLUDED FALSE
393 #endif
394 
395 #ifndef BTA_AV_INCLUDED
396 #define BTA_AV_INCLUDED FALSE
397 #endif
398 
399 #ifndef BTA_AV_SINK_INCLUDED
400 #define BTA_AV_SINK_INCLUDED FALSE
401 #endif
402 
403 #ifndef BTA_JV_INCLUDED
404 #define BTA_JV_INCLUDED FALSE
405 #endif
406 
407 #ifndef BTA_SDP_INCLUDED
408 #define BTA_SDP_INCLUDED FALSE
409 #endif
410 
411 /* This is set to enable use of GAP L2CAP connections. */
412 #ifndef VND_BT_JV_BTA_L2CAP
413 #define VND_BT_JV_BTA_L2CAP        FALSE
414 #endif
415 
416 #ifndef BTA_JV_L2CAP_INCLUDED
417 #define BTA_JV_L2CAP_INCLUDED       FALSE
418 #endif
419 
420 #ifndef GAP_CONN_INCLUDED
421 #define GAP_CONN_INCLUDED           FALSE
422 #endif
423 
424 /******************************************************************************
425 **
426 ** Stack-layer components
427 **
428 ******************************************************************************/
429 #ifndef AVCT_INCLUDED
430 #define AVCT_INCLUDED FALSE
431 #endif
432 
433 #ifndef AVDT_INCLUDED
434 #define AVDT_INCLUDED FALSE
435 #endif
436 
437 /******************************************************************************
438 **
439 ** Parameter Configurations for components
440 **
441 ******************************************************************************/
442 #ifndef BTA_DISABLE_DELAY
443 #define BTA_DISABLE_DELAY 200 /* in milliseconds */
444 #endif
445 
446 #ifndef BTA_SYS_TIMER_PERIOD
447 #define BTA_SYS_TIMER_PERIOD  100
448 #endif
449 
450 #ifndef SBC_FOR_EMBEDDED_LINUX
451 #define SBC_FOR_EMBEDDED_LINUX TRUE
452 #endif
453 
454 #ifndef AVDT_VERSION
455 #define AVDT_VERSION  0x0102
456 #endif
457 
458 #ifndef BTA_AG_AT_MAX_LEN
459 #define BTA_AG_AT_MAX_LEN  512
460 #endif
461 
462 #ifndef BTA_AVRCP_FF_RW_SUPPORT
463 #define BTA_AVRCP_FF_RW_SUPPORT FALSE
464 #endif
465 
466 #ifndef BTA_AG_SCO_PKT_TYPES
467 #define BTA_AG_SCO_PKT_TYPES  (BTM_SCO_LINK_ONLY_MASK | BTM_SCO_PKT_TYPES_MASK_EV3 |  BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 | BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 | BTM_SCO_PKT_TYPES_MASK_NO_3_EV5)
468 #endif
469 
470 #ifndef BTA_AV_RET_TOUT
471 #define BTA_AV_RET_TOUT 15
472 #endif
473 
474 #ifndef PORCHE_PAIRING_CONFLICT
475 #define PORCHE_PAIRING_CONFLICT  TRUE
476 #endif
477 
478 #ifndef BTA_AV_CO_CP_SCMS_T
479 #define BTA_AV_CO_CP_SCMS_T  FALSE
480 #endif
481 
482 #if UC_BT_BLE_HOST_QUEUE_CONGESTION_CHECK
483 #define SCAN_QUEUE_CONGEST_CHECK  TRUE
484 #else
485 #define SCAN_QUEUE_CONGEST_CHECK  FALSE
486 #endif
487 
488 #ifdef UC_CONFIG_BT_GATTS_PPCP_CHAR_GAP
489 #define BTM_PERIPHERAL_ENABLED   UC_CONFIG_BT_GATTS_PPCP_CHAR_GAP
490 #endif
491 
492 #ifdef UC_BT_GATTS_SEND_SERVICE_CHANGE_MODE
493 #define GATTS_SEND_SERVICE_CHANGE_MODE UC_BT_GATTS_SEND_SERVICE_CHANGE_MODE
494 #endif
495 
496 #if (UC_BT_GATTS_ROBUST_CACHING_ENABLED == TRUE)
497 #define GATTS_ROBUST_CACHING_ENABLED TRUE
498 #else
499 #define GATTS_ROBUST_CACHING_ENABLED FALSE
500 #endif
501 
502 #if (UC_BT_GATTS_DEVICE_NAME_WRITABLE == TRUE)
503 #define GATTS_DEVICE_NAME_WRITABLE TRUE
504 #else
505 #define GATTS_DEVICE_NAME_WRITABLE FALSE
506 #endif
507 
508 #if (UC_BT_GATTS_APPEARANCE_WRITABLE == TRUE)
509 #define GATTS_APPEARANCE_WRITABLE TRUE
510 #else
511 #define GATTS_APPEARANCE_WRITABLE FALSE
512 #endif
513 
514 #ifdef UC_BT_BLE_ACT_SCAN_REP_ADV_SCAN
515 #define BTM_BLE_ACTIVE_SCAN_REPORT_ADV_SCAN_RSP_INDIVIDUALLY    UC_BT_BLE_ACT_SCAN_REP_ADV_SCAN
516 #endif
517 
518 #ifdef UC_BT_BLE_RPA_TIMEOUT
519 #define BTM_BLE_PRIVATE_ADDR_INT UC_BT_BLE_RPA_TIMEOUT
520 #endif
521 
522 /* This feature is used to eanble interleaved scan*/
523 #ifndef BTA_HOST_INTERLEAVE_SEARCH
524 #define BTA_HOST_INTERLEAVE_SEARCH FALSE
525 #endif
526 
527 #ifndef BT_USE_TRACES
528 #define BT_USE_TRACES  FALSE
529 #endif
530 
531 #ifndef BT_TRACE_BTIF
532 #define BT_TRACE_BTIF  TRUE
533 #endif
534 
535 #ifndef BT_TRACE_VERBOSE
536 #define BT_TRACE_VERBOSE  FALSE
537 #endif
538 
539 #ifndef BTA_DM_SDP_DB_SIZE
540 #define BTA_DM_SDP_DB_SIZE  8000
541 #endif
542 
543 #ifndef HL_INCLUDED
544 #define HL_INCLUDED  TRUE
545 #endif
546 
547 #ifndef AG_VOICE_SETTINGS
548 #define AG_VOICE_SETTINGS  HCI_DEFAULT_VOICE_SETTINGS
549 #endif
550 
551 #ifndef BTIF_DM_OOB_TEST
552 #define BTIF_DM_OOB_TEST  FALSE
553 #endif
554 
555 // How long to wait before activating sniff mode after entering the
556 // idle state for FTS, OPS connections
557 #ifndef BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS
558 #define BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS 7000
559 #endif
560 #ifndef BTA_FTC_OPS_IDLE_TO_SNIFF_DELAY_MS
561 #define BTA_FTC_OPS_IDLE_TO_SNIFF_DELAY_MS 5000
562 #endif
563 
564 //------------------End added from bdroid_buildcfg.h---------------------
565 
566 
567 /******************************************************************************
568 **
569 ** Buffer Size
570 **
571 ******************************************************************************/
572 
573 #ifndef BT_DEFAULT_BUFFER_SIZE
574 #define BT_DEFAULT_BUFFER_SIZE          (4096 + 16)
575 #endif
576 
577 #ifndef BT_SMALL_BUFFER_SIZE
578 #define BT_SMALL_BUFFER_SIZE            660
579 #endif
580 
581 /* Receives HCI events from the lower-layer. */
582 #ifndef HCI_CMD_BUF_SIZE
583 #define HCI_CMD_BUF_SIZE                BT_SMALL_BUFFER_SIZE
584 #endif
585 
586 /* Sends SDP data packets. */
587 #ifndef SDP_DATA_BUF_SIZE
588 #define SDP_DATA_BUF_SIZE               BT_DEFAULT_BUFFER_SIZE
589 #endif
590 
591 /* Sends RFCOMM command packets. */
592 #ifndef RFCOMM_CMD_BUF_SIZE
593 #define RFCOMM_CMD_BUF_SIZE             BT_SMALL_BUFFER_SIZE
594 #endif
595 
596 /* Sends RFCOMM data packets. */
597 #ifndef RFCOMM_DATA_BUF_SIZE
598 #define RFCOMM_DATA_BUF_SIZE            BT_DEFAULT_BUFFER_SIZE
599 #endif
600 
601 /* Sends L2CAP packets to the peer and HCI messages to the controller. */
602 #ifndef L2CAP_CMD_BUF_SIZE
603 #define L2CAP_CMD_BUF_SIZE              BT_SMALL_BUFFER_SIZE
604 #endif
605 
606 #ifndef L2CAP_USER_TX_BUF_SIZE
607 #define L2CAP_USER_TX_BUF_SIZE          BT_DEFAULT_BUFFER_SIZE
608 #endif
609 
610 #ifndef L2CAP_USER_RX_BUF_SIZE
611 #define L2CAP_USER_RX_BUF_SIZE          BT_DEFAULT_BUFFER_SIZE
612 #endif
613 
614 /* Sends L2CAP segmented packets in ERTM mode */
615 #ifndef L2CAP_FCR_TX_BUF_SIZE
616 #define L2CAP_FCR_TX_BUF_SIZE           BT_DEFAULT_BUFFER_SIZE
617 #endif
618 
619 /* Receives L2CAP segmented packets in ERTM mode */
620 #ifndef L2CAP_FCR_RX_BUF_SIZE
621 #define L2CAP_FCR_RX_BUF_SIZE           BT_DEFAULT_BUFFER_SIZE
622 #endif
623 
624 #ifndef L2CAP_FCR_ERTM_BUF_SIZE
625 #define L2CAP_FCR_ERTM_BUF_SIZE         (10240 + 24)
626 #endif
627 
628 /* Number of ACL buffers to assign to LE
629    if the HCI buffer pool is shared with BR/EDR */
630 #ifndef L2C_DEF_NUM_BLE_BUF_SHARED
631 #define L2C_DEF_NUM_BLE_BUF_SHARED      1
632 #endif
633 
634 /* Used by BTM when it sends HCI commands to the controller. */
635 #ifndef BTM_CMD_BUF_SIZE
636 #define BTM_CMD_BUF_SIZE                BT_SMALL_BUFFER_SIZE
637 #endif
638 
639 #ifndef OBX_LRG_DATA_BUF_SIZE
640 #define OBX_LRG_DATA_BUF_SIZE           (8080 + 26)
641 #endif
642 
643 /* Used to send data to L2CAP. */
644 #ifndef GAP_DATA_BUF_SIZE
645 #define GAP_DATA_BUF_SIZE               BT_DEFAULT_BUFFER_SIZE
646 #endif
647 
648 /* BNEP data and protocol messages. */
649 #ifndef BNEP_BUF_SIZE
650 #define BNEP_BUF_SIZE                   BT_DEFAULT_BUFFER_SIZE
651 #endif
652 
653 /* AVDTP buffer size for protocol messages */
654 #ifndef AVDT_CMD_BUF_SIZE
655 #define AVDT_CMD_BUF_SIZE               BT_SMALL_BUFFER_SIZE
656 #endif
657 
658 /* AVDTP buffer size for media packets in case of fragmentation */
659 #ifndef AVDT_DATA_BUF_SIZE
660 #define AVDT_DATA_BUF_SIZE              BT_DEFAULT_BUFFER_SIZE
661 #endif
662 
663 #ifndef PAN_BUF_SIZE
664 #define PAN_BUF_SIZE                    BT_DEFAULT_BUFFER_SIZE
665 #endif
666 
667 /* Maximum number of buffers to allocate for PAN */
668 #ifndef PAN_BUF_MAX
669 #define PAN_BUF_MAX                     100
670 #endif
671 
672 /* AVCTP buffer size for protocol messages */
673 #ifndef AVCT_CMD_BUF_SIZE
674 #define AVCT_CMD_BUF_SIZE               288
675 #endif
676 
677 /* AVRCP buffer size for protocol messages */
678 #ifndef AVRC_CMD_BUF_SIZE
679 #define AVRC_CMD_BUF_SIZE               288
680 #endif
681 
682 /* AVRCP Metadata buffer size for protocol messages */
683 #ifndef AVRC_META_CMD_BUF_SIZE
684 #define AVRC_META_CMD_BUF_SIZE          BT_SMALL_BUFFER_SIZE
685 #endif
686 
687 #ifndef BTA_HL_LRG_DATA_BUF_SIZE
688 #define BTA_HL_LRG_DATA_BUF_SIZE        (10240 + 24)
689 #endif
690 
691 /* GATT Server Database buffer size */
692 #ifndef GATT_DB_BUF_SIZE
693 #define GATT_DB_BUF_SIZE                128
694 #endif
695 
696 /* GATT Data sending buffer size */
697 #ifndef GATT_DATA_BUF_SIZE
698 #define GATT_DATA_BUF_SIZE              BT_DEFAULT_BUFFER_SIZE
699 #endif
700 
701 /******************************************************************************
702 **
703 ** HCI Services (H4)
704 **
705 ******************************************************************************/
706 
707 /* Use 2 second for low-resolution systems, override to 1 for high-resolution systems */
708 #ifndef BT_1SEC_TIMEOUT
709 #define BT_1SEC_TIMEOUT             (2)
710 #endif
711 
712 /* Quick Timer */
713 /* if L2CAP_FCR_INCLUDED is TRUE then it should have 100 millisecond resolution */
714 /* if none of them is included then QUICK_TIMER_TICKS_PER_SEC is set to 0 to exclude quick timer */
715 #ifndef QUICK_TIMER_TICKS_PER_SEC
716 #define QUICK_TIMER_TICKS_PER_SEC   10       /* 100ms timer */
717 #endif
718 
719 /******************************************************************************
720 **
721 ** BTM
722 **
723 ******************************************************************************/
724 
725 /* Cancel Inquiry on incoming SSP */
726 #ifndef BTM_NO_SSP_ON_INQUIRY
727 #define BTM_NO_SSP_ON_INQUIRY       FALSE
728 #endif
729 
730 /* Includes SCO if TRUE */
731 #ifndef BTM_SCO_INCLUDED
732 #define BTM_SCO_INCLUDED                FALSE       /* TRUE includes SCO code */
733 #endif
734 
735 /* Includes SCO if TRUE */
736 #ifndef BTM_SCO_HCI_INCLUDED
737 #if UC_BT_HFP_AUDIO_DATA_PATH_HCI
738 #define BTM_SCO_HCI_INCLUDED            TRUE       /* TRUE includes SCO over HCI code */
739 #else
740 #define BTM_SCO_HCI_INCLUDED            FALSE
741 #endif /* UC_HFP_AUDIO_DATA_PATH_HCI */
742 #endif
743 
744 /* Includes WBS if TRUE */
745 #ifndef BTM_WBS_INCLUDED
746 #define BTM_WBS_INCLUDED                UC_BT_HFP_WBS_ENABLE    /* TRUE includes WBS code */
747 #endif
748 
749 /*  This is used to work around a controller bug that doesn't like Disconnect
750 **  issued while there is a role switch in progress
751 */
752 #ifndef BTM_DISC_DURING_RS
753 #define BTM_DISC_DURING_RS TRUE
754 #endif
755 
756 /**************************
757 ** Initial SCO TX credit
758 *************************/
759 /* max TX SCO data packet size */
760 #ifndef BTM_SCO_DATA_SIZE_MAX
761 #define BTM_SCO_DATA_SIZE_MAX       120 //240
762 #endif
763 
764 /* max TX eSCO data packet size */
765 #ifndef BTM_MSBC_FRAME_SIZE
766 #define BTM_MSBC_FRAME_SIZE      60
767 #endif
768 
769 /* TX eSCO data packet size */
770 #ifndef BTM_MSBC_FRAME_DATA_SIZE
771 #define BTM_MSBC_FRAME_DATA_SIZE          57
772 #endif
773 
774 /* The size in bytes of the BTM inquiry database. 5 As Default */
775 #ifndef BTM_INQ_DB_SIZE
776 #define BTM_INQ_DB_SIZE             5
777 #endif
778 
779 /* The default scan mode */
780 #ifndef BTM_DEFAULT_SCAN_TYPE
781 #define BTM_DEFAULT_SCAN_TYPE       BTM_SCAN_TYPE_INTERLACED
782 #endif
783 
784 /* Should connections to unknown devices be allowed when not discoverable? */
785 #ifndef BTM_ALLOW_CONN_IF_NONDISCOVER
786 #define BTM_ALLOW_CONN_IF_NONDISCOVER   TRUE
787 #endif
788 
789 /* Sets the Page_Scan_Window:  the length of time that the device is performing a page scan. */
790 #ifndef BTM_DEFAULT_CONN_WINDOW
791 #define BTM_DEFAULT_CONN_WINDOW     0x0012
792 #endif
793 
794 /* Sets the Page_Scan_Activity:  the interval between the start of two consecutive page scans. */
795 #ifndef BTM_DEFAULT_CONN_INTERVAL
796 #define BTM_DEFAULT_CONN_INTERVAL   0x0800
797 #endif
798 
799 /* When automatic inquiry scan is enabled, this sets the inquiry scan window. */
800 #ifndef BTM_DEFAULT_DISC_WINDOW
801 #define BTM_DEFAULT_DISC_WINDOW     0x0012
802 #endif
803 
804 /* When automatic inquiry scan is enabled, this sets the inquiry scan interval. */
805 #ifndef BTM_DEFAULT_DISC_INTERVAL
806 #define BTM_DEFAULT_DISC_INTERVAL   0x0800
807 #endif
808 
809 /*
810 * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
811 *
812 * SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony)
813 * MAJOR_CLASS:0x02 - PHONE
814 * MINOR_CLASS:0x0C - SMART_PHONE
815 *
816 */
817 #define BTA_DM_COD_SMARTPHONE {0x5A, 0x02, 0x0C}
818 
819 /*
820 * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
821 *
822 * SERVICE_CLASS:0x2C (Bit21 - Audio, Bit19 - Capturing)
823 * MAJOR_CLASS:0x04 - Audio/Video
824 * MINOR_CLASS:0x05 - LoudSpeaker
825 */
826 #define BTA_DM_COD_LOUDSPEAKER {0x2C, 0x04, 0x14}
827 
828 /*
829 * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
830 *
831 * SERVICE_CLASS:0x00 None
832 * MAJOR_CLASS:0x1f - Uncategorized: device code not specified
833 * MINOR_CLASS:0x00 - None
834 */
835 #define BTA_DM_COD_UNCLASSIFIED {0x00, 0x1f, 0x00}
836 
837 /* Default class of device */
838 #ifndef BTA_DM_COD
839 #define BTA_DM_COD BTA_DM_COD_UNCLASSIFIED
840 #endif
841 
842 /* The number of SCO links. */
843 #ifndef BTM_MAX_SCO_LINKS
844 #define BTM_MAX_SCO_LINKS           0	//3
845 #endif
846 
847 /* The preferred type of SCO links (2-eSCO, 0-SCO). */
848 #ifndef BTM_DEFAULT_SCO_MODE
849 #define BTM_DEFAULT_SCO_MODE        2
850 #endif
851 
852 /* The number of security records for peer devices. 100 AS Default*/
853 #ifndef BTM_SEC_MAX_DEVICE_RECORDS
854 #if SMP_INCLUDED == TRUE
855 #define BTM_SEC_MAX_DEVICE_RECORDS  15 // 100
856 #else
857 #define BTM_SEC_MAX_DEVICE_RECORDS  8
858 #endif /* SMP_INCLUDED == TRUE */
859 #endif
860 
861 /* The number of security records for services. 32 AS Default*/
862 #ifndef BTM_SEC_MAX_SERVICE_RECORDS
863 #define BTM_SEC_MAX_SERVICE_RECORDS 8 // 32
864 #endif
865 
866 /* If True, force a retrieval of remote device name for each bond in case it's changed */
867 #ifndef BTM_SEC_FORCE_RNR_FOR_DBOND
868 #define BTM_SEC_FORCE_RNR_FOR_DBOND  FALSE
869 #endif
870 
871 /* Maximum device name length used in btm database. Up to 248*/
872 #ifndef BTM_MAX_REM_BD_NAME_LEN
873 #define BTM_MAX_REM_BD_NAME_LEN     64
874 #endif
875 
876 /* Maximum local device name length stored btm database.
877   '0' disables storage of the local name in BTM */
878 #if UC_MAX_LOC_BD_NAME_LEN
879 #define BTM_MAX_LOC_BD_NAME_LEN     UC_MAX_LOC_BD_NAME_LEN
880 #define BTC_MAX_LOC_BD_NAME_LEN     BTM_MAX_LOC_BD_NAME_LEN
881 #else
882 #define BTM_MAX_LOC_BD_NAME_LEN     64
883 #define BTC_MAX_LOC_BD_NAME_LEN     BTM_MAX_LOC_BD_NAME_LEN
884 #endif
885 
886 /* Fixed Default String. When this is defined as null string, the device's
887  * product model name is used as the default local name.
888  */
889 #ifndef BTM_DEF_LOCAL_NAME
890 #define BTM_DEF_LOCAL_NAME      ""
891 #endif
892 
893 /* Maximum service name stored with security authorization (0 if not needed) */
894 #ifndef BTM_SEC_SERVICE_NAME_LEN
895 #define BTM_SEC_SERVICE_NAME_LEN    BT_MAX_SERVICE_NAME_LEN
896 #endif
897 
898 /* Maximum length of the service name. */
899 #ifndef BT_MAX_SERVICE_NAME_LEN
900 #define BT_MAX_SERVICE_NAME_LEN     21
901 #endif
902 
903 /* ACL buffer size in HCI Host Buffer Size command. */
904 #ifndef BTM_ACL_BUF_SIZE
905 #define BTM_ACL_BUF_SIZE            0
906 #endif
907 
908 /* The maximum number of clients that can register with the power manager. */
909 #ifndef BTM_MAX_PM_RECORDS
910 #define BTM_MAX_PM_RECORDS          2
911 #endif
912 
913 /* This is set to show debug trace messages for the power manager. */
914 #ifndef BTM_PM_DEBUG
915 #define BTM_PM_DEBUG                FALSE
916 #endif
917 
918 /* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */
919 #ifndef BTM_SCO_WAKE_PARKED_LINK
920 #define BTM_SCO_WAKE_PARKED_LINK    FALSE
921 #endif
922 
923 /* If the user does not respond to security process requests within this many seconds,
924  * a negative response would be sent automatically.
925  * 30 is LMP response timeout value */
926 #ifndef BTM_SEC_TIMEOUT_VALUE
927 #define BTM_SEC_TIMEOUT_VALUE           35
928 #endif
929 
930 /* Maximum number of callbacks that can be registered using BTM_RegisterForVSEvents */
931 #ifndef BTM_MAX_VSE_CALLBACKS
932 #define BTM_MAX_VSE_CALLBACKS           3
933 #endif
934 
935 /******************************************
936 **    Lisbon Features
937 *******************************************/
938 /* This is set to TRUE if the FEC is required for EIR packet. */
939 #ifndef BTM_EIR_DEFAULT_FEC_REQUIRED
940 #define BTM_EIR_DEFAULT_FEC_REQUIRED    TRUE
941 #endif
942 
943 /* The IO capability of the local device (for Simple Pairing) */
944 #ifndef BTM_LOCAL_IO_CAPS
945 #define BTM_LOCAL_IO_CAPS               BTM_IO_CAP_NONE
946 #endif
947 
948 #ifndef BTM_LOCAL_IO_CAPS_BLE
949 #if (BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE)
950 #define BTM_LOCAL_IO_CAPS_BLE           BTM_IO_CAP_KBDISP
951 #else
952 #define BTM_LOCAL_IO_CAPS_BLE           4
953 #endif  ///BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE
954 #endif
955 
956 /* The default MITM Protection Requirement (for Simple Pairing)
957  * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */
958 #ifndef BTM_DEFAULT_AUTH_REQ
959 #define BTM_DEFAULT_AUTH_REQ            BTM_AUTH_SP_NO
960 #endif
961 
962 /* The default MITM Protection Requirement for dedicated bonding using Simple Pairing
963  * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */
964 #ifndef BTM_DEFAULT_DD_AUTH_REQ
965 #define BTM_DEFAULT_DD_AUTH_REQ            BTM_AUTH_AP_YES
966 #endif
967 
968 /* Include Out-of-Band implementation for Simple Pairing */
969 #ifndef BTM_OOB_INCLUDED
970 #define BTM_OOB_INCLUDED                TRUE
971 #endif
972 
973 /* TRUE to include Sniff Subrating */
974 #if (BTA_DM_PM_INCLUDED == TRUE)
975 #ifndef BTM_SSR_INCLUDED
976 #define BTM_SSR_INCLUDED                TRUE
977 #endif
978 #endif /* BTA_DM_PM_INCLUDED */
979 
980 /*************************
981 ** End of Lisbon Features
982 **************************/
983 
984 /* 4.1/4.2 secure connections feature */
985 #ifndef SC_MODE_INCLUDED
986 // Disable AES-CCM (BT 4.1) for BT Classic to workaround controller AES issue. E0 encryption (BT 4.0) will be used.
987 #define SC_MODE_INCLUDED                FALSE
988 #endif
989 
990 /* Used for conformance testing ONLY */
991 #ifndef BTM_BLE_CONFORMANCE_TESTING
992 #define BTM_BLE_CONFORMANCE_TESTING           FALSE
993 #endif
994 
995 /******************************************************************************
996 **
997 ** CONTROLLER TO HOST FLOW CONTROL
998 **
999 ******************************************************************************/
1000 
1001 #define C2H_FLOW_CONTROL_INCLUDED TRUE
1002 
1003 /******************************************************************************
1004 **
1005 ** L2CAP
1006 **
1007 ******************************************************************************/
1008 
1009 #ifndef L2CAP_CLIENT_INCLUDED
1010 #define L2CAP_CLIENT_INCLUDED FALSE
1011 #endif
1012 
1013 /* The maximum number of simultaneous applications that can register with LE L2CAP. */
1014 #ifndef BLE_MAX_L2CAP_CLIENTS
1015 #define BLE_MAX_L2CAP_CLIENTS           15
1016 #endif
1017 
1018 /* Support status of L2CAP connection-oriented dynamic channels over LE transport with dynamic CID */
1019 #ifndef BLE_L2CAP_COC_INCLUDED
1020 #define BLE_L2CAP_COC_INCLUDED          FALSE // LE COC not use by default
1021 #endif
1022 
1023 /* Support status of L2CAP connection-oriented dynamic channels over LE or BR/EDR transport with dynamic CID */
1024 #ifndef L2CAP_COC_INCLUDED
1025 #if (CLASSIC_BT_INCLUDED == TRUE || BLE_L2CAP_COC_INCLUDED == TRUE)
1026 #define L2CAP_COC_INCLUDED              TRUE
1027 #else
1028 #define L2CAP_COC_INCLUDED              FALSE
1029 #endif
1030 #endif
1031 
1032 /* The maximum number of simultaneous links that L2CAP can support. Up to 7*/
1033 #ifndef MAX_ACL_CONNECTIONS
1034 #define MAX_L2CAP_LINKS             5
1035 #else
1036 #define MAX_L2CAP_LINKS             MAX_ACL_CONNECTIONS
1037 #endif
1038 
1039 /* The maximum number of simultaneous channels that L2CAP can support. Up to 16*/
1040 #ifndef MAX_L2CAP_CHANNELS
1041 #if (CLASSIC_BT_INCLUDED == TRUE)
1042 #define MAX_L2CAP_CHANNELS          16
1043 #else
1044 #if (SMP_INCLUDED == FALSE)
1045 #define MAX_L2CAP_CHANNELS          MAX_ACL_CONNECTIONS  //This is used in the BLE client when start connected with the peer device
1046 #else
1047 #define MAX_L2CAP_CHANNELS          (MAX_ACL_CONNECTIONS * 2)  //This is used in the BLE client when start connected with the peer device and in SMP
1048 #endif   ///SMP_INCLUDED == FALSE
1049 #endif   ///CLASSIC_BT_INCLUDED == TRUE
1050 #endif   ///MAX_L2CAP_CHANNELS
1051 
1052 /* The maximum number of simultaneous applications that can register with L2CAP. */
1053 #ifndef MAX_L2CAP_CLIENTS
1054 #if (CLASSIC_BT_INCLUDED == TRUE)
1055 #define MAX_L2CAP_CLIENTS           8
1056 #else
1057 #define MAX_L2CAP_CLIENTS           1  //Not support to allocate a channel control block in BLE only mode
1058 #endif  ///CLASSIC_BT_INCLUDED == TRUE
1059 #endif
1060 
1061 /* The number of seconds of link inactivity before a link is disconnected. */
1062 #ifndef L2CAP_LINK_INACTIVITY_TOUT
1063 #define L2CAP_LINK_INACTIVITY_TOUT  4
1064 #endif
1065 
1066 /* The number of seconds of link inactivity after bonding before a link is disconnected. */
1067 #ifndef L2CAP_BONDING_TIMEOUT
1068 #define L2CAP_BONDING_TIMEOUT       3
1069 #endif
1070 
1071 /* The time from the HCI connection complete to disconnect if no channel is established. */
1072 #ifndef L2CAP_LINK_STARTUP_TOUT
1073 #define L2CAP_LINK_STARTUP_TOUT     60
1074 #endif
1075 
1076 /* The L2CAP MTU; must be in accord with the HCI ACL pool size. */
1077 #ifndef L2CAP_MTU_SIZE
1078 #define L2CAP_MTU_SIZE              1691
1079 #endif
1080 
1081 /* The L2CAP MPS over Bluetooth; must be in accord with the FCR tx pool size and ACL down buffer size. */
1082 #ifndef L2CAP_MPS_OVER_BR_EDR
1083 #define L2CAP_MPS_OVER_BR_EDR       1010
1084 #endif
1085 
1086 /* If host flow control enabled, this is the number of buffers the controller can have unacknowledged. */
1087 #ifndef L2CAP_HOST_FC_ACL_BUFS
1088 #define L2CAP_HOST_FC_ACL_BUFS      20
1089 #endif
1090 
1091 /* This is set to enable L2CAP to  take the ACL link out of park mode when ACL data is to be sent. */
1092 #ifndef L2CAP_WAKE_PARKED_LINK
1093 #define L2CAP_WAKE_PARKED_LINK      TRUE
1094 #endif
1095 
1096 /* Whether link wants to be the master or the slave. */
1097 #ifndef L2CAP_DESIRED_LINK_ROLE
1098 #define L2CAP_DESIRED_LINK_ROLE     HCI_ROLE_SLAVE
1099 #endif
1100 
1101 /* Include Non-Flushable Packet Boundary Flag feature of Lisbon */
1102 #ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED
1103 #define L2CAP_NON_FLUSHABLE_PB_INCLUDED     TRUE
1104 #endif
1105 
1106 /* Minimum number of ACL credit for high priority link */
1107 #ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
1108 #define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA       5
1109 #endif
1110 
1111 /* used for monitoring HCI ACL credit management */
1112 #ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG
1113 #define L2CAP_HCI_FLOW_CONTROL_DEBUG        TRUE
1114 #endif
1115 
1116 /* Used for calculating transmit buffers off of */
1117 #ifndef L2CAP_NUM_XMIT_BUFFS
1118 #define L2CAP_NUM_XMIT_BUFFS                HCI_ACL_BUF_MAX
1119 #endif
1120 
1121 /* Unicast Connectionless Data */
1122 #ifndef L2CAP_UCD_INCLUDED
1123 #define L2CAP_UCD_INCLUDED                  FALSE
1124 #endif
1125 
1126 /* Unicast Connectionless Data MTU */
1127 #ifndef L2CAP_UCD_MTU
1128 #define L2CAP_UCD_MTU                       L2CAP_MTU_SIZE
1129 #endif
1130 
1131 /* Unicast Connectionless Data Idle Timeout */
1132 #ifndef L2CAP_UCD_IDLE_TIMEOUT
1133 #define L2CAP_UCD_IDLE_TIMEOUT              2
1134 #endif
1135 
1136 /* Unicast Connectionless Data Idle Timeout */
1137 #ifndef L2CAP_UCD_CH_PRIORITY
1138 #define L2CAP_UCD_CH_PRIORITY               L2CAP_CHNL_PRIORITY_MEDIUM
1139 #endif
1140 
1141 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
1142 /* Excluding L2CAP signaling channel and UCD */
1143 #ifndef L2CAP_NUM_FIXED_CHNLS
1144 #if (CLASSIC_BT_INCLUDED == TRUE)
1145 #define L2CAP_NUM_FIXED_CHNLS               32
1146 #else
1147 #define L2CAP_NUM_FIXED_CHNLS               3   //There are just three fix channel in the BLE only mode(gatt,signal,smp)
1148 #endif  ///CLASSIC_BT_INCLUDED == TRUE
1149 #endif
1150 
1151 /* First fixed channel supported */
1152 #ifndef L2CAP_FIRST_FIXED_CHNL
1153 #define L2CAP_FIRST_FIXED_CHNL              4
1154 #endif
1155 
1156 #ifndef L2CAP_LAST_FIXED_CHNL
1157 #define L2CAP_LAST_FIXED_CHNL           (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
1158 #endif
1159 
1160 /* Round Robin service channels in link */
1161 #ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
1162 #define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE   TRUE
1163 #endif
1164 
1165 /* Used for calculating transmit buffers off of */
1166 #ifndef L2CAP_NUM_XMIT_BUFFS
1167 #define L2CAP_NUM_XMIT_BUFFS                HCI_ACL_BUF_MAX
1168 #endif
1169 
1170 /* used for monitoring eL2CAP data flow */
1171 #ifndef L2CAP_ERTM_STATS
1172 #define L2CAP_ERTM_STATS                    FALSE
1173 #endif
1174 
1175 /* Used for conformance testing ONLY:  When TRUE lets scriptwrapper overwrite info response */
1176 #ifndef L2CAP_CONFORMANCE_TESTING
1177 #define L2CAP_CONFORMANCE_TESTING           FALSE
1178 #endif
1179 
1180 /*
1181  * Max bytes per connection to buffer locally before dropping the
1182  * connection if local client does not receive it  - default is 1MB
1183  */
1184 #ifndef L2CAP_MAX_RX_BUFFER
1185 #define L2CAP_MAX_RX_BUFFER                 0x100000
1186 #endif
1187 
1188 
1189 #ifndef TIMER_PARAM_TYPE
1190 #define TIMER_PARAM_TYPE    UINT32
1191 #endif
1192 
1193 /******************************************************************************
1194 **
1195 ** BLE
1196 **
1197 ******************************************************************************/
1198 
1199 #ifndef BLE_INCLUDED
1200 #define BLE_INCLUDED            FALSE
1201 #endif
1202 
1203 #ifndef BLE_ANDROID_CONTROLLER_SCAN_FILTER
1204 #define BLE_ANDROID_CONTROLLER_SCAN_FILTER            TRUE
1205 #endif
1206 
1207 #ifndef LOCAL_BLE_CONTROLLER_ID
1208 #define LOCAL_BLE_CONTROLLER_ID         (1)
1209 #endif
1210 
1211 /*
1212  * Toggles support for general LE privacy features such as remote address
1213  * resolution, local address rotation etc.
1214  */
1215 #ifndef BLE_PRIVACY_SPT
1216 #define BLE_PRIVACY_SPT         FALSE
1217 #endif
1218 
1219 /*
1220  * Enables or disables support for local privacy (ex. address rotation)
1221  */
1222 #ifndef BLE_LOCAL_PRIVACY_ENABLED
1223 #define BLE_LOCAL_PRIVACY_ENABLED         TRUE
1224 #endif
1225 
1226 /*
1227  * Toggles support for vendor specific extensions such as RPA offloading,
1228  * feature discovery, multi-adv etc.
1229  */
1230 #ifndef BLE_VND_INCLUDED
1231 #define BLE_VND_INCLUDED        FALSE
1232 #endif
1233 
1234 #ifndef BTM_BLE_ADV_TX_POWER
1235 #ifdef CONFIG_IDF_TARGET_ESP32
1236 #define BTM_BLE_ADV_TX_POWER {-12, -9, -6, -3, 0, 3, 6, 9}
1237 #else
1238 #define BTM_BLE_ADV_TX_POWER {-24, -21, -18, -15, -12, -9, -6, -3, 0, 3, 6, 9, 12, 15, 18, 21}
1239 #endif
1240 #endif
1241 
1242 #ifndef BTM_TX_POWER
1243 #ifdef CONFIG_IDF_TARGET_ESP32
1244 #define BTM_TX_POWER {-12, -9, -6, -3, 0, 3, 6, 9}
1245 #else
1246 #define BTM_TX_POWER {-24, -21, -18, -15, -12, -9, -6, -3, 0, 3, 6, 9, 12, 15, 18, 21}
1247 #endif
1248 #endif
1249 
1250 #ifndef BTM_TX_POWER_LEVEL_MAX
1251 #ifdef CONFIG_IDF_TARGET_ESP32
1252 #define BTM_TX_POWER_LEVEL_MAX 7
1253 #else
1254 #define BTM_TX_POWER_LEVEL_MAX 15
1255 #endif
1256 #endif
1257 
1258 
1259 #ifndef BLE_BATCH_SCAN_INCLUDED
1260 #define BLE_BATCH_SCAN_INCLUDED  TRUE
1261 #endif
1262 
1263 /******************************************************************************
1264 **
1265 ** ATT/GATT Protocol/Profile Settings
1266 **
1267 ******************************************************************************/
1268 #ifndef GATT_INCLUDED
1269 #if BLE_INCLUDED == TRUE
1270 #define GATT_INCLUDED TRUE
1271 #else
1272 #define GATT_INCLUDED FALSE
1273 #endif
1274 #endif
1275 
1276 #ifndef BTA_GATT_INCLUDED
1277 #if BLE_INCLUDED == TRUE
1278 #define BTA_GATT_INCLUDED TRUE
1279 #else
1280 #define BTA_GATT_INCLUDED FALSE
1281 #endif
1282 #endif
1283 
1284 #if BTA_GATT_INCLUDED == TRUE && BLE_INCLUDED == FALSE
1285 #error "can't have GATT without BLE"
1286 #endif
1287 
1288 #ifndef BLE_LLT_INCLUDED
1289 #define BLE_LLT_INCLUDED    TRUE
1290 #endif
1291 
1292 /* Added this marco to fixed the android 7.0 will lead to update connection parameters
1293    collision when the slave sent the HCI_BLE_UPD_LL_CONN_PARAMS comment to the controller
1294    request the master to update connection parameters directly. */
1295 #ifndef BLE_SLAVE_UPD_CONN_PARAMS
1296 #define BLE_SLAVE_UPD_CONN_PARAMS FALSE
1297 #endif
1298 
1299 #ifndef ATT_INCLUDED
1300 #define ATT_INCLUDED         TRUE
1301 #endif
1302 
1303 #ifndef ATT_DEBUG
1304 #define ATT_DEBUG           FALSE
1305 #endif
1306 
1307 #ifndef BLE_PERIPHERAL_MODE_SUPPORT
1308 #define BLE_PERIPHERAL_MODE_SUPPORT  TRUE
1309 #endif
1310 
1311 #ifndef BLE_DELAY_REQUEST_ENC
1312 /* This flag is to work around IPHONE problem, We need to wait for iPhone ready
1313    before send encryption request to iPhone */
1314 #define BLE_DELAY_REQUEST_ENC        FALSE
1315 #endif
1316 
1317 #ifndef GAP_TRANSPORT_SUPPORTED
1318 #define GAP_TRANSPORT_SUPPORTED      GATT_TRANSPORT_LE_BR_EDR
1319 #endif
1320 
1321 #ifndef GATTP_TRANSPORT_SUPPORTED
1322 #define GATTP_TRANSPORT_SUPPORTED    GATT_TRANSPORT_LE_BR_EDR
1323 #endif
1324 
1325 #ifndef GATT_MAX_SR_PROFILES
1326 #define GATT_MAX_SR_PROFILES        UC_CONFIG_BT_GATT_MAX_SR_PROFILES
1327 #endif
1328 
1329 #ifndef GATT_MAX_APPS
1330 #define GATT_MAX_APPS            8 /* MAX is 32 note: 2 apps used internally GATT and GAP */
1331 #endif
1332 
1333 #ifndef GATT_MAX_PHY_CHANNEL
1334 #define GATT_MAX_PHY_CHANNEL        7
1335 #endif
1336 
1337 /* Used for conformance testing ONLY */
1338 #ifndef GATT_CONFORMANCE_TESTING
1339 #define GATT_CONFORMANCE_TESTING           FALSE
1340 #endif
1341 
1342 /* number of background connection device allowence, ideally to be the same as WL size
1343 */
1344 #ifndef GATT_MAX_BG_CONN_DEV
1345 #define GATT_MAX_BG_CONN_DEV        8 /*MAX is 32*/
1346 #endif
1347 
1348 /******************************************************************************
1349 **
1350 ** GATT
1351 **
1352 ******************************************************************************/
1353 #ifndef GATTC_INCLUDED
1354 #if BLE_INCLUDED == TRUE
1355 #define GATTC_INCLUDED         FALSE
1356 #else
1357 #define GATTC_INCLUDED         FALSE
1358 #endif
1359 #endif
1360 
1361 #ifndef GATTS_INCLUDED
1362 #if BLE_INCLUDED == TRUE
1363 #define GATTS_INCLUDED         TRUE
1364 #else
1365 #define GATTS_INCLUDED         FALSE
1366 #endif
1367 #endif
1368 
1369 /******************************************************************************
1370 **
1371 ** SMP
1372 **
1373 ******************************************************************************/
1374 #ifndef SMP_INCLUDED
1375 #if BLE_INCLUDED == TRUE
1376 #define SMP_INCLUDED         FALSE
1377 #else
1378 #define SMP_INCLUDED         FALSE
1379 #endif
1380 #endif
1381 
1382 #ifndef SMP_DEBUG
1383 #define SMP_DEBUG            FALSE
1384 #endif
1385 
1386 #ifndef SMP_DEFAULT_AUTH_REQ
1387 #define SMP_DEFAULT_AUTH_REQ    SMP_AUTH_NB_ENC_ONLY
1388 #endif
1389 
1390 #ifndef SMP_MAX_ENC_KEY_SIZE
1391 #define SMP_MAX_ENC_KEY_SIZE    16
1392 #endif
1393 
1394 #ifndef SMP_MIN_ENC_KEY_SIZE
1395 #define SMP_MIN_ENC_KEY_SIZE    7
1396 #endif
1397 
1398 /* minimum link timeout after SMP pairing is done, leave room for key exchange
1399    and racing condition for the following service connection.
1400    Prefer greater than 0 second, and no less than default inactivity link idle
1401    timer(L2CAP_LINK_INACTIVITY_TOUT) in l2cap) */
1402 #ifndef SMP_LINK_TOUT_MIN
1403 #if (L2CAP_LINK_INACTIVITY_TOUT > 0)
1404 #define SMP_LINK_TOUT_MIN               L2CAP_LINK_INACTIVITY_TOUT
1405 #else
1406 #define SMP_LINK_TOUT_MIN               2
1407 #endif
1408 #endif
1409 
1410 /******************************************************************************
1411 **
1412 ** BT_SSP
1413 **
1414 ******************************************************************************/
1415 #ifndef BT_SSP_INCLUDED
1416 #define BT_SSP_INCLUDED         FALSE
1417 #endif
1418 
1419 #if BT_SSP_INCLUDED == TRUE && CLASSIC_BT_INCLUDED == FALSE
1420 #error "Can't have SSP without CLASSIC BT"
1421 #endif
1422 
1423 /******************************************************************************
1424 **
1425 ** SDP
1426 **
1427 ******************************************************************************/
1428 
1429 #ifndef SDP_INCLUDED
1430 #define SDP_INCLUDED                FALSE
1431 #endif
1432 
1433 /* This is set to enable SDP server functionality. */
1434 #ifndef SDP_SERVER_ENABLED
1435 #if SDP_INCLUDED == TRUE
1436 #define SDP_SERVER_ENABLED          TRUE
1437 #else
1438 #define SDP_SERVER_ENABLED          FALSE
1439 #endif
1440 #endif
1441 
1442 /* This is set to enable SDP client functionality. */
1443 #ifndef SDP_CLIENT_ENABLED
1444 #if SDP_INCLUDED == TRUE
1445 #define SDP_CLIENT_ENABLED          TRUE
1446 #else
1447 #define SDP_CLIENT_ENABLED          FALSE
1448 #endif
1449 #endif
1450 
1451 /* The maximum number of SDP records the server can support. */
1452 #ifndef SDP_MAX_RECORDS
1453 #define SDP_MAX_RECORDS             6  /*max is 30*/
1454 #endif
1455 
1456 /* The maximum number of attributes in each record. */
1457 #ifndef SDP_MAX_REC_ATTR
1458 #if (defined(HID_DEV_INCLUDED) && (HID_DEV_INCLUDED==TRUE)) || (defined(BTC_SDP_INCLUDED) && (BTC_SDP_INCLUDED==TRUE))
1459 #define SDP_MAX_REC_ATTR            25
1460 #else
1461 #define SDP_MAX_REC_ATTR            8
1462 #endif /* defined(HID_DEV_INCLUDED) && (HID_DEV_INCLUDED==TRUE) */
1463 #endif
1464 
1465 #ifndef SDP_MAX_PAD_LEN
1466 #define SDP_MAX_PAD_LEN             300
1467 #endif
1468 
1469 /* The maximum length, in bytes, of an attribute. */
1470 #ifndef SDP_MAX_ATTR_LEN
1471 #define SDP_MAX_ATTR_LEN            400
1472 #endif
1473 
1474 /* The maximum number of attribute filters supported by SDP databases. */
1475 #ifndef SDP_MAX_ATTR_FILTERS
1476 #define SDP_MAX_ATTR_FILTERS        15
1477 #endif
1478 
1479 /* The maximum number of UUID filters supported by SDP databases. */
1480 #ifndef SDP_MAX_UUID_FILTERS
1481 #define SDP_MAX_UUID_FILTERS        3
1482 #endif
1483 
1484 /* The maximum number of record handles retrieved in a search. */
1485 #ifndef SDP_MAX_DISC_SERVER_RECS
1486 #define SDP_MAX_DISC_SERVER_RECS    21
1487 #endif
1488 
1489 /* The size of a scratchpad buffer, in bytes, for storing the response to an attribute request. */
1490 #ifndef SDP_MAX_LIST_BYTE_COUNT
1491 #define SDP_MAX_LIST_BYTE_COUNT     4096
1492 #endif
1493 
1494 /* The maximum number of parameters in an SDP protocol element. */
1495 #ifndef SDP_MAX_PROTOCOL_PARAMS
1496 #define SDP_MAX_PROTOCOL_PARAMS     2
1497 #endif
1498 
1499 /* The maximum number of simultaneous client and server connections. */
1500 #ifndef SDP_MAX_CONNECTIONS
1501 #define SDP_MAX_CONNECTIONS         2 // 4
1502 #endif
1503 
1504 /* The MTU size for the L2CAP configuration. */
1505 #ifndef SDP_MTU_SIZE
1506 #define SDP_MTU_SIZE                672
1507 #endif
1508 
1509 /* The flush timeout for the L2CAP configuration. */
1510 #ifndef SDP_FLUSH_TO
1511 #define SDP_FLUSH_TO                0xFFFF
1512 #endif
1513 
1514 /* The name for security authorization. */
1515 #ifndef SDP_SERVICE_NAME
1516 #define SDP_SERVICE_NAME            "Service Discovery"
1517 #endif
1518 
1519 /* The security level for BTM. */
1520 #ifndef SDP_SECURITY_LEVEL
1521 #define SDP_SECURITY_LEVEL          BTM_SEC_NONE
1522 #endif
1523 
1524 /******************************************************************************
1525 **
1526 ** RFCOMM
1527 **
1528 ******************************************************************************/
1529 #ifndef RFCOMM_INCLUDED
1530 #define RFCOMM_INCLUDED             FALSE
1531 #endif
1532 
1533 #ifndef BTA_JV_RFCOMM_INCLUDED
1534 #define BTA_JV_RFCOMM_INCLUDED      FALSE
1535 #endif
1536 
1537 /* The maximum number of ports supported. */
1538 #ifndef MAX_RFC_PORTS
1539 #define MAX_RFC_PORTS               8 /*max is 30*/
1540 #endif
1541 
1542 /* The maximum simultaneous links to different devices. */
1543 #ifndef MAX_ACL_CONNECTIONS
1544 #define MAX_BD_CONNECTIONS          3 /*max is 7*/
1545 #else
1546 #define MAX_BD_CONNECTIONS          MAX_ACL_CONNECTIONS
1547 #endif
1548 
1549 /* The port receive queue low watermark level, in bytes. */
1550 #ifndef PORT_RX_LOW_WM
1551 #define PORT_RX_LOW_WM              (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM)
1552 #endif
1553 
1554 /* The port receive queue high watermark level, in bytes. */
1555 #ifndef PORT_RX_HIGH_WM
1556 #define PORT_RX_HIGH_WM             (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM)
1557 #endif
1558 
1559 /* The port receive queue critical watermark level, in bytes. */
1560 #ifndef PORT_RX_CRITICAL_WM
1561 #define PORT_RX_CRITICAL_WM         (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM)
1562 #endif
1563 
1564 /* The port receive queue low watermark level, in number of buffers. */
1565 #ifndef PORT_RX_BUF_LOW_WM
1566 #define PORT_RX_BUF_LOW_WM          4
1567 #endif
1568 
1569 /* The port receive queue high watermark level, in number of buffers. */
1570 #ifndef PORT_RX_BUF_HIGH_WM
1571 #define PORT_RX_BUF_HIGH_WM         10
1572 #endif
1573 
1574 /* The port receive queue critical watermark level, in number of buffers. */
1575 #ifndef PORT_RX_BUF_CRITICAL_WM
1576 #define PORT_RX_BUF_CRITICAL_WM     15
1577 #endif
1578 
1579 /* The port transmit queue high watermark level, in bytes. */
1580 #ifndef PORT_TX_HIGH_WM
1581 #define PORT_TX_HIGH_WM             (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM)
1582 #endif
1583 
1584 /* The port transmit queue critical watermark level, in bytes. */
1585 #ifndef PORT_TX_CRITICAL_WM
1586 #define PORT_TX_CRITICAL_WM         (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM)
1587 #endif
1588 
1589 /* The port transmit queue high watermark level, in number of buffers. */
1590 #ifndef PORT_TX_BUF_HIGH_WM
1591 #define PORT_TX_BUF_HIGH_WM         10
1592 #endif
1593 
1594 /* The port transmit queue high watermark level, in number of buffers. */
1595 #ifndef PORT_TX_BUF_CRITICAL_WM
1596 #define PORT_TX_BUF_CRITICAL_WM     15
1597 #endif
1598 
1599 /* The RFCOMM multiplexer preferred flow control mechanism. */
1600 #ifndef PORT_FC_DEFAULT
1601 #define PORT_FC_DEFAULT             PORT_FC_CREDIT
1602 #endif
1603 
1604 /* The maximum number of credits receiver sends to peer when using credit-based flow control. */
1605 #ifndef PORT_CREDIT_RX_MAX
1606 #define PORT_CREDIT_RX_MAX          16
1607 #endif
1608 
1609 /* The credit low watermark level. */
1610 #ifndef PORT_CREDIT_RX_LOW
1611 #define PORT_CREDIT_RX_LOW          8
1612 #endif
1613 
1614 /* ERTM Tx window size */
1615 #ifndef RFC_FCR_OPT_TX_WINDOW_SIZE
1616 #define RFC_FCR_OPT_TX_WINDOW_SIZE  10
1617 #endif
1618 
1619 /* ERTM Maximum transmissions before disconnecting */
1620 #ifndef RFC_FCR_OPT_MAX_TX_B4_DISCNT
1621 #define RFC_FCR_OPT_MAX_TX_B4_DISCNT 20
1622 #endif
1623 
1624 /* ERTM Retransmission timeout (2 secs) */
1625 #ifndef RFC_FCR_OPT_RETX_TOUT
1626 #define RFC_FCR_OPT_RETX_TOUT        2000
1627 #endif
1628 
1629 /* ERTM Monitor timeout (12 secs) */
1630 #ifndef RFC_FCR_OPT_MONITOR_TOUT
1631 #define RFC_FCR_OPT_MONITOR_TOUT     12000
1632 #endif
1633 
1634 /* ERTM ERTM MPS segment size */
1635 #ifndef RFC_FCR_OPT_MAX_PDU_SIZE
1636 #define RFC_FCR_OPT_MAX_PDU_SIZE     1010
1637 #endif
1638 
1639 /******************************************************************************
1640 **
1641 ** OBEX
1642 **
1643 ******************************************************************************/
1644 
1645 /*
1646  * Buffer size to reassemble the SDU.
1647  * It will allow buffers to be used that are larger than the L2CAP_MAX_MTU.
1648  */
1649 #ifndef OBX_USER_RX_BUF_SIZE
1650 #define OBX_USER_RX_BUF_SIZE    OBX_LRG_DATA_BUF_SIZE
1651 #endif
1652 
1653 /*
1654  * Buffer size to hold the SDU.
1655  * It will allow buffers to be used that are larger than the L2CAP_MAX_MTU.
1656  */
1657 #ifndef OBX_USER_TX_BUF_SIZE
1658 #define OBX_USER_TX_BUF_SIZE    OBX_LRG_DATA_BUF_SIZE
1659 #endif
1660 
1661 /* Buffer size used to hold MPS segments during SDU reassembly. */
1662 #ifndef OBX_FCR_RX_BUF_SIZE
1663 #define OBX_FCR_RX_BUF_SIZE     BT_DEFAULT_BUFFER_SIZE
1664 #endif
1665 
1666 /*
1667  * Buffer size used to hold MPS segments used in (re)transmissions.
1668  * The size of each buffer must be able to hold the maximum MPS segment size
1669  * passed in L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) +
1670  * L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1671  */
1672 #ifndef OBX_FCR_TX_BUF_SIZE
1673 #define OBX_FCR_TX_BUF_SIZE     BT_DEFAULT_BUFFER_SIZE
1674 #endif
1675 
1676 /*
1677  * Size of the transmission window when using enhanced retransmission mode. Not used
1678  * in basic and streaming modes. Range: 1 - 63
1679  */
1680 #ifndef OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR
1681 #define OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR       20
1682 #endif
1683 
1684 /*
1685  * Number of transmission attempts for a single I-Frame before taking
1686  * Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1687  * Streaming modes.
1688  * Range: 0, 1-0xFF
1689  * 0 - infinite retransmissions
1690  * 1 - single transmission
1691  */
1692 #ifndef OBX_FCR_OPT_MAX_TX_B4_DISCNT
1693 #define OBX_FCR_OPT_MAX_TX_B4_DISCNT    20
1694 #endif
1695 
1696 /*
1697  * Retransmission Timeout
1698  * Range: Minimum 2000 (2 secs) on BR/EDR when supporting PBF.
1699  */
1700 #ifndef OBX_FCR_OPT_RETX_TOUT
1701 #define OBX_FCR_OPT_RETX_TOUT           2000
1702 #endif
1703 
1704 /*
1705  * Monitor Timeout
1706  * Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
1707  */
1708 #ifndef OBX_FCR_OPT_MONITOR_TOUT
1709 #define OBX_FCR_OPT_MONITOR_TOUT        12000
1710 #endif
1711 
1712 /*
1713  * Maximum PDU payload size.
1714  * Suggestion: The maximum amount of data that will fit into a 3-DH5 packet.
1715  * Range: 2 octets
1716 */
1717 #ifndef OBX_FCR_OPT_MAX_PDU_SIZE
1718 #define OBX_FCR_OPT_MAX_PDU_SIZE        L2CAP_MPS_OVER_BR_EDR
1719 #endif
1720 
1721 /*
1722  * Pool ID where to reassemble the SDU.
1723  * This Pool will allow buffers to be used that are larger than
1724  * the L2CAP_MAX_MTU.
1725  */
1726 #ifndef OBX_USER_RX_POOL_ID
1727 #define OBX_USER_RX_POOL_ID              4
1728 #endif
1729 
1730 /*
1731  * Pool ID where to hold the SDU.
1732  * This Pool will allow buffers to be used that are larger than
1733  * the L2CAP_MAX_MTU.
1734  */
1735 #ifndef OBX_USER_TX_POOL_ID
1736 #define OBX_USER_TX_POOL_ID              4
1737 #endif
1738 
1739 /*
1740  * GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
1741  */
1742 #ifndef OBX_FCR_RX_POOL_ID
1743 #define OBX_FCR_RX_POOL_ID                3
1744 #endif
1745 
1746 /*
1747  * Pool ID used to hold MPS segments used in (re)transmissions.
1748  * L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
1749  * Note:  This pool needs to have enough buffers to hold two times the window size negotiated
1750  * in the L2CA_SetFCROptions (2 * tx_win_size)  to allow for retransmissions.
1751  * The size of each buffer must be able to hold the maximum MPS segment size passed in
1752  * L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1753  */
1754 #ifndef OBX_FCR_TX_POOL_ID
1755 #define OBX_FCR_TX_POOL_ID                3
1756 #endif
1757 
1758 
1759 /******************************************************************************
1760 **
1761 ** BNEP
1762 **
1763 ******************************************************************************/
1764 
1765 #ifndef BNEP_INCLUDED
1766 #define BNEP_INCLUDED               FALSE
1767 #endif
1768 
1769 /* BNEP status API call is used mainly to get the L2CAP handle */
1770 #ifndef BNEP_SUPPORTS_STATUS_API
1771 #define BNEP_SUPPORTS_STATUS_API            FALSE
1772 #endif
1773 
1774 /*
1775 ** When BNEP connection changes roles after the connection is established
1776 ** we will do an authentication check again on the new role
1777 */
1778 #ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH
1779 #define BNEP_DO_AUTH_FOR_ROLE_SWITCH        FALSE
1780 #endif
1781 
1782 
1783 /* Maximum number of protocol filters supported. */
1784 #ifndef BNEP_MAX_PROT_FILTERS
1785 #define BNEP_MAX_PROT_FILTERS       5
1786 #endif
1787 
1788 /* Maximum number of multicast filters supported. */
1789 #ifndef BNEP_MAX_MULTI_FILTERS
1790 #define BNEP_MAX_MULTI_FILTERS      5
1791 #endif
1792 
1793 /* Minimum MTU size. */
1794 #ifndef BNEP_MIN_MTU_SIZE
1795 #define BNEP_MIN_MTU_SIZE           L2CAP_MTU_SIZE
1796 #endif
1797 
1798 /* Preferred MTU size. */
1799 #ifndef BNEP_MTU_SIZE
1800 #define BNEP_MTU_SIZE               BNEP_MIN_MTU_SIZE
1801 #endif
1802 
1803 /* Maximum number of buffers allowed in transmit data queue. */
1804 #ifndef BNEP_MAX_XMITQ_DEPTH
1805 #define BNEP_MAX_XMITQ_DEPTH        20
1806 #endif
1807 
1808 /* Maximum number BNEP of connections supported. */
1809 #ifndef BNEP_MAX_CONNECTIONS
1810 #define BNEP_MAX_CONNECTIONS        7
1811 #endif
1812 
1813 
1814 /******************************************************************************
1815 **
1816 ** AVDTP
1817 **
1818 ******************************************************************************/
1819 
1820 #ifndef AVDT_INCLUDED
1821 #define AVDT_INCLUDED               TRUE
1822 #endif
1823 
1824 /* Include reporting capability in AVDTP */
1825 #ifndef AVDT_REPORTING
1826 #define AVDT_REPORTING              TRUE
1827 #endif
1828 
1829 /* Include multiplexing capability in AVDTP */
1830 #ifndef AVDT_MULTIPLEXING
1831 #define AVDT_MULTIPLEXING           TRUE
1832 #endif
1833 
1834 /* Number of simultaneous links to different peer devices. */
1835 #ifndef AVDT_NUM_LINKS
1836 #define AVDT_NUM_LINKS              2
1837 #endif
1838 
1839 /* Number of simultaneous stream endpoints. */
1840 #ifndef AVDT_NUM_SEPS
1841 #define AVDT_NUM_SEPS               3
1842 #endif
1843 
1844 /* Number of transport channels setup per media stream(audio or video) */
1845 #ifndef AVDT_NUM_CHANNELS
1846 
1847 #if AVDT_REPORTING == TRUE
1848 /* signaling, media and reporting channels */
1849 #define AVDT_NUM_CHANNELS   3
1850 #else
1851 /* signaling and media channels */
1852 #define AVDT_NUM_CHANNELS   2
1853 #endif  // AVDT_REPORTING
1854 
1855 #endif  // AVDT_NUM_CHANNELS
1856 
1857 /* Number of transport channels setup by AVDT for all media streams
1858  * AVDT_NUM_CHANNELS * Number of simultaneous streams.
1859  */
1860 #ifndef AVDT_NUM_TC_TBL
1861 #define AVDT_NUM_TC_TBL             6
1862 #endif
1863 
1864 /* Maximum size in bytes of the codec capabilities information element. */
1865 #ifndef AVDT_CODEC_SIZE
1866 #define AVDT_CODEC_SIZE             10
1867 #endif
1868 
1869 /* Maximum size in bytes of the content protection information element. */
1870 #ifndef AVDT_PROTECT_SIZE
1871 #define AVDT_PROTECT_SIZE           90
1872 #endif
1873 
1874 /* Maximum number of GKI buffers in the fragment queue (for video frames).
1875  * Must be less than the number of buffers in the buffer pool of size AVDT_DATA_POOL_SIZE */
1876 #ifndef AVDT_MAX_FRAG_COUNT
1877 #define AVDT_MAX_FRAG_COUNT         15
1878 #endif
1879 
1880 /******************************************************************************
1881 **
1882 ** PAN
1883 **
1884 ******************************************************************************/
1885 
1886 #ifndef PAN_INCLUDED
1887 #define PAN_INCLUDED                     FALSE
1888 #endif
1889 
1890 /* This will enable the PANU role */
1891 #ifndef PAN_SUPPORTS_ROLE_PANU
1892 #define PAN_SUPPORTS_ROLE_PANU              FALSE
1893 #endif
1894 
1895 /* This will enable the GN role */
1896 #ifndef PAN_SUPPORTS_ROLE_GN
1897 #define PAN_SUPPORTS_ROLE_GN                FALSE
1898 #endif
1899 
1900 /* This will enable the NAP role */
1901 #ifndef PAN_SUPPORTS_ROLE_NAP
1902 #define PAN_SUPPORTS_ROLE_NAP               FALSE
1903 #endif
1904 
1905 /* This is just for debugging purposes */
1906 #ifndef PAN_SUPPORTS_DEBUG_DUMP
1907 #define PAN_SUPPORTS_DEBUG_DUMP             FALSE
1908 #endif
1909 
1910 /* Maximum number of PAN connections allowed */
1911 #ifndef MAX_PAN_CONNS
1912 #define MAX_PAN_CONNS                    7
1913 #endif
1914 
1915 /* Default service name for NAP role */
1916 #ifndef PAN_NAP_DEFAULT_SERVICE_NAME
1917 #define PAN_NAP_DEFAULT_SERVICE_NAME    "Network Access Point Service"
1918 #endif
1919 
1920 /* Default service name for GN role */
1921 #ifndef PAN_GN_DEFAULT_SERVICE_NAME
1922 #define PAN_GN_DEFAULT_SERVICE_NAME     "Group Network Service"
1923 #endif
1924 
1925 /* Default service name for PANU role */
1926 #ifndef PAN_PANU_DEFAULT_SERVICE_NAME
1927 #define PAN_PANU_DEFAULT_SERVICE_NAME   "PAN User Service"
1928 #endif
1929 
1930 /* Default description for NAP role service */
1931 #ifndef PAN_NAP_DEFAULT_DESCRIPTION
1932 #define PAN_NAP_DEFAULT_DESCRIPTION     "NAP"
1933 #endif
1934 
1935 /* Default description for GN role service */
1936 #ifndef PAN_GN_DEFAULT_DESCRIPTION
1937 #define PAN_GN_DEFAULT_DESCRIPTION      "GN"
1938 #endif
1939 
1940 /* Default description for PANU role service */
1941 #ifndef PAN_PANU_DEFAULT_DESCRIPTION
1942 #define PAN_PANU_DEFAULT_DESCRIPTION    "PANU"
1943 #endif
1944 
1945 /* Default Security level for PANU role. */
1946 #ifndef PAN_PANU_SECURITY_LEVEL
1947 #define PAN_PANU_SECURITY_LEVEL          0
1948 #endif
1949 
1950 /* Default Security level for GN role. */
1951 #ifndef PAN_GN_SECURITY_LEVEL
1952 #define PAN_GN_SECURITY_LEVEL            0
1953 #endif
1954 
1955 /* Default Security level for NAP role. */
1956 #ifndef PAN_NAP_SECURITY_LEVEL
1957 #define PAN_NAP_SECURITY_LEVEL           0
1958 #endif
1959 
1960 /******************************************************************************
1961 **
1962 ** GAP
1963 **
1964 ******************************************************************************/
1965 
1966 #ifndef GAP_INCLUDED
1967 #define GAP_INCLUDED                TRUE
1968 #endif
1969 
1970 /* This is set to enable posting event for data write */
1971 #ifndef GAP_CONN_POST_EVT_INCLUDED
1972 #define GAP_CONN_POST_EVT_INCLUDED  FALSE
1973 #endif
1974 
1975 /* The maximum number of simultaneous GAP L2CAP connections. */
1976 #ifndef GAP_MAX_CONNECTIONS
1977 #define GAP_MAX_CONNECTIONS         10 // 30
1978 #endif
1979 
1980 /* keep the raw data received from SDP server in database. */
1981 #ifndef SDP_RAW_DATA_INCLUDED
1982 #define SDP_RAW_DATA_INCLUDED       TRUE
1983 #endif
1984 
1985 /* Inquiry duration in 1.28 second units. */
1986 #ifndef SDP_DEBUG
1987 #define SDP_DEBUG                   TRUE
1988 #endif
1989 
1990 /******************************************************************************
1991 **
1992 ** HID
1993 **
1994 ******************************************************************************/
1995 #ifndef BT_HID_INCLUDED
1996 #define BT_HID_INCLUDED         FALSE
1997 #endif
1998 
1999 /* HID Device Role Included */
2000 #ifndef HID_DEV_INCLUDED
2001 #define HID_DEV_INCLUDED   FALSE
2002 #endif
2003 
2004 #ifndef HID_DEV_SUBCLASS
2005 #define HID_DEV_SUBCLASS   COD_MINOR_POINTING
2006 #endif
2007 
2008 #ifndef HID_CONTROL_BUF_SIZE
2009 #define HID_CONTROL_BUF_SIZE            BT_DEFAULT_BUFFER_SIZE
2010 #endif
2011 
2012 #ifndef HID_INTERRUPT_BUF_SIZE
2013 #define HID_INTERRUPT_BUF_SIZE          BT_DEFAULT_BUFFER_SIZE
2014 #endif
2015 
2016 #ifndef HID_DEV_MTU_SIZE
2017 #define HID_DEV_MTU_SIZE 64
2018 #endif
2019 
2020 #ifndef HID_DEV_FLUSH_TO
2021 #define HID_DEV_FLUSH_TO 0xffff
2022 #endif
2023 
2024 /*************************************************************************
2025 ** Definitions for Both HID-Host & Device
2026 */
2027 #ifndef HID_MAX_SVC_NAME_LEN
2028 #define HID_MAX_SVC_NAME_LEN  32
2029 #endif
2030 
2031 #ifndef HID_MAX_SVC_DESCR_LEN
2032 #define HID_MAX_SVC_DESCR_LEN 32
2033 #endif
2034 
2035 #ifndef HID_MAX_PROV_NAME_LEN
2036 #define HID_MAX_PROV_NAME_LEN 32
2037 #endif
2038 
2039 /*************************************************************************
2040 ** Definitions for HID-Host
2041 */
2042 #ifndef  HID_HOST_INCLUDED
2043 #define HID_HOST_INCLUDED           FALSE
2044 #endif
2045 
2046 #ifndef HID_HOST_MAX_DEVICES
2047 #define HID_HOST_MAX_DEVICES        7
2048 #endif
2049 
2050 #ifndef HID_HOST_MTU
2051 #define HID_HOST_MTU                640
2052 #endif
2053 
2054 #ifndef HID_HOST_FLUSH_TO
2055 #define HID_HOST_FLUSH_TO                 0xffff
2056 #endif
2057 
2058 #ifndef HID_HOST_MAX_CONN_RETRY
2059 #define HID_HOST_MAX_CONN_RETRY     (3)
2060 #endif
2061 
2062 #ifndef HID_HOST_REPAGE_WIN
2063 #define HID_HOST_REPAGE_WIN          (2)
2064 #endif
2065 
2066 /*************************************************************************
2067  * A2DP Definitions
2068  */
2069 #ifndef A2D_INCLUDED
2070 #define A2D_INCLUDED            FALSE
2071 #endif
2072 
2073 /******************************************************************************
2074 **
2075 ** AVCTP
2076 **
2077 ******************************************************************************/
2078 
2079 /* Number of simultaneous ACL links to different peer devices. */
2080 #ifndef AVCT_NUM_LINKS
2081 #define AVCT_NUM_LINKS              2
2082 #endif
2083 
2084 /* Number of simultaneous AVCTP connections. */
2085 #ifndef AVCT_NUM_CONN
2086 #define AVCT_NUM_CONN               3
2087 #endif
2088 
2089 /******************************************************************************
2090 **
2091 ** AVRCP
2092 **
2093 ******************************************************************************/
2094 #ifndef AVRC_INCLUDED
2095 #define AVRC_INCLUDED               FALSE
2096 #endif
2097 
2098 #ifndef AVRC_METADATA_INCLUDED
2099 #if AVRC_INCLUDED == TRUE
2100 #define AVRC_METADATA_INCLUDED      TRUE
2101 #else
2102 #define AVRC_METADATA_INCLUDED      FALSE
2103 #endif
2104 #endif
2105 
2106 #ifndef AVRC_ADV_CTRL_INCLUDED
2107 #if AVRC_INCLUDED == TRUE
2108 #define AVRC_ADV_CTRL_INCLUDED      TRUE
2109 #else
2110 #define AVRC_ADV_CTRL_INCLUDED      FALSE
2111 #endif
2112 #endif
2113 
2114 #ifndef AVRC_CTLR_INCLUDED
2115 #if AVRC_INCLUDED == TRUE
2116 #define AVRC_CTLR_INCLUDED          TRUE
2117 #else
2118 #define AVRC_CTLR_INCLUDED          FALSE
2119 #endif
2120 #endif
2121 
2122 /******************************************************************************
2123 **
2124 ** MCAP
2125 **
2126 ******************************************************************************/
2127 #ifndef MCA_INCLUDED
2128 #define MCA_INCLUDED                FALSE
2129 #endif
2130 
2131 /* The MTU size for the L2CAP configuration on control channel. 48 is the minimal */
2132 #ifndef MCA_CTRL_MTU
2133 #define MCA_CTRL_MTU    60
2134 #endif
2135 
2136 /* The maximum number of registered MCAP instances. */
2137 #ifndef MCA_NUM_REGS
2138 #define MCA_NUM_REGS    12
2139 #endif
2140 
2141 /* The maximum number of control channels (to difference devices) per registered MCAP instances. */
2142 #ifndef MCA_NUM_LINKS
2143 #define MCA_NUM_LINKS   3
2144 #endif
2145 
2146 /* The maximum number of MDEP (including HDP echo) per registered MCAP instances. */
2147 #ifndef MCA_NUM_DEPS
2148 #define MCA_NUM_DEPS    13
2149 #endif
2150 
2151 /* The maximum number of MDL link per control channel. */
2152 #ifndef MCA_NUM_MDLS
2153 #define MCA_NUM_MDLS    4
2154 #endif
2155 
2156 /* Buffer size to reassemble the SDU. */
2157 #ifndef MCA_USER_RX_BUF_SIZE
2158 #define MCA_USER_RX_BUF_SIZE    BT_DEFAULT_BUFFER_SIZE
2159 #endif
2160 
2161 /* Buffer size to hold the SDU. */
2162 #ifndef MCA_USER_TX_BUF_SIZE
2163 #define MCA_USER_TX_BUF_SIZE    BT_DEFAULT_BUFFER_SIZE
2164 #endif
2165 
2166 /*
2167  * Buffer size used to hold MPS segments during SDU reassembly
2168  */
2169 #ifndef MCA_FCR_RX_BUF_SIZE
2170 #define MCA_FCR_RX_BUF_SIZE     BT_DEFAULT_BUFFER_SIZE
2171 #endif
2172 
2173 /*
2174  * Default buffer size used to hold MPS segments used in (re)transmissions.
2175  * The size of each buffer must be able to hold the maximum MPS segment size
2176  * passed in tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) +
2177  * L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
2178  */
2179 #ifndef MCA_FCR_TX_BUF_SIZE
2180 #define MCA_FCR_TX_BUF_SIZE     BT_DEFAULT_BUFFER_SIZE
2181 #endif
2182 
2183 /* MCAP control channel FCR Option:
2184 Size of the transmission window when using enhanced retransmission mode.
2185 1 is defined by HDP specification for control channel.
2186 */
2187 #ifndef MCA_FCR_OPT_TX_WINDOW_SIZE
2188 #define MCA_FCR_OPT_TX_WINDOW_SIZE      1
2189 #endif
2190 
2191 /* MCAP control channel FCR Option:
2192 Number of transmission attempts for a single I-Frame before taking
2193 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
2194 Streaming modes.
2195 Range: 0, 1-0xFF
2196 0 - infinite retransmissions
2197 1 - single transmission
2198 */
2199 #ifndef MCA_FCR_OPT_MAX_TX_B4_DISCNT
2200 #define MCA_FCR_OPT_MAX_TX_B4_DISCNT    20
2201 #endif
2202 
2203 /* MCAP control channel FCR Option: Retransmission Timeout
2204 The AVRCP specification set a value in the range of 300 - 2000 ms
2205 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
2206 Range: Minimum 2000 (2 secs) when supporting PBF.
2207  */
2208 #ifndef MCA_FCR_OPT_RETX_TOUT
2209 #define MCA_FCR_OPT_RETX_TOUT           2000
2210 #endif
2211 
2212 /* MCAP control channel FCR Option: Monitor Timeout
2213 The AVRCP specification set a value in the range of 300 - 2000 ms
2214 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
2215 Range: Minimum 12000 (12 secs) when supporting PBF.
2216 */
2217 #ifndef MCA_FCR_OPT_MONITOR_TOUT
2218 #define MCA_FCR_OPT_MONITOR_TOUT        12000
2219 #endif
2220 
2221 /* MCAP control channel FCR Option: Maximum PDU payload size.
2222 The maximum number of payload octets that the local device can receive in a single PDU.
2223 */
2224 #ifndef MCA_FCR_OPT_MPS_SIZE
2225 #define MCA_FCR_OPT_MPS_SIZE            1000
2226 #endif
2227 
2228 /* Shared transport */
2229 #ifndef NFC_SHARED_TRANSPORT_ENABLED
2230 #define NFC_SHARED_TRANSPORT_ENABLED    FALSE
2231 #endif
2232 
2233 /******************************************************************************
2234 **
2235 ** Sleep Mode (Low Power Mode)
2236 **
2237 ******************************************************************************/
2238 
2239 #ifndef HCILP_INCLUDED
2240 #define HCILP_INCLUDED                  FALSE
2241 #endif
2242 
2243 /******************************************************************************
2244 **
2245 ** APPL - Application Task
2246 **
2247 ******************************************************************************/
2248 
2249 #define L2CAP_FEATURE_REQ_ID      73
2250 #define L2CAP_FEATURE_RSP_ID     173
2251 
2252 /******************************************************************************
2253 **
2254 ** BTA
2255 **
2256 ******************************************************************************/
2257 /* BTA EIR canned UUID list (default is dynamic) */
2258 #ifndef BTA_EIR_CANNED_UUID_LIST
2259 #define BTA_EIR_CANNED_UUID_LIST FALSE
2260 #endif
2261 
2262 /* Number of supported customer UUID in EIR */
2263 #ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID
2264 #define BTA_EIR_SERVER_NUM_CUSTOM_UUID     8
2265 #endif
2266 
2267 /* CHLD override for bluedroid */
2268 #ifndef BTA_AG_CHLD_VAL_ECC
2269 #define BTA_AG_CHLD_VAL_ECC  "(0,1,1x,2,2x,3)"
2270 #endif
2271 
2272 #ifndef BTA_AG_CHLD_VAL
2273 #define BTA_AG_CHLD_VAL  "(0,1,2,3)"
2274 #endif
2275 
2276 /* Set the CIND to match HFP 1.5 */
2277 #ifndef BTA_AG_CIND_INFO
2278 #define BTA_AG_CIND_INFO "(\"call\",(0,1)),(\"callsetup\",(0-3)),(\"service\",(0-1)),(\"signal\",(0-5)),(\"roam\",(0,1)),(\"battchg\",(0-5)),(\"callheld\",(0-2))"
2279 #endif
2280 
2281 #ifndef BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY
2282 #define BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY FALSE
2283 #endif
2284 
2285 #ifndef BTA_GATTC_MAX_CACHE_CHAR
2286 #define BTA_GATTC_MAX_CACHE_CHAR UC_BT_GATTC_MAX_CACHE_CHAR
2287 #endif
2288 
2289 /******************************************************************************
2290 **
2291 ** Tracing:  Include trace header file here.
2292 **
2293 ******************************************************************************/
2294 
2295 /* Enable/disable BTSnoop memory logging */
2296 #ifndef BTSNOOP_MEM
2297 #define BTSNOOP_MEM FALSE
2298 #endif
2299 
2300 #if UC_HEAP_ALLOCATION_FROM_SPIRAM_FIRST
2301 #define HEAP_ALLOCATION_FROM_SPIRAM_FIRST TRUE
2302 #else
2303 #define HEAP_ALLOCATION_FROM_SPIRAM_FIRST FALSE
2304 #endif
2305 
2306 // TODO: add menuconfig and api for periodic adv sync transfer
2307 #if (BLE_50_FEATURE_SUPPORT)
2308 #define BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER TRUE
2309 #else
2310 #define BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER FALSE
2311 #endif
2312 
2313 #include "common/bt_trace.h"
2314 
2315 #endif /* BT_TARGET_H */
2316