1 /******************************************************************************
2  *
3  *  Copyright (c) 2014 The Android Open Source Project
4  *  Copyright 1999-2016 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 #ifndef FALSE
24 #define FALSE false
25 #endif
26 
27 #ifndef TRUE
28 #define TRUE true
29 #endif
30 
31 //------------------Added from bdroid_buildcfg.h---------------------
32 #ifndef L2CAP_EXTFEA_SUPPORTED_MASK
33 #define L2CAP_EXTFEA_SUPPORTED_MASK                                            \
34   (L2CAP_EXTFEA_ENH_RETRANS | L2CAP_EXTFEA_STREAM_MODE | L2CAP_EXTFEA_NO_CRC | \
35    L2CAP_EXTFEA_FIXED_CHNLS)
36 #endif
37 
38 #ifndef BTUI_OPS_FORMATS
39 #define BTUI_OPS_FORMATS (BTA_OP_VCARD21_MASK | BTA_OP_ANY_MASK)
40 #endif
41 
42 #ifndef BTA_RFC_MTU_SIZE
43 #define BTA_RFC_MTU_SIZE \
44   (L2CAP_MTU_SIZE - L2CAP_MIN_OFFSET - RFCOMM_DATA_OVERHEAD)
45 #endif
46 
47 #ifndef BTA_PAN_INCLUDED
48 #define BTA_PAN_INCLUDED TRUE
49 #endif
50 
51 #ifndef BTA_HD_INCLUDED
52 #define BTA_HD_INCLUDED TRUE
53 #endif
54 
55 #ifndef BTA_HH_INCLUDED
56 #define BTA_HH_INCLUDED TRUE
57 #endif
58 
59 #ifndef BTA_HH_ROLE
60 #define BTA_HH_ROLE BTA_CENTRAL_ROLE_PREF
61 #endif
62 
63 #ifndef AVDT_VERSION
64 #define AVDT_VERSION 0x0103
65 #endif
66 
67 #ifndef BTA_AG_AT_MAX_LEN
68 #define BTA_AG_AT_MAX_LEN 512
69 #endif
70 
71 #ifndef BTA_AV_RET_TOUT
72 #define BTA_AV_RET_TOUT 15
73 #endif
74 
75 #ifndef BTA_DM_SDP_DB_SIZE
76 #define BTA_DM_SDP_DB_SIZE 20000
77 #endif
78 
79 #ifndef AG_VOICE_SETTINGS
80 #define AG_VOICE_SETTINGS HCI_DEFAULT_VOICE_SETTINGS
81 #endif
82 
83 // How long to wait before activating sniff mode after entering the
84 // idle state for server FT/RFCOMM, OPS connections
85 #ifndef BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS
86 #define BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS 7000
87 #endif
88 
89 // How long to wait before activating sniff mode after entering the
90 // idle state for client FT/RFCOMM connections
91 #ifndef BTA_FTC_IDLE_TO_SNIFF_DELAY_MS
92 #define BTA_FTC_IDLE_TO_SNIFF_DELAY_MS 5000
93 #endif
94 
95 //------------------End added from bdroid_buildcfg.h---------------------
96 
97 /******************************************************************************
98  *
99  * Buffer sizes
100  *
101  *****************************************************************************/
102 
103 #ifndef BT_DEFAULT_BUFFER_SIZE
104 #define BT_DEFAULT_BUFFER_SIZE (4096 + 16)
105 #endif
106 
107 #ifndef BT_SMALL_BUFFER_SIZE
108 #define BT_SMALL_BUFFER_SIZE 660
109 #endif
110 
111 /* Receives HCI events from the lower-layer. */
112 #ifndef HCI_CMD_BUF_SIZE
113 #define HCI_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
114 #endif
115 
116 /* Sends SDP data packets. */
117 #ifndef SDP_DATA_BUF_SIZE
118 #define SDP_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
119 #endif
120 
121 /* Sends RFCOMM command packets. */
122 #ifndef RFCOMM_CMD_BUF_SIZE
123 #define RFCOMM_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
124 #endif
125 
126 /* Sends RFCOMM data packets. */
127 #ifndef RFCOMM_DATA_BUF_SIZE
128 #define RFCOMM_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
129 #endif
130 
131 /* Sends L2CAP packets to the peer and HCI messages to the controller. */
132 #ifndef L2CAP_CMD_BUF_SIZE
133 #define L2CAP_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
134 #endif
135 
136 /* Number of ACL buffers to assign to LE */
137 /*
138  * TODO: Do we need this?
139  * It was used when the HCI buffers were shared with BR/EDR.
140  */
141 #ifndef L2C_DEF_NUM_BLE_BUF_SHARED
142 #define L2C_DEF_NUM_BLE_BUF_SHARED 1
143 #endif
144 
145 /* Used by BTM when it sends HCI commands to the controller. */
146 #ifndef BTM_CMD_BUF_SIZE
147 #define BTM_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
148 #endif
149 
150 /* BNEP data and protocol messages. */
151 #ifndef BNEP_BUF_SIZE
152 #define BNEP_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
153 #endif
154 
155 /* AVDTP buffer size for protocol messages */
156 #ifndef AVDT_CMD_BUF_SIZE
157 #define AVDT_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
158 #endif
159 
160 #ifndef PAN_BUF_SIZE
161 #define PAN_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
162 #endif
163 
164 /* Maximum number of buffers to allocate for PAN */
165 #ifndef PAN_BUF_MAX
166 #define PAN_BUF_MAX 100
167 #endif
168 
169 /* AVCTP buffer size for protocol messages */
170 #ifndef AVCT_CMD_BUF_SIZE
171 #define AVCT_CMD_BUF_SIZE 288
172 #endif
173 
174 /* AVRCP buffer size for protocol messages */
175 #ifndef AVRC_CMD_BUF_SIZE
176 #define AVRC_CMD_BUF_SIZE 288
177 #endif
178 
179 /* AVRCP Metadata buffer size for protocol messages */
180 #ifndef AVRC_META_CMD_BUF_SIZE
181 #define AVRC_META_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
182 #endif
183 
184 /* GATT Data sending buffer size */
185 #ifndef GATT_DATA_BUF_SIZE
186 #define GATT_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
187 #endif
188 
189 /******************************************************************************
190  *
191  * BTM
192  *
193  *****************************************************************************/
194 
195 /**************************
196  * Initial SCO TX credit
197  ************************/
198 /* The size of buffer used for TX SCO data packets. The size should be divisible
199  * by BTM_MSBC_CODE_SIZE(240) and BTM_LC3_CODE_SIZE(480). */
200 #ifndef BTM_SCO_DATA_SIZE_MAX
201 #define BTM_SCO_DATA_SIZE_MAX 480
202 #endif
203 
204 /* The size in bytes of the BTM inquiry database. */
205 #ifndef BTM_INQ_DB_SIZE
206 #define BTM_INQ_DB_SIZE 80
207 #endif
208 
209 /* Sets the Page_Scan_Window:  the length of time that the device is performing
210  * a page scan. */
211 #ifndef BTM_DEFAULT_CONN_WINDOW
212 #define BTM_DEFAULT_CONN_WINDOW 0x0012
213 #endif
214 
215 /* Sets the Page_Scan_Activity:  the interval between the start of two
216  * consecutive page scans. */
217 #ifndef BTM_DEFAULT_CONN_INTERVAL
218 #define BTM_DEFAULT_CONN_INTERVAL 0x0400
219 #endif
220 
221 /* When automatic inquiry scan is enabled, this sets the inquiry scan window. */
222 #ifndef BTM_DEFAULT_DISC_WINDOW
223 #define BTM_DEFAULT_DISC_WINDOW 0x0012
224 #endif
225 
226 /* When automatic inquiry scan is enabled, this sets the inquiry scan interval.
227  */
228 #ifndef BTM_DEFAULT_DISC_INTERVAL
229 #define BTM_DEFAULT_DISC_INTERVAL 0x0800
230 #endif
231 
232 /* The number of SCO links. */
233 #ifndef BTM_MAX_SCO_LINKS
234 #define BTM_MAX_SCO_LINKS 6
235 #endif
236 
237 /* The number of security records for peer devices. */
238 #ifndef BTM_SEC_MAX_DEVICE_RECORDS
239 #define BTM_SEC_MAX_DEVICE_RECORDS 100
240 #endif
241 
242 /* The number of security records for services. */
243 #ifndef BTM_SEC_MAX_SERVICE_RECORDS
244 #define BTM_SEC_MAX_SERVICE_RECORDS 32
245 #endif
246 
247 /* Maximum length of the service name. */
248 #ifndef BT_MAX_SERVICE_NAME_LEN
249 #define BT_MAX_SERVICE_NAME_LEN 21
250 #endif
251 
252 /* The maximum number of clients that can register with the power manager. */
253 #ifndef BTM_MAX_PM_RECORDS
254 #define BTM_MAX_PM_RECORDS 2
255 #endif
256 
257 /* If the user does not respond to security process requests within this many
258  * seconds, a negative response would be sent automatically.
259  * 30 is LMP response timeout value */
260 #ifndef BTM_SEC_TIMEOUT_VALUE
261 #define BTM_SEC_TIMEOUT_VALUE 35
262 #endif
263 
264 /******************************************************************************
265  *
266  * L2CAP
267  *
268  *****************************************************************************/
269 
270 /* The maximum number of simultaneous links that L2CAP can support. */
271 #ifndef MAX_L2CAP_LINKS
272 #define MAX_L2CAP_LINKS 16
273 #endif
274 
275 /* The maximum number of simultaneous channels that L2CAP can support. */
276 #ifndef MAX_L2CAP_CHANNELS
277 #define MAX_L2CAP_CHANNELS 64
278 #endif
279 
280 /* The maximum number of simultaneous applications that can register with L2CAP.
281  */
282 #ifndef MAX_L2CAP_CLIENTS
283 #define MAX_L2CAP_CLIENTS 15
284 #endif
285 
286 /* The number of seconds of link inactivity before a link is disconnected. */
287 #ifndef L2CAP_LINK_INACTIVITY_TOUT
288 #define L2CAP_LINK_INACTIVITY_TOUT 4
289 #endif
290 
291 /* The number of seconds of link inactivity after bonding before a link is
292  * disconnected. */
293 #ifndef L2CAP_BONDING_TIMEOUT
294 #define L2CAP_BONDING_TIMEOUT 3
295 #endif
296 
297 /* The time from the HCI connection complete to disconnect if no channel is
298  * established. */
299 #ifndef L2CAP_LINK_STARTUP_TOUT
300 #define L2CAP_LINK_STARTUP_TOUT 60
301 #endif
302 
303 /* The L2CAP MTU; must be in accord with the HCI ACL buffer size. */
304 #ifndef L2CAP_MTU_SIZE
305 #define L2CAP_MTU_SIZE 1691
306 #endif
307 
308 /* Minimum number of ACL credit for high priority link */
309 #ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
310 #define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 5
311 #endif
312 
313 /* Used for features using fixed channels; set to zero if no fixed channels
314  * supported (BLE, etc.) */
315 /* Excluding L2CAP signaling channel and UCD */
316 #ifndef L2CAP_NUM_FIXED_CHNLS
317 #define L2CAP_NUM_FIXED_CHNLS 32
318 #endif
319 
320 /* First fixed channel supported */
321 #ifndef L2CAP_FIRST_FIXED_CHNL
322 #define L2CAP_FIRST_FIXED_CHNL 4
323 #endif
324 
325 #ifndef L2CAP_LAST_FIXED_CHNL
326 #define L2CAP_LAST_FIXED_CHNL \
327   (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
328 #endif
329 
330 /* Used for conformance testing ONLY:  When TRUE lets scriptwrapper overwrite
331  * info response */
332 #ifndef L2CAP_CONFORMANCE_TESTING
333 #define L2CAP_CONFORMANCE_TESTING FALSE
334 #endif
335 
336 /*
337  * Max bytes per connection to buffer locally before dropping the
338  * connection if local client does not receive it  - default is 1MB
339  */
340 #ifndef L2CAP_MAX_RX_BUFFER
341 #define L2CAP_MAX_RX_BUFFER 0x100000
342 #endif
343 
344 /******************************************************************************
345  *
346  * BLE
347  *
348  *****************************************************************************/
349 
350 /* The maximum number of simultaneous applications that can register with LE
351  * L2CAP. */
352 #ifndef BLE_MAX_L2CAP_CLIENTS
353 #define BLE_MAX_L2CAP_CLIENTS 15
354 #endif
355 
356 /******************************************************************************
357  *
358  * ATT/GATT Protocol/Profile Settings
359  *
360  *****************************************************************************/
361 #ifndef GATT_MAX_SR_PROFILES
362 #define GATT_MAX_SR_PROFILES 32 /* max is 32 */
363 #endif
364 
365 #ifndef GATT_MAX_APPS
366 #define GATT_MAX_APPS 32 /* note: 2 apps used internally GATT and GAP */
367 #endif
368 
369 /* connection manager doesn't generate it's own IDs. Instead, all GATT clients
370  * use their gatt_if to identify against conection manager. When stack tries to
371  * create l2cap connection, it will use this fixed ID. */
372 #define CONN_MGR_ID_L2CAP (GATT_MAX_APPS + 10)
373 
374 /* This value is used for static allocation of resources. The actual maximum at
375  * runtime is controlled by a system property. */
376 #ifndef GATT_MAX_PHY_CHANNEL
377 #define GATT_MAX_PHY_CHANNEL 16
378 #endif
379 
380 /* Devices must support at least 8 GATT channels per the CDD. */
381 #ifndef GATT_MAX_PHY_CHANNEL_FLOOR
382 #define GATT_MAX_PHY_CHANNEL_FLOOR 8
383 #endif
384 
385 /* Used for conformance testing ONLY */
386 #ifndef GATT_CONFORMANCE_TESTING
387 #define GATT_CONFORMANCE_TESTING FALSE
388 #endif
389 
390 /* Used only for GATT Multiple Variable Length Notifications PTS tests */
391 #ifndef GATT_UPPER_TESTER_MULT_VARIABLE_LENGTH_NOTIF
392 #define GATT_UPPER_TESTER_MULT_VARIABLE_LENGTH_NOTIF FALSE
393 #endif
394 
395 /* Used only for GATT Multiple Variable Length READ PTS tests */
396 #ifndef GATT_UPPER_TESTER_MULT_VARIABLE_LENGTH_READ
397 #define GATT_UPPER_TESTER_MULT_VARIABLE_LENGTH_READ FALSE
398 #endif
399 
400 /******************************************************************************
401  *
402  * CSIP
403  *
404  *****************************************************************************/
405 
406 /* Used to trigger invalid behaviour of CSIP test case PTS */
407 #ifndef CSIP_UPPER_TESTER_FORCE_TO_SEND_LOCK
408 #define CSIP_UPPER_TESTER_FORCE_TO_SEND_LOCK FALSE
409 #endif
410 
411 /******************************************************************************
412  *
413  * SMP
414  *
415  *****************************************************************************/
416 #ifndef SMP_DEFAULT_AUTH_REQ
417 #define SMP_DEFAULT_AUTH_REQ SMP_AUTH_NB_ENC_ONLY
418 #endif
419 
420 #ifndef SMP_MAX_ENC_KEY_SIZE
421 #define SMP_MAX_ENC_KEY_SIZE 16
422 #endif
423 
424 /* minimum link timeout after SMP pairing is done, leave room for key exchange
425    and racing condition for the following service connection.
426    Prefer greater than 0 second, and no less than default inactivity link idle
427    timer(L2CAP_LINK_INACTIVITY_TOUT) in l2cap) */
428 #ifndef SMP_LINK_TOUT_MIN
429 #define SMP_LINK_TOUT_MIN L2CAP_LINK_INACTIVITY_TOUT
430 #endif
431 /******************************************************************************
432  *
433  * SDP
434  *
435  *****************************************************************************/
436 
437 /* The maximum number of SDP records the server can support. */
438 #ifndef SDP_MAX_RECORDS
439 #define SDP_MAX_RECORDS 30
440 #endif
441 
442 /* The maximum number of attributes in each record. */
443 #ifndef SDP_MAX_REC_ATTR
444 #define SDP_MAX_REC_ATTR 25
445 #endif
446 
447 #ifndef SDP_MAX_PAD_LEN
448 #define SDP_MAX_PAD_LEN 600
449 #endif
450 
451 /* The maximum length, in bytes, of an attribute. */
452 #ifndef SDP_MAX_ATTR_LEN
453 #define SDP_MAX_ATTR_LEN 400
454 #endif
455 
456 /* The maximum number of attribute filters supported by SDP databases. */
457 #ifndef SDP_MAX_ATTR_FILTERS
458 #define SDP_MAX_ATTR_FILTERS 15
459 #endif
460 
461 /* The maximum number of UUID filters supported by SDP databases. */
462 #ifndef SDP_MAX_UUID_FILTERS
463 #define SDP_MAX_UUID_FILTERS 3
464 #endif
465 
466 /* The maximum number of record handles retrieved in a search. */
467 #ifndef SDP_MAX_DISC_SERVER_RECS
468 #define SDP_MAX_DISC_SERVER_RECS 21
469 #endif
470 
471 /* The size of a scratchpad buffer, in bytes, for storing the response to an
472  * attribute request. */
473 #ifndef SDP_MAX_LIST_BYTE_COUNT
474 #define SDP_MAX_LIST_BYTE_COUNT 4096
475 #endif
476 
477 /* The maximum number of parameters in an SDP protocol element. */
478 #ifndef SDP_MAX_PROTOCOL_PARAMS
479 #define SDP_MAX_PROTOCOL_PARAMS 2
480 #endif
481 
482 /* The maximum number of simultaneous client and server connections. */
483 #ifndef SDP_MAX_CONNECTIONS
484 #define SDP_MAX_CONNECTIONS 4
485 #endif
486 
487 /* The MTU size for the L2CAP configuration. */
488 #ifndef SDP_MTU_SIZE
489 #define SDP_MTU_SIZE 1024
490 #endif
491 
492 /******************************************************************************
493  *
494  * RFCOMM
495  *
496  *****************************************************************************/
497 
498 /* The maximum number of ports supported. */
499 #ifndef MAX_RFC_PORTS
500 #define MAX_RFC_PORTS 30
501 #endif
502 
503 /* The maximum simultaneous links to different devices. */
504 #ifndef MAX_BD_CONNECTIONS
505 #define MAX_BD_CONNECTIONS 16
506 #endif
507 
508 /* The port receive queue low watermark level, in bytes. */
509 #ifndef PORT_RX_LOW_WM
510 #define PORT_RX_LOW_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM)
511 #endif
512 
513 /* The port receive queue high watermark level, in bytes. */
514 #ifndef PORT_RX_HIGH_WM
515 #define PORT_RX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM)
516 #endif
517 
518 /* The port receive queue critical watermark level, in bytes. */
519 #ifndef PORT_RX_CRITICAL_WM
520 #define PORT_RX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM)
521 #endif
522 
523 /* The port receive queue low watermark level, in number of buffers. */
524 #ifndef PORT_RX_BUF_LOW_WM
525 #define PORT_RX_BUF_LOW_WM 4
526 #endif
527 
528 /* The port receive queue high watermark level, in number of buffers. */
529 #ifndef PORT_RX_BUF_HIGH_WM
530 #define PORT_RX_BUF_HIGH_WM 10
531 #endif
532 
533 /* The port receive queue critical watermark level, in number of buffers. */
534 #ifndef PORT_RX_BUF_CRITICAL_WM
535 #define PORT_RX_BUF_CRITICAL_WM 15
536 #endif
537 
538 /* The port transmit queue high watermark level, in bytes. */
539 #ifndef PORT_TX_HIGH_WM
540 #define PORT_TX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM)
541 #endif
542 
543 /* The port transmit queue critical watermark level, in bytes. */
544 #ifndef PORT_TX_CRITICAL_WM
545 #define PORT_TX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM)
546 #endif
547 
548 /* The port transmit queue high watermark level, in number of buffers. */
549 #ifndef PORT_TX_BUF_HIGH_WM
550 #define PORT_TX_BUF_HIGH_WM 10
551 #endif
552 
553 /* The port transmit queue high watermark level, in number of buffers. */
554 #ifndef PORT_TX_BUF_CRITICAL_WM
555 #define PORT_TX_BUF_CRITICAL_WM 15
556 #endif
557 
558 /******************************************************************************
559  *
560  * BNEP
561  *
562  *****************************************************************************/
563 
564 #ifndef BNEP_INCLUDED
565 #define BNEP_INCLUDED TRUE
566 #endif
567 
568 /* Maximum number of protocol filters supported. */
569 #ifndef BNEP_MAX_PROT_FILTERS
570 #define BNEP_MAX_PROT_FILTERS 5
571 #endif
572 
573 /* Maximum number of multicast filters supported. */
574 #ifndef BNEP_MAX_MULTI_FILTERS
575 #define BNEP_MAX_MULTI_FILTERS 5
576 #endif
577 
578 /* Preferred MTU size. */
579 #ifndef BNEP_MTU_SIZE
580 #define BNEP_MTU_SIZE L2CAP_MTU_SIZE
581 #endif
582 
583 /* Maximum number of buffers allowed in transmit data queue. */
584 #ifndef BNEP_MAX_XMITQ_DEPTH
585 #define BNEP_MAX_XMITQ_DEPTH 20
586 #endif
587 
588 /* Maximum number BNEP of connections supported. */
589 #ifndef BNEP_MAX_CONNECTIONS
590 #define BNEP_MAX_CONNECTIONS 7
591 #endif
592 
593 /******************************************************************************
594  *
595  * AVDTP
596  *
597  *****************************************************************************/
598 
599 /* Number of simultaneous links to different peer devices. */
600 #ifndef AVDT_NUM_LINKS
601 #define AVDT_NUM_LINKS 6
602 #endif
603 
604 /* Number of simultaneous stream endpoints. */
605 #ifndef AVDT_NUM_SEPS
606 #define AVDT_NUM_SEPS 12
607 #endif
608 
609 /* Number of transport channels setup by AVDT for all media streams */
610 #ifndef AVDT_NUM_TC_TBL
611 #define AVDT_NUM_TC_TBL (AVDT_NUM_SEPS + AVDT_NUM_LINKS)
612 #endif
613 
614 /* Maximum size in bytes of the content protection information element. */
615 #ifndef AVDT_PROTECT_SIZE
616 #define AVDT_PROTECT_SIZE 90
617 #endif
618 
619 /* Default sink delay value in ms. */
620 #ifndef AVDT_SINK_DELAY_MS
621 #define AVDT_SINK_DELAY_MS 300
622 #endif
623 
624 /******************************************************************************
625  *
626  * PAN
627  *
628  *****************************************************************************/
629 
630 #ifndef PAN_INCLUDED
631 #define PAN_INCLUDED TRUE
632 #endif
633 
634 /* This will enable the PANU role */
635 #ifndef PAN_SUPPORTS_ROLE_PANU
636 #define PAN_SUPPORTS_ROLE_PANU TRUE
637 #endif
638 
639 /* This will enable the NAP role */
640 #ifndef PAN_SUPPORTS_ROLE_NAP
641 #define PAN_SUPPORTS_ROLE_NAP TRUE
642 #endif
643 
644 /* This is just for debugging purposes */
645 #ifndef PAN_SUPPORTS_DEBUG_DUMP
646 #define PAN_SUPPORTS_DEBUG_DUMP TRUE
647 #endif
648 
649 /* Maximum number of PAN connections allowed */
650 #ifndef MAX_PAN_CONNS
651 #define MAX_PAN_CONNS 7
652 #endif
653 
654 /* Default service name for NAP role */
655 #ifndef PAN_NAP_DEFAULT_SERVICE_NAME
656 #define PAN_NAP_DEFAULT_SERVICE_NAME "Network Access Point Service"
657 #endif
658 
659 /* Default service name for PANU role */
660 #ifndef PAN_PANU_DEFAULT_SERVICE_NAME
661 #define PAN_PANU_DEFAULT_SERVICE_NAME "PAN User Service"
662 #endif
663 
664 /* Default description for NAP role service */
665 #ifndef PAN_NAP_DEFAULT_DESCRIPTION
666 #define PAN_NAP_DEFAULT_DESCRIPTION "NAP"
667 #endif
668 
669 /* Default description for PANU role service */
670 #ifndef PAN_PANU_DEFAULT_DESCRIPTION
671 #define PAN_PANU_DEFAULT_DESCRIPTION "PANU"
672 #endif
673 
674 /******************************************************************************
675  *
676  * GAP
677  *
678  *****************************************************************************/
679 
680 /* The maximum number of simultaneous GAP L2CAP connections. */
681 #ifndef GAP_MAX_CONNECTIONS
682 #define GAP_MAX_CONNECTIONS 30
683 #endif
684 
685 /******************************************************************************
686  *
687  * HID
688  *
689  *****************************************************************************/
690 
691 /* HID Device Role Included */
692 #ifndef HID_DEV_INCLUDED
693 #define HID_DEV_INCLUDED TRUE
694 #endif
695 
696 #ifndef HID_CONTROL_BUF_SIZE
697 #define HID_CONTROL_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
698 #endif
699 
700 #ifndef HID_INTERRUPT_BUF_SIZE
701 #define HID_INTERRUPT_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
702 #endif
703 
704 #ifndef HID_DEV_MTU_SIZE
705 #define HID_DEV_MTU_SIZE 512
706 #endif
707 
708 /*************************************************************************
709  * Definitions for Both HID-Host & Device
710 */
711 #ifndef HID_MAX_SVC_NAME_LEN
712 #define HID_MAX_SVC_NAME_LEN 32
713 #endif
714 
715 #ifndef HID_MAX_SVC_DESCR_LEN
716 #define HID_MAX_SVC_DESCR_LEN 32
717 #endif
718 
719 #ifndef HID_MAX_PROV_NAME_LEN
720 #define HID_MAX_PROV_NAME_LEN 32
721 #endif
722 
723 /*************************************************************************
724  * Definitions for HID-Host
725 */
726 #ifndef HID_HOST_INCLUDED
727 #define HID_HOST_INCLUDED TRUE
728 #endif
729 
730 #ifndef HID_HOST_MAX_DEVICES
731 #define HID_HOST_MAX_DEVICES 7
732 #endif
733 
734 #ifndef HID_HOST_MTU
735 #define HID_HOST_MTU 640
736 #endif
737 
738 #ifndef HID_HOST_MAX_CONN_RETRY
739 #define HID_HOST_MAX_CONN_RETRY 1
740 #endif
741 
742 #ifndef HID_HOST_REPAGE_WIN
743 #define HID_HOST_REPAGE_WIN 2
744 #endif
745 
746 /******************************************************************************
747  *
748  * AVCTP
749  *
750  *****************************************************************************/
751 
752 /* Number of simultaneous ACL links to different peer devices. */
753 #ifndef AVCT_NUM_LINKS
754 #define AVCT_NUM_LINKS 6
755 #endif
756 
757 /* Number of simultaneous AVCTP connections. */
758 #ifndef AVCT_NUM_CONN
759 #define AVCT_NUM_CONN 14  // 2 * MaxDevices + 2
760 #endif
761 
762 /******************************************************************************
763  *
764  * BTA
765  *
766  *****************************************************************************/
767 /* Number of supported customer UUID in EIR */
768 #ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID
769 #define BTA_EIR_SERVER_NUM_CUSTOM_UUID 8
770 #endif
771 
772 /******************************************************************************
773  *
774  * Tracing:  Include trace header file here.
775  *
776  *****************************************************************************/
777 
778 #endif /* BT_TARGET_H */
779