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