1 /****************************************************************************** 2 * 3 * Copyright (C) 1999-2012 Broadcom Corporation 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ******************************************************************************/ 18 19 #ifndef NFC_TARGET_H 20 #define NFC_TARGET_H 21 22 #include "data_types.h" 23 24 #ifdef BUILDCFG 25 #include "buildcfg.h" 26 #endif 27 28 /* Include common GKI definitions used by this platform */ 29 #include "gki_target.h" 30 31 #include "bt_types.h" /* This must be defined AFTER buildcfg.h */ 32 #ifndef LMP_TEST 33 #include "bt_trace.h" 34 #endif 35 36 #ifndef USERIAL_DEBUG 37 #define USERIAL_DEBUG FALSE 38 #endif 39 40 /****************************************************************************** 41 ** 42 ** GKI Mail Box and Timer 43 ** 44 ******************************************************************************/ 45 46 /* Mailbox event mask for NFC stack */ 47 #ifndef NFC_MBOX_EVT_MASK 48 #define NFC_MBOX_EVT_MASK (TASK_MBOX_0_EVT_MASK) 49 #endif 50 51 /* Mailbox ID for NFC stack */ 52 #ifndef NFC_MBOX_ID 53 #define NFC_MBOX_ID (TASK_MBOX_0) 54 #endif 55 56 /* Mailbox event mask for NFA */ 57 #ifndef NFA_MBOX_EVT_MASK 58 #define NFA_MBOX_EVT_MASK (TASK_MBOX_2_EVT_MASK) 59 #endif 60 61 /* Mailbox ID for NFA */ 62 #ifndef NFA_MBOX_ID 63 #define NFA_MBOX_ID (TASK_MBOX_2) 64 #endif 65 66 /* GKI timer id used for protocol timer in NFC stack */ 67 #ifndef NFC_TIMER_ID 68 #define NFC_TIMER_ID (TIMER_0) 69 #endif 70 71 /* GKI timer event mask used for protocol timer in NFC stack */ 72 #ifndef NFC_TIMER_EVT_MASK 73 #define NFC_TIMER_EVT_MASK (TIMER_0_EVT_MASK) 74 #endif 75 76 /* GKI timer id used for quick timer in NFC stack */ 77 #ifndef NFC_QUICK_TIMER_ID 78 #define NFC_QUICK_TIMER_ID (TIMER_1) 79 #endif 80 81 /* GKI timer event mask used for quick timer in NFC stack */ 82 #ifndef NFC_QUICK_TIMER_EVT_MASK 83 #define NFC_QUICK_TIMER_EVT_MASK (TIMER_1_EVT_MASK) 84 #endif 85 86 /* GKI timer id used for protocol timer in NFA */ 87 #ifndef NFA_TIMER_ID 88 #define NFA_TIMER_ID (TIMER_2) 89 #endif 90 91 /* GKI timer event mask used for protocol timer in NFA */ 92 #ifndef NFA_TIMER_EVT_MASK 93 #define NFA_TIMER_EVT_MASK (TIMER_2_EVT_MASK) 94 #endif 95 96 /****************************************************************************** 97 ** 98 ** GKI Buffer Pools 99 ** 100 ******************************************************************************/ 101 102 /* NCI command/notification/data */ 103 #ifndef NFC_NCI_POOL_ID 104 #define NFC_NCI_POOL_ID GKI_POOL_ID_2 105 #endif 106 107 #ifndef NFC_NCI_POOL_BUF_SIZE 108 #define NFC_NCI_POOL_BUF_SIZE GKI_BUF2_SIZE 109 #endif 110 111 /* Reader/Write commands (NCI data payload) */ 112 #ifndef NFC_RW_POOL_ID 113 #define NFC_RW_POOL_ID GKI_POOL_ID_2 114 #endif 115 116 #ifndef NFC_RW_POOL_BUF_SIZE 117 #define NFC_RW_POOL_BUF_SIZE GKI_BUF2_SIZE 118 #endif 119 120 /* Card Emulation responses (NCI data payload) */ 121 #ifndef NFC_CE_POOL_ID 122 #define NFC_CE_POOL_ID GKI_POOL_ID_2 123 #endif 124 125 #ifndef NFC_CE_POOL_BUF_SIZE 126 #define NFC_CE_POOL_BUF_SIZE GKI_BUF2_SIZE 127 #endif 128 129 /* NCI msg pool for HAL (for shared NFC/HAL GKI)*/ 130 #ifndef NFC_HAL_NCI_POOL_ID 131 #define NFC_HAL_NCI_POOL_ID NFC_NCI_POOL_ID 132 #endif 133 134 #ifndef NFC_HAL_NCI_POOL_BUF_SIZE 135 #define NFC_HAL_NCI_POOL_BUF_SIZE NFC_NCI_POOL_BUF_SIZE 136 #endif 137 138 /****************************************************************************** 139 ** 140 ** NCI Transport definitions 141 ** 142 ******************************************************************************/ 143 /* offset of the first NCI packet in buffer for outgoing */ 144 #ifndef NCI_MSG_OFFSET_SIZE 145 #define NCI_MSG_OFFSET_SIZE 1 146 #endif 147 148 /* Restore NFCC baud rate to default on shutdown if NFC_UpdateBaudRate was 149 * called */ 150 #ifndef NFC_RESTORE_BAUD_ON_SHUTDOWN 151 #define NFC_RESTORE_BAUD_ON_SHUTDOWN TRUE 152 #endif 153 154 /****************************************************************************** 155 ** 156 ** NCI 157 ** 158 ******************************************************************************/ 159 #define NCI_VERSION_UNKNOWN 0x00 160 #define NCI_VERSION_1_0 0x10 161 #define NCI_VERSION_1_1 0x11 162 #define NCI_VERSION_2_0 0x20 163 #ifndef NCI_VERSION 164 #define NCI_VERSION NCI_VERSION_2_0 165 #endif 166 #define NCI_CORE_RESET_RSP_LEN(X) (((X) == NCI_VERSION_2_0) ? (0x01) : (0x03)) 167 #define NCI_VERSION_0_F 0x0F 168 169 /* TRUE I2C patch is needed */ 170 #ifndef NFC_I2C_PATCH_INCLUDED 171 #define NFC_I2C_PATCH_INCLUDED TRUE /* NFC-Android uses this!!! */ 172 #endif 173 174 /****************************************************************************** 175 ** 176 ** NFC 177 ** 178 ******************************************************************************/ 179 180 /* Define to TRUE to include Broadcom Vendor Specific implementation */ 181 #ifndef NFC_BRCM_VS_INCLUDED 182 #define NFC_BRCM_VS_INCLUDED TRUE 183 #endif 184 185 /* Define to TRUE if compling for NFC Reader/Writer Only mode */ 186 #ifndef NFC_RW_ONLY 187 #define NFC_RW_ONLY FALSE 188 #endif 189 190 /* Timeout for receiving response to NCI command */ 191 #ifndef NFC_CMD_CMPL_TIMEOUT 192 #define NFC_CMD_CMPL_TIMEOUT 2 193 #endif 194 195 /* Timeout for waiting on data credit/NFC-DEP */ 196 #ifndef NFC_DEACTIVATE_TIMEOUT 197 #define NFC_DEACTIVATE_TIMEOUT 2 198 #endif 199 200 /* the maximum number of Vendor Specific callback functions allowed to be 201 * registered. 1-14 */ 202 #ifndef NFC_NUM_VS_CBACKS 203 #define NFC_NUM_VS_CBACKS 3 204 #endif 205 206 /* the maximum number of NCI connections allowed. 1-14 */ 207 #ifndef NCI_MAX_CONN_CBS 208 #define NCI_MAX_CONN_CBS 4 209 #endif 210 211 /* Maximum number of NCI commands that the NFCC accepts without needing to wait 212 * for response */ 213 #ifndef NCI_MAX_CMD_WINDOW 214 #define NCI_MAX_CMD_WINDOW 1 215 #endif 216 217 /* Define to TRUE to include the NFCEE related functionalities */ 218 #ifndef NFC_NFCEE_INCLUDED 219 #define NFC_NFCEE_INCLUDED TRUE 220 #endif 221 222 /* the maximum number of NFCEE interface supported */ 223 #ifndef NFC_MAX_EE_INTERFACE 224 #define NFC_MAX_EE_INTERFACE 3 225 #endif 226 227 /* the maximum number of NFCEE information supported. */ 228 #ifndef NFC_MAX_EE_INFO 229 #define NFC_MAX_EE_INFO 8 230 #endif 231 232 /* the maximum number of NFCEE TLVs supported */ 233 #ifndef NFC_MAX_EE_TLVS 234 #define NFC_MAX_EE_TLVS 1 235 #endif 236 237 /* the maximum size of NFCEE TLV list supported */ 238 #ifndef NFC_MAX_EE_TLV_SIZE 239 #define NFC_MAX_EE_TLV_SIZE 150 240 #endif 241 242 /* Maximum time to discover NFCEE */ 243 #ifndef NFA_EE_DISCV_TIMEOUT_VAL 244 #define NFA_EE_DISCV_TIMEOUT_VAL 2000 245 #endif 246 247 /* Number of times reader/writer should attempt to resend a command on failure 248 */ 249 #ifndef RW_MAX_RETRIES 250 #define RW_MAX_RETRIES 5 251 #endif 252 253 /* RW NDEF Support */ 254 #ifndef RW_NDEF_INCLUDED 255 #define RW_NDEF_INCLUDED TRUE 256 #endif 257 258 /* RW Type 1 Tag timeout for each API call, in ms */ 259 #ifndef RW_T1T_TOUT_RESP 260 #define RW_T1T_TOUT_RESP 100 261 #endif 262 263 /* CE Type 2 Tag timeout for controller command, in ms */ 264 #ifndef CE_T2T_TOUT_RESP 265 #define CE_T2T_TOUT_RESP 1000 266 #endif 267 268 /* RW Type 2 Tag timeout for each API call, in ms */ 269 #ifndef RW_T2T_TOUT_RESP 270 /* Android requires 150 instead of 100 for presence-check*/ 271 #define RW_T2T_TOUT_RESP 150 272 #endif 273 274 /* RW Type 2 Tag timeout for each API call, in ms */ 275 #ifndef RW_T2T_SEC_SEL_TOUT_RESP 276 #define RW_T2T_SEC_SEL_TOUT_RESP 10 277 #endif 278 279 /* RW Type 3 Tag timeout for each API call, in ms */ 280 #ifndef RW_T3T_TOUT_RESP 281 /* NFC-Android will use 100 instead of 75 for T3t presence-check */ 282 #define RW_T3T_TOUT_RESP 100 283 #endif 284 285 /* CE Type 3 Tag maximum response timeout index (for check and update, used in 286 * SENSF_RES) */ 287 #ifndef CE_T3T_MRTI_C 288 #define CE_T3T_MRTI_C 0xFF 289 #endif 290 #ifndef CE_T3T_MRTI_U 291 #define CE_T3T_MRTI_U 0xFF 292 #endif 293 294 /* Default maxblocks for CE_T3T UPDATE/CHECK operations */ 295 #ifndef CE_T3T_DEFAULT_UPDATE_MAXBLOCKS 296 #define CE_T3T_DEFAULT_UPDATE_MAXBLOCKS 3 297 #endif 298 299 #ifndef CE_T3T_DEFAULT_CHECK_MAXBLOCKS 300 #define CE_T3T_DEFAULT_CHECK_MAXBLOCKS 3 301 #endif 302 303 /* CE Type 4 Tag, Frame Waiting time Integer */ 304 #ifndef CE_T4T_ISO_DEP_FWI 305 #define CE_T4T_ISO_DEP_FWI 7 306 #endif 307 308 /* RW Type 4 Tag timeout for each API call, in ms */ 309 #ifndef RW_T4T_TOUT_RESP 310 #define RW_T4T_TOUT_RESP 1000 311 #endif 312 313 /* CE Type 4 Tag timeout for update file, in ms */ 314 #ifndef CE_T4T_TOUT_UPDATE 315 #define CE_T4T_TOUT_UPDATE 1000 316 #endif 317 318 /* CE Type 4 Tag, mandatory NDEF File ID */ 319 #ifndef CE_T4T_MANDATORY_NDEF_FILE_ID 320 #define CE_T4T_MANDATORY_NDEF_FILE_ID 0x1000 321 #endif 322 323 /* CE Type 4 Tag, max number of AID supported */ 324 #ifndef CE_T4T_MAX_REG_AID 325 #define CE_T4T_MAX_REG_AID 4 326 #endif 327 328 /* Sub carrier */ 329 #ifndef RW_I93_FLAG_SUB_CARRIER 330 #define RW_I93_FLAG_SUB_CARRIER I93_FLAG_SUB_CARRIER_SINGLE 331 #endif 332 333 /* Data rate for 15693 command/response */ 334 #ifndef RW_I93_FLAG_DATA_RATE 335 #define RW_I93_FLAG_DATA_RATE I93_FLAG_DATA_RATE_HIGH 336 #endif 337 338 /* TRUE, to include Card Emulation related test commands */ 339 #ifndef CE_TEST_INCLUDED 340 #define CE_TEST_INCLUDED FALSE 341 #endif 342 343 /* Quick Timer */ 344 #ifndef QUICK_TIMER_TICKS_PER_SEC 345 #define QUICK_TIMER_TICKS_PER_SEC 100 /* 10ms timer */ 346 #endif 347 348 /****************************************************************************** 349 ** 350 ** LLCP 351 ** 352 ******************************************************************************/ 353 354 #ifndef LLCP_TEST_INCLUDED 355 #define LLCP_TEST_INCLUDED FALSE 356 #endif 357 358 #ifndef LLCP_POOL_ID 359 #define LLCP_POOL_ID GKI_POOL_ID_3 360 #endif 361 362 #ifndef LLCP_POOL_BUF_SIZE 363 #define LLCP_POOL_BUF_SIZE GKI_BUF3_SIZE 364 #endif 365 366 /* LLCP Maximum Information Unit (between LLCP_DEFAULT_MIU(128) and LLCP_MAX_MIU 367 * (2175)*/ 368 #ifndef LLCP_MIU 369 #define LLCP_MIU \ 370 (LLCP_POOL_BUF_SIZE - NFC_HDR_SIZE - NCI_MSG_OFFSET_SIZE - \ 371 NCI_DATA_HDR_SIZE - LLCP_PDU_HEADER_SIZE) 372 #endif 373 374 /* Link Timeout, LTO */ 375 #ifndef LLCP_LTO_VALUE 376 /* Default is 100ms. It should be sufficiently larger than RWT */ 377 #define LLCP_LTO_VALUE 1000 378 #endif 379 380 /* 381 ** LTO is max time interval between the last bit received and the first bit sent 382 ** over the air. Link timeout must be delayed as much as time between the packet 383 ** sent from LLCP and the last bit transmitted at NFCC. 384 ** - 200ms, max OTA transmitting time between the first bit and the last bit at 385 ** NFCC. Largest MIU(2175bytes) of LLCP must be fragmented and sent on 386 ** NFC-DEP over the air. 8 * (DEP_REQ/RES+ACK) + DEP_REQ/RES for 2175 MIU at 387 ** 106kbps bit rate. 388 ** - 10ms, processing time 389 */ 390 #ifndef LLCP_INTERNAL_TX_DELAY 391 #define LLCP_INTERNAL_TX_DELAY 210 392 #endif 393 394 /* 395 ** LTO is max time interval between the last bit received and the first bit sent 396 ** over the air. Link timeout must be delayed as much as time between the first 397 ** bit received at NFCC and the packet received at LLCP. 398 ** - 200ms, max OTA transmitting time between the first bit and the last bit at 399 ** NFCC. LLCP cannot receive data packet until all bit are received and 400 ** reassembled in NCI. 8 * (DEP_REQ/RES+ACK) + DEP_REQ/RES for 2175 MIU at 401 ** 106kbps bit rate. 402 ** - 10ms, processing time 403 */ 404 #ifndef LLCP_INTERNAL_RX_DELAY 405 #define LLCP_INTERNAL_RX_DELAY 210 406 #endif 407 408 /* Wait for application layer sending data before sending SYMM */ 409 #ifndef LLCP_DELAY_RESP_TIME 410 #define LLCP_DELAY_RESP_TIME 20 /* in ms */ 411 #endif 412 413 /* LLCP inactivity timeout for initiator */ 414 #ifndef LLCP_INIT_INACTIVITY_TIMEOUT 415 #define LLCP_INIT_INACTIVITY_TIMEOUT 0 /* in ms */ 416 #endif 417 418 /* LLCP inactivity timeout for target */ 419 #ifndef LLCP_TARGET_INACTIVITY_TIMEOUT 420 #define LLCP_TARGET_INACTIVITY_TIMEOUT 0 /* in ms */ 421 #endif 422 423 /* LLCP delay timeout to send the first PDU as initiator */ 424 #ifndef LLCP_DELAY_TIME_TO_SEND_FIRST_PDU 425 #define LLCP_DELAY_TIME_TO_SEND_FIRST_PDU 50 /* in ms */ 426 #endif 427 428 /* Response Waiting Time */ 429 #ifndef LLCP_WAITING_TIME 430 /* its scaled value should be less than LTO */ 431 #define LLCP_WAITING_TIME 7 432 #endif 433 434 /* Options Parameters */ 435 #ifndef LLCP_OPT_VALUE 436 #define LLCP_OPT_VALUE LLCP_LSC_3 /* Link Service Class 3 */ 437 #endif 438 439 /* Data link connection timeout */ 440 #ifndef LLCP_DATA_LINK_CONNECTION_TOUT 441 #define LLCP_DATA_LINK_CONNECTION_TOUT 1000 442 #endif 443 444 /* Max length of service name */ 445 #ifndef LLCP_MAX_SN_LEN 446 #define LLCP_MAX_SN_LEN 255 /* max length of service name */ 447 #endif 448 449 /* Max number of well-known services, at least 2 for LM and SDP and up to 16 */ 450 #ifndef LLCP_MAX_WKS 451 #define LLCP_MAX_WKS 5 452 #endif 453 454 /* Max number of services advertised by local SDP, up to 16 */ 455 #ifndef LLCP_MAX_SERVER 456 #define LLCP_MAX_SERVER 10 457 #endif 458 459 /* Max number of services not advertised by local SDP, up to 32 */ 460 #ifndef LLCP_MAX_CLIENT 461 #define LLCP_MAX_CLIENT 20 462 #endif 463 464 /* Max number of data link connections */ 465 #ifndef LLCP_MAX_DATA_LINK 466 #define LLCP_MAX_DATA_LINK 16 467 #endif 468 469 /* Max number of outstanding service discovery requests */ 470 #ifndef LLCP_MAX_SDP_TRANSAC 471 #define LLCP_MAX_SDP_TRANSAC 16 472 #endif 473 474 /* Percentage of LLCP buffer pool for receiving data */ 475 #ifndef LLCP_RX_BUFF_RATIO 476 #define LLCP_RX_BUFF_RATIO 30 477 #endif 478 479 /* Rx congestion end threshold as percentage of receiving buffers */ 480 #ifndef LLCP_RX_CONGEST_END 481 #define LLCP_RX_CONGEST_END 50 482 #endif 483 484 /* Rx congestion start threshold as percentage of receiving buffers */ 485 #ifndef LLCP_RX_CONGEST_START 486 #define LLCP_RX_CONGEST_START 70 487 #endif 488 489 /* limitation of rx UI PDU as percentage of receiving buffers */ 490 #ifndef LLCP_LL_RX_BUFF_LIMIT 491 #define LLCP_LL_RX_BUFF_LIMIT 30 492 #endif 493 494 /* minimum rx congestion threshold (number of rx I PDU in queue) for data link 495 * connection */ 496 #ifndef LLCP_DL_MIN_RX_CONGEST 497 #define LLCP_DL_MIN_RX_CONGEST 4 498 #endif 499 500 /* limitation of tx UI PDU as percentage of transmitting buffers */ 501 #ifndef LLCP_LL_TX_BUFF_LIMIT 502 #define LLCP_LL_TX_BUFF_LIMIT 30 503 #endif 504 505 /****************************************************************************** 506 ** 507 ** NFA 508 ** 509 ******************************************************************************/ 510 511 #ifndef NFA_P2P_INCLUDED 512 #define NFA_P2P_INCLUDED TRUE 513 #endif 514 515 /* Maximum Idle time (no hcp) to wait for EE DISC REQ Ntf(s) */ 516 #ifndef NFA_HCI_NETWK_INIT_IDLE_TIMEOUT 517 #define NFA_HCI_NETWK_INIT_IDLE_TIMEOUT 1000 518 #endif 519 520 #ifndef NFA_HCI_MAX_HOST_IN_NETWORK 521 #define NFA_HCI_MAX_HOST_IN_NETWORK 0x06 522 #endif 523 524 /* Max number of Application that can be registered to NFA-HCI */ 525 #ifndef NFA_HCI_MAX_APP_CB 526 #define NFA_HCI_MAX_APP_CB 0x05 527 #endif 528 529 /* Max number of HCI gates that can be created */ 530 #ifndef NFA_HCI_MAX_GATE_CB 531 #define NFA_HCI_MAX_GATE_CB 0x06 532 #endif 533 534 /* Max number of HCI pipes that can be created for the whole system */ 535 #ifndef NFA_HCI_MAX_PIPE_CB 536 #define NFA_HCI_MAX_PIPE_CB 0x08 537 #endif 538 539 /* Timeout for waiting for the response to HCP Command packet */ 540 #ifndef NFA_HCI_RESPONSE_TIMEOUT 541 #define NFA_HCI_RESPONSE_TIMEOUT 1000 542 #endif 543 544 /* Default poll duration (may be over-ridden using NFA_SetRfDiscoveryDuration) 545 */ 546 #ifndef NFA_DM_DISC_DURATION_POLL 547 #define NFA_DM_DISC_DURATION_POLL 500 /* Android requires 500 */ 548 #endif 549 550 /* Automatic NDEF detection (when not in exclusive RF mode) */ 551 #ifndef NFA_DM_AUTO_DETECT_NDEF 552 #define NFA_DM_AUTO_DETECT_NDEF FALSE /* !!!!! NFC-Android needs FALSE */ 553 #endif 554 555 /* Automatic NDEF read (when not in exclusive RF mode) */ 556 #ifndef NFA_DM_AUTO_READ_NDEF 557 #define NFA_DM_AUTO_READ_NDEF FALSE /* !!!!! NFC-Android needs FALSE */ 558 #endif 559 560 /* Automatic NDEF presence check (when not in exclusive RF mode) */ 561 #ifndef NFA_DM_AUTO_PRESENCE_CHECK 562 #define NFA_DM_AUTO_PRESENCE_CHECK FALSE /* Android requires FALSE */ 563 #endif 564 565 /* Presence check option: 0x01: use sleep/wake for none-NDEF ISO-DEP tags */ 566 #ifndef NFA_DM_PRESENCE_CHECK_OPTION 567 /* !!!!! Android needs value 3 */ 568 #define NFA_DM_PRESENCE_CHECK_OPTION 0x03 569 #endif 570 571 /* Maximum time to wait for presence check response */ 572 #ifndef NFA_DM_MAX_PRESENCE_CHECK_TIMEOUT 573 #define NFA_DM_MAX_PRESENCE_CHECK_TIMEOUT 500 574 #endif 575 576 /* Default delay to auto presence check after sending raw frame */ 577 #ifndef NFA_DM_DEFAULT_PRESENCE_CHECK_START_DELAY 578 #define NFA_DM_DEFAULT_PRESENCE_CHECK_START_DELAY 750 579 #endif 580 581 /* Timeout for reactivation of Kovio bar code tag (presence check) */ 582 #ifndef NFA_DM_DISC_TIMEOUT_KOVIO_PRESENCE_CHECK 583 #define NFA_DM_DISC_TIMEOUT_KOVIO_PRESENCE_CHECK (1000) 584 #endif 585 586 /* Max number of NDEF type handlers that can be registered (including the 587 * default handler) */ 588 #ifndef NFA_NDEF_MAX_HANDLERS 589 #define NFA_NDEF_MAX_HANDLERS 8 590 #endif 591 592 /* Maximum number of listen entries configured/registered with 593 * NFA_CeConfigureUiccListenTech, */ 594 /* NFA_CeRegisterFelicaSystemCodeOnDH, or NFA_CeRegisterT4tAidOnDH */ 595 #ifndef NFA_CE_LISTEN_INFO_MAX 596 #define NFA_CE_LISTEN_INFO_MAX 5 597 #endif 598 599 #ifndef NFA_SNEP_INCLUDED 600 /* Android must use FALSE to exclude SNEP */ 601 #define NFA_SNEP_INCLUDED FALSE 602 #endif 603 604 /* Max acceptable length */ 605 #ifndef NFA_SNEP_DEFAULT_SERVER_MAX_NDEF_SIZE 606 #define NFA_SNEP_DEFAULT_SERVER_MAX_NDEF_SIZE 500000 607 #endif 608 609 /* Max number of SNEP server/client and data link connection */ 610 #ifndef NFA_SNEP_MAX_CONN 611 #define NFA_SNEP_MAX_CONN 6 612 #endif 613 614 /* Max number data link connection of SNEP default server*/ 615 #ifndef NFA_SNEP_DEFAULT_MAX_CONN 616 #define NFA_SNEP_DEFAULT_MAX_CONN 3 617 #endif 618 619 /* MIU for SNEP */ 620 #ifndef NFA_SNEP_MIU 621 #define NFA_SNEP_MIU 1980 /* Modified for NFC-A */ 622 #endif 623 624 /* Receiving Window for SNEP */ 625 #ifndef NFA_SNEP_RW 626 #define NFA_SNEP_RW 2 /* Modified for NFC-A */ 627 #endif 628 629 /* Max number of NFCEE supported */ 630 #ifndef NFA_EE_MAX_EE_SUPPORTED 631 /* Modified for NFC-A until we add dynamic support */ 632 #define NFA_EE_MAX_EE_SUPPORTED 4 633 #endif 634 635 /* Maximum number of AID entries per target_handle */ 636 #ifndef NFA_EE_MAX_AID_ENTRIES 637 #define NFA_EE_MAX_AID_ENTRIES (32) 638 #endif 639 640 /* Maximum number of callback functions can be registered through 641 * NFA_EeRegister() */ 642 #ifndef NFA_EE_MAX_CBACKS 643 #define NFA_EE_MAX_CBACKS (3) 644 #endif 645 646 #ifndef NFA_DTA_INCLUDED 647 #define NFA_DTA_INCLUDED TRUE 648 #endif 649 650 /***************************************************************************** 651 ** Define HAL_WRITE depending on whether HAL is using shared GKI resources 652 ** as the NFC stack. 653 *****************************************************************************/ 654 #ifndef HAL_WRITE 655 #define HAL_WRITE(p) \ 656 { \ 657 nfc_cb.p_hal->write(p->len, (uint8_t*)(p + 1) + p->offset); \ 658 GKI_freebuf(p); \ 659 } 660 661 #ifdef NFC_HAL_SHARED_GKI 662 663 /* NFC HAL Included if NFC_NFCEE_INCLUDED */ 664 #if (NFC_NFCEE_INCLUDED == TRUE) 665 666 #ifndef NFC_HAL_HCI_INCLUDED 667 #define NFC_HAL_HCI_INCLUDED TRUE 668 #endif 669 #else /* NFC_NFCEE_INCLUDED == TRUE */ 670 #ifndef NFC_HAL_HCI_INCLUDED 671 #define NFC_HAL_HCI_INCLUDED FALSE 672 #endif 673 674 #endif /* NFC_NFCEE_INCLUDED == FALSE */ 675 676 #endif /* NFC_HAL_SHARED_GKI */ 677 678 #endif /* HAL_WRITE */ 679 680 #endif /* NFC_TARGET_H */ 681