1 /****************************************************************************** 2 * 3 * Copyright (C) 2010-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 /****************************************************************************** 20 * 21 * NFA reader/writer API functions 22 * 23 ******************************************************************************/ 24 #ifndef NFA_RW_API_H 25 #define NFA_RW_API_H 26 27 #include "nfc_target.h" 28 #include "nfa_api.h" 29 30 /***************************************************************************** 31 ** Constants and data types 32 *****************************************************************************/ 33 34 /***************************************************************************** 35 ** NFA T3T Constants and definitions 36 *****************************************************************************/ 37 38 /* Block descriptor. (For non-NDEF read/write */ 39 typedef struct 40 { 41 UINT16 service_code; /* Service code for the block */ 42 UINT16 block_number; /* Block number. */ 43 } tNFA_T3T_BLOCK_DESC; 44 45 46 47 /***************************************************************************** 48 ** External Function Declarations 49 *****************************************************************************/ 50 #ifdef __cplusplus 51 extern "C" 52 { 53 #endif 54 55 /******************************************************************************* 56 ** 57 ** Function NFA_RwDetectNDef 58 ** 59 ** Description Perform the NDEF detection procedure using the appropriate 60 ** method for the currently activated tag. 61 ** 62 ** Upon successful completion of NDEF detection, a 63 ** NFA_NDEF_DETECT_EVT will be sent, to notify the application 64 ** of the NDEF attributes (NDEF total memory size, current 65 ** size, etc.). 66 ** 67 ** It is not mandatory to call this function - NFA_RwReadNDef 68 ** and NFA_RwWriteNDef will perform NDEF detection internally if 69 ** not performed already. This API may be called to get a 70 ** tag's NDEF size before issuing a write-request. 71 ** 72 ** Returns: 73 ** NFA_STATUS_OK if successfully initiated 74 ** NFC_STATUS_REFUSED if tag does not support NDEF 75 ** NFA_STATUS_FAILED otherwise 76 ** 77 *******************************************************************************/ 78 NFC_API extern tNFA_STATUS NFA_RwDetectNDef (void); 79 80 /******************************************************************************* 81 ** 82 ** Function NFA_RwReadNDef 83 ** 84 ** Description Read NDEF message from tag. This function will internally 85 ** perform the NDEF detection procedure (if not performed 86 ** previously), and read the NDEF tag data using the 87 ** appropriate method for the currently activated tag. 88 ** 89 ** Upon successful completion of NDEF detection (if performed), 90 ** a NFA_NDEF_DETECT_EVT will be sent, to notify the application 91 ** of the NDEF attributes (NDEF total memory size, current size, 92 ** etc.). 93 ** 94 ** Upon receiving the NDEF message, the message will be sent to 95 ** the handler registered with NFA_RegisterNDefTypeHandler or 96 ** NFA_RequestExclusiveRfControl (if exclusive RF mode is active) 97 ** 98 ** 99 ** Returns: 100 ** NFA_STATUS_OK if successfully initiated 101 ** NFC_STATUS_REFUSED if tag does not support NDEF 102 ** NFC_STATUS_NOT_INITIALIZED if NULL NDEF was detected on the tag 103 ** NFA_STATUS_FAILED otherwise 104 ** 105 *******************************************************************************/ 106 NFC_API extern tNFA_STATUS NFA_RwReadNDef (void); 107 108 /******************************************************************************* 109 ** 110 ** Function NFA_RwWriteNDef 111 ** 112 ** Description Write NDEF data to the activated tag. This function will 113 ** internally perform NDEF detection if necessary, and write 114 ** the NDEF tag data using the appropriate method for the 115 ** currently activated tag. 116 ** 117 ** When the entire message has been written, or if an error 118 ** occurs, the app will be notified with NFA_RW_WRITE_CPLT_EVT. 119 ** 120 ** p_data needs to be persistent until NFA_RW_WRITE_CPLT_EVT 121 ** 122 ** 123 ** Returns: 124 ** NFA_STATUS_OK if successfully initiated 125 ** NFC_STATUS_REFUSED if tag does not support NDEF/locked 126 ** NFA_STATUS_FAILED otherwise 127 ** 128 *******************************************************************************/ 129 NFC_API extern tNFA_STATUS NFA_RwWriteNDef (UINT8 *p_data, UINT32 len); 130 131 132 /***************************************************************************** 133 ** 134 ** Function NFA_RwPresenceCheck 135 ** 136 ** Description Check if the tag is still in the field. 137 ** 138 ** The NFA_RW_PRESENCE_CHECK_EVT w/ status is used to 139 ** indicate presence or non-presence. 140 ** 141 ** Returns 142 ** NFA_STATUS_OK if successfully initiated 143 ** NFA_STATUS_FAILED otherwise 144 ** 145 *****************************************************************************/ 146 NFC_API extern tNFA_STATUS NFA_RwPresenceCheck (void); 147 148 /***************************************************************************** 149 ** 150 ** Function NFA_RwFormatTag 151 ** 152 ** Description Check if the tag is NDEF Formatable. If yes Format the 153 ** tag 154 ** 155 ** The NFA_RW_FORMAT_CPLT_EVT w/ status is used to 156 ** indicate if tag is formated or not. 157 ** 158 ** Returns 159 ** NFA_STATUS_OK if successfully initiated 160 ** NFA_STATUS_FAILED otherwise 161 ** 162 *****************************************************************************/ 163 NFC_API extern tNFA_STATUS NFA_RwFormatTag (void); 164 165 /******************************************************************************* 166 ** LEGACY / PROPRIETARY TAG READ AND WRITE APIs 167 *******************************************************************************/ 168 169 170 /******************************************************************************* 171 ** 172 ** Function NFA_RwLocateTlv 173 ** 174 ** Description: 175 ** Search for the Lock/Memory contril TLV on the activated Type1/Type2 tag 176 ** 177 ** Data is returned to the application using the NFA_TLV_DETECT_EVT. When 178 ** search operation has completed, or if an error occurs, the app will be 179 ** notified with NFA_TLV_DETECT_EVT. 180 ** 181 ** Description Perform the TLV detection procedure using the appropriate 182 ** method for the currently activated tag. 183 ** 184 ** Upon successful completion of TLV detection in T1/T2 tag, a 185 ** NFA_TLV_DETECT_EVT will be sent, to notify the application 186 ** of the TLV attributes (total lock/reserved bytes etc.). 187 ** However if the TLV type specified is NDEF then it is same as 188 ** calling NFA_RwDetectNDef and should expect to receive 189 ** NFA_NDEF_DETECT_EVT instead of NFA_TLV_DETECT_EVT 190 ** 191 ** It is not mandatory to call this function - NFA_RwDetectNDef, 192 ** NFA_RwReadNDef and NFA_RwWriteNDef will perform TLV detection 193 ** internally if not performed already. An application may call 194 ** this API to check the a tag/card-emulator's total Reserved/ 195 ** Lock bytes before issuing a write-request. 196 ** 197 ** Returns: 198 ** NFA_STATUS_OK if successfully initiated 199 ** NFC_STATUS_REFUSED if tlv_type is NDEF & tag won't support NDEF 200 ** NFA_STATUS_FAILED otherwise 201 ** 202 *******************************************************************************/ 203 NFC_API extern tNFA_STATUS NFA_RwLocateTlv (UINT8 tlv_type); 204 205 /******************************************************************************* 206 ** 207 ** Function NFA_RwSetTagReadOnly 208 ** 209 ** Description: 210 ** Sets tag as read only. 211 ** 212 ** When tag is set as read only, or if an error occurs, the app will be 213 ** notified with NFA_SET_TAG_RO_EVT. 214 ** 215 ** Returns: 216 ** NFA_STATUS_OK if successfully initiated 217 ** NFA_STATUS_REJECTED if protocol is not T1/T2/ISO15693 218 ** (or) if hard lock is not requested for protocol ISO15693 219 ** NFA_STATUS_FAILED otherwise 220 ** 221 *******************************************************************************/ 222 NFC_API extern tNFA_STATUS NFA_RwSetTagReadOnly (BOOLEAN b_hard_lock); 223 224 /******************************************************************************* 225 ** 226 ** Function NFA_RwT1tRid 227 ** 228 ** Description: 229 ** Send a RID command to the activated Type 1 tag. 230 ** 231 ** Data is returned to the application using the NFA_DATA_EVT. When the read 232 ** operation has completed, or if an error occurs, the app will be notified with 233 ** NFA_READ_CPLT_EVT. 234 ** 235 ** Returns: 236 ** NFA_STATUS_OK if successfully initiated 237 ** NFA_STATUS_NOT_INITIALIZED: type 1 tag not activated 238 ** NFA_STATUS_FAILED otherwise 239 ** 240 *******************************************************************************/ 241 NFC_API extern tNFA_STATUS NFA_RwT1tRid (void); 242 243 /******************************************************************************* 244 ** 245 ** Function NFA_RwT1tReadAll 246 ** 247 ** Description: 248 ** Send a RALL command to the activated Type 1 tag. 249 ** 250 ** Data is returned to the application using the NFA_DATA_EVT. When the read 251 ** operation has completed, or if an error occurs, the app will be notified with 252 ** NFA_READ_CPLT_EVT. 253 ** 254 ** Returns: 255 ** NFA_STATUS_OK if successfully initiated 256 ** NFA_STATUS_NOT_INITIALIZED: type 1 tag not activated 257 ** NFA_STATUS_FAILED otherwise 258 ** 259 *******************************************************************************/ 260 NFC_API extern tNFA_STATUS NFA_RwT1tReadAll (void); 261 262 /******************************************************************************* 263 ** 264 ** Function NFA_RwT1tRead 265 ** 266 ** Description: 267 ** Send a READ command to the activated Type 1 tag. 268 ** 269 ** Data is returned to the application using the NFA_DATA_EVT. When the read 270 ** operation has completed, or if an error occurs, the app will be notified with 271 ** NFA_READ_CPLT_EVT. 272 ** 273 ** Returns: 274 ** NFA_STATUS_OK if successfully initiated 275 ** NFA_STATUS_NOT_INITIALIZED: type 1 tag not activated 276 ** NFA_STATUS_FAILED otherwise 277 ** 278 *******************************************************************************/ 279 NFC_API extern tNFA_STATUS NFA_RwT1tRead (UINT8 block_number, UINT8 index); 280 281 /******************************************************************************* 282 ** 283 ** Function NFA_RwT1tWrite 284 ** 285 ** Description: 286 ** Send a WRITE command to the activated Type 1 tag. 287 ** 288 ** Data is returned to the application using the NFA_DATA_EVT. When the write 289 ** operation has completed, or if an error occurs, the app will be notified with 290 ** NFA_WRITE_CPLT_EVT. 291 ** 292 ** Returns: 293 ** NFA_STATUS_OK if successfully initiated 294 ** NFA_STATUS_NOT_INITIALIZED: type 1 tag not activated 295 ** NFA_STATUS_FAILED otherwise 296 ** 297 *******************************************************************************/ 298 NFC_API extern tNFA_STATUS NFA_RwT1tWrite (UINT8 block_number, 299 UINT8 index, 300 UINT8 data, 301 BOOLEAN b_erase); 302 303 /******************************************************************************* 304 ** 305 ** Function NFA_RwT1tReadSeg 306 ** 307 ** Description: 308 ** Send a RSEG command to the activated Type 1 tag. 309 ** 310 ** Data is returned to the application using the NFA_DATA_EVT. When the read 311 ** operation has completed, or if an error occurs, the app will be notified with 312 ** NFA_READ_CPLT_EVT. 313 ** 314 ** Returns: 315 ** NFA_STATUS_OK if successfully initiated 316 ** NFA_STATUS_NOT_INITIALIZED: type 1 tag not activated 317 ** NFA_STATUS_FAILED otherwise 318 ** 319 *******************************************************************************/ 320 NFC_API extern tNFA_STATUS NFA_RwT1tReadSeg (UINT8 segment_number); 321 322 /******************************************************************************* 323 ** 324 ** Function NFA_RwT1tRead8 325 ** 326 ** Description: 327 ** Send a READ8 command to the activated Type 1 tag. 328 ** 329 ** Data is returned to the application using the NFA_DATA_EVT. When the read 330 ** operation has completed, or if an error occurs, the app will be notified with 331 ** NFA_READ_CPLT_EVT. 332 ** 333 ** Returns: 334 ** NFA_STATUS_OK if successfully initiated 335 ** NFA_STATUS_NOT_INITIALIZED: type 1 tag not activated 336 ** NFA_STATUS_FAILED otherwise 337 ** 338 *******************************************************************************/ 339 NFC_API extern tNFA_STATUS NFA_RwT1tRead8 (UINT8 block_number); 340 341 /******************************************************************************* 342 ** 343 ** Function NFA_RwT1tWrite8 344 ** 345 ** Description: 346 ** Send a WRITE8_E / WRITE8_NE command to the activated Type 1 tag. 347 ** 348 ** Data is returned to the application using the NFA_DATA_EVT. When the read 349 ** operation has completed, or if an error occurs, the app will be notified with 350 ** NFA_READ_CPLT_EVT. 351 ** 352 ** Returns: 353 ** NFA_STATUS_OK if successfully initiated 354 ** NFA_STATUS_NOT_INITIALIZED: type 1 tag not activated 355 ** NFA_STATUS_FAILED otherwise 356 ** 357 *******************************************************************************/ 358 NFC_API extern tNFA_STATUS NFA_RwT1tWrite8 (UINT8 block_number, 359 UINT8 *p_data, 360 BOOLEAN b_erase); 361 362 /******************************************************************************* 363 ** 364 ** Function NFA_RwT2tRead 365 ** 366 ** Description: 367 ** Send a READ command to the activated Type 2 tag. 368 ** 369 ** Data is returned to the application using the NFA_DATA_EVT. When the read 370 ** operation has completed, or if an error occurs, the app will be notified with 371 ** NFA_READ_CPLT_EVT. 372 ** 373 ** Returns: 374 ** NFA_STATUS_OK if successfully initiated 375 ** NFA_STATUS_NOT_INITIALIZED: type 2 tag not activated 376 ** NFA_STATUS_FAILED otherwise 377 ** 378 *******************************************************************************/ 379 NFC_API extern tNFA_STATUS NFA_RwT2tRead (UINT8 block_number); 380 381 /******************************************************************************* 382 ** 383 ** Function NFA_RwT2tWrite 384 ** 385 ** Description: 386 ** Send an WRITE command to the activated Type 2 tag. 387 ** 388 ** When the write operation has completed (or if an error occurs), the 389 ** app will be notified with NFA_WRITE_CPLT_EVT. 390 ** 391 ** Returns: 392 ** NFA_STATUS_OK if successfully initiated 393 ** NFA_STATUS_NOT_INITIALIZED: type 2 tag not activated 394 ** NFA_STATUS_FAILED otherwise 395 ** 396 *******************************************************************************/ 397 NFC_API extern tNFA_STATUS NFA_RwT2tWrite (UINT8 block_number, UINT8 *p_data); 398 399 /******************************************************************************* 400 ** 401 ** Function NFA_RwT2tSectorSelect 402 ** 403 ** Description: 404 ** Send SECTOR SELECT command to the activated Type 2 tag. 405 ** 406 ** When the sector select operation has completed (or if an error occurs), the 407 ** app will be notified with NFA_SECTOR_SELECT_CPLT_EVT. 408 ** 409 ** Returns: 410 ** NFA_STATUS_OK if successfully initiated 411 ** NFA_STATUS_NOT_INITIALIZED: type 2 tag not activated 412 ** NFA_STATUS_FAILED otherwise 413 ** 414 *******************************************************************************/ 415 NFC_API extern tNFA_STATUS NFA_RwT2tSectorSelect (UINT8 sector_number); 416 417 /******************************************************************************* 418 ** 419 ** Function NFA_RwT3tRead 420 ** 421 ** Description: 422 ** Send a CHECK (read) command to the activated Type 3 tag. 423 ** 424 ** Data is returned to the application using the NFA_RW_DATA_EVT. When the read 425 ** operation has completed, or if an error occurs, the app will be notified with 426 ** NFA_READ_CPLT_EVT. 427 ** 428 ** Returns: 429 ** NFA_STATUS_OK if successfully initiated 430 ** NFA_STATUS_NOT_INITIALIZED: type 3 tag not activated 431 ** NFA_STATUS_FAILED otherwise 432 ** 433 *******************************************************************************/ 434 NFC_API extern tNFA_STATUS NFA_RwT3tRead (UINT8 num_blocks, 435 tNFA_T3T_BLOCK_DESC *t3t_blocks); 436 437 /******************************************************************************* 438 ** 439 ** Function NFA_RwT3tWrite 440 ** 441 ** Description: 442 ** Send an UPDATE (write) command to the activated Type 3 tag. 443 ** 444 ** When the write operation has completed (or if an error occurs), the 445 ** app will be notified with NFA_WRITE_CPLT_EVT. 446 ** 447 ** Returns: 448 ** NFA_STATUS_OK if successfully initiated 449 ** NFA_STATUS_NOT_INITIALIZED: type 3 tag not activated 450 ** NFA_STATUS_FAILED otherwise 451 ** 452 *******************************************************************************/ 453 NFC_API extern tNFA_STATUS NFA_RwT3tWrite (UINT8 num_blocks, 454 tNFA_T3T_BLOCK_DESC *t3t_blocks, 455 UINT8 *p_data); 456 457 /******************************************************************************* 458 ** 459 ** Function NFA_RwI93Inventory 460 ** 461 ** Description: 462 ** Send Inventory command to the activated ISO 15693 tag. 463 ** If UID is provided then set UID[0]:MSB, ... UID[7]:LSB 464 ** 465 ** When the write operation has completed (or if an error occurs), the 466 ** app will be notified with NFA_I93_CMD_CPLT_EVT. 467 ** 468 ** Returns: 469 ** NFA_STATUS_OK if successfully initiated 470 ** NFA_STATUS_NOT_INITIALIZED: ISO 15693 tag not activated 471 ** NFA_STATUS_FAILED otherwise 472 ** 473 *******************************************************************************/ 474 NFC_API extern tNFA_STATUS NFA_RwI93Inventory (UINT8 afi, UINT8 *p_uid); 475 476 /******************************************************************************* 477 ** 478 ** Function NFA_RwI93StayQuiet 479 ** 480 ** Description: 481 ** Send Stay Quiet command to the activated ISO 15693 tag. 482 ** 483 ** When the operation has completed (or if an error occurs), the 484 ** app will be notified with NFA_I93_CMD_CPLT_EVT. 485 ** 486 ** Returns: 487 ** NFA_STATUS_OK if successfully initiated 488 ** NFA_STATUS_WRONG_PROTOCOL: ISO 15693 tag not activated 489 ** NFA_STATUS_FAILED otherwise 490 ** 491 *******************************************************************************/ 492 NFC_API extern tNFA_STATUS NFA_RwI93StayQuiet (void); 493 494 /******************************************************************************* 495 ** 496 ** Function NFA_RwI93ReadSingleBlock 497 ** 498 ** Description: 499 ** Send Read Single Block command to the activated ISO 15693 tag. 500 ** 501 ** Data is returned to the application using the NFA_DATA_EVT. When the read 502 ** operation has completed, or if an error occurs, the app will be notified with 503 ** NFA_I93_CMD_CPLT_EVT. 504 ** 505 ** Returns: 506 ** NFA_STATUS_OK if successfully initiated 507 ** NFA_STATUS_WRONG_PROTOCOL: ISO 15693 tag not activated 508 ** NFA_STATUS_FAILED otherwise 509 ** 510 *******************************************************************************/ 511 NFC_API extern tNFA_STATUS NFA_RwI93ReadSingleBlock (UINT8 block_number); 512 513 /******************************************************************************* 514 ** 515 ** Function NFA_RwI93WriteSingleBlock 516 ** 517 ** Description: 518 ** Send Write Single Block command to the activated ISO 15693 tag. 519 ** 520 ** When the write operation has completed (or if an error occurs), the 521 ** app will be notified with NFA_I93_CMD_CPLT_EVT. 522 ** 523 ** Returns: 524 ** NFA_STATUS_OK if successfully initiated 525 ** NFA_STATUS_WRONG_PROTOCOL: ISO 15693 tag not activated 526 ** NFA_STATUS_FAILED otherwise 527 ** 528 *******************************************************************************/ 529 NFC_API extern tNFA_STATUS NFA_RwI93WriteSingleBlock (UINT8 block_number, 530 UINT8 *p_data); 531 532 /******************************************************************************* 533 ** 534 ** Function NFA_RwI93LockBlock 535 ** 536 ** Description: 537 ** Send Lock block command to the activated ISO 15693 tag. 538 ** 539 ** When the operation has completed (or if an error occurs), the 540 ** app will be notified with NFA_I93_CMD_CPLT_EVT. 541 ** 542 ** Returns: 543 ** NFA_STATUS_OK if successfully initiated 544 ** NFA_STATUS_WRONG_PROTOCOL: ISO 15693 tag not activated 545 ** NFA_STATUS_FAILED otherwise 546 ** 547 *******************************************************************************/ 548 NFC_API extern tNFA_STATUS NFA_RwI93LockBlock (UINT8 block_number); 549 550 /******************************************************************************* 551 ** 552 ** Function NFA_RwI93ReadMultipleBlocks 553 ** 554 ** Description: 555 ** Send Read Multiple Block command to the activated ISO 15693 tag. 556 ** 557 ** Data is returned to the application using the NFA_DATA_EVT. When the read 558 ** operation has completed, or if an error occurs, the app will be notified with 559 ** NFA_I93_CMD_CPLT_EVT. 560 ** 561 ** Returns: 562 ** NFA_STATUS_OK if successfully initiated 563 ** NFA_STATUS_WRONG_PROTOCOL: ISO 15693 tag not activated 564 ** NFA_STATUS_FAILED otherwise 565 ** 566 *******************************************************************************/ 567 NFC_API extern tNFA_STATUS NFA_RwI93ReadMultipleBlocks (UINT8 first_block_number, 568 UINT16 number_blocks); 569 570 /******************************************************************************* 571 ** 572 ** Function NFA_RwI93WriteMultipleBlocks 573 ** 574 ** Description: 575 ** Send Write Multiple Block command to the activated ISO 15693 tag. 576 ** 577 ** When the write operation has completed (or if an error occurs), the 578 ** app will be notified with NFA_I93_CMD_CPLT_EVT. 579 ** 580 ** Returns: 581 ** NFA_STATUS_OK if successfully initiated 582 ** NFA_STATUS_WRONG_PROTOCOL: ISO 15693 tag not activated 583 ** NFA_STATUS_FAILED otherwise 584 ** 585 *******************************************************************************/ 586 NFC_API extern tNFA_STATUS NFA_RwI93WriteMultipleBlocks (UINT8 first_block_number, 587 UINT16 number_blocks, 588 UINT8 *p_data); 589 590 /******************************************************************************* 591 ** 592 ** Function NFA_RwI93Select 593 ** 594 ** Description: 595 ** Send Select command to the activated ISO 15693 tag. 596 ** 597 ** UID[0]: 0xE0, MSB 598 ** UID[1]: IC Mfg Code 599 ** ... 600 ** UID[7]: LSB 601 ** 602 ** When the operation has completed (or if an error occurs), the 603 ** app will be notified with NFA_I93_CMD_CPLT_EVT. 604 ** 605 ** Returns: 606 ** NFA_STATUS_OK if successfully initiated 607 ** NFA_STATUS_WRONG_PROTOCOL: ISO 15693 tag not activated 608 ** NFA_STATUS_FAILED otherwise 609 ** 610 *******************************************************************************/ 611 NFC_API extern tNFA_STATUS NFA_RwI93Select (UINT8 *p_uid); 612 613 /******************************************************************************* 614 ** 615 ** Function NFA_RwI93ResetToReady 616 ** 617 ** Description: 618 ** Send Reset to ready command to the activated ISO 15693 tag. 619 ** 620 ** When the operation has completed (or if an error occurs), the 621 ** app will be notified with NFA_I93_CMD_CPLT_EVT. 622 ** 623 ** Returns: 624 ** NFA_STATUS_OK if successfully initiated 625 ** NFA_STATUS_WRONG_PROTOCOL: ISO 15693 tag not activated 626 ** NFA_STATUS_FAILED otherwise 627 ** 628 *******************************************************************************/ 629 NFC_API extern tNFA_STATUS NFA_RwI93ResetToReady (void); 630 631 /******************************************************************************* 632 ** 633 ** Function NFA_RwI93WriteAFI 634 ** 635 ** Description: 636 ** Send Write AFI command to the activated ISO 15693 tag. 637 ** 638 ** When the operation has completed (or if an error occurs), the 639 ** app will be notified with NFA_I93_CMD_CPLT_EVT. 640 ** 641 ** Returns: 642 ** NFA_STATUS_OK if successfully initiated 643 ** NFA_STATUS_WRONG_PROTOCOL: ISO 15693 tag not activated 644 ** NFA_STATUS_FAILED otherwise 645 ** 646 *******************************************************************************/ 647 NFC_API extern tNFA_STATUS NFA_RwI93WriteAFI (UINT8 afi); 648 649 /******************************************************************************* 650 ** 651 ** Function NFA_RwI93LockAFI 652 ** 653 ** Description: 654 ** Send Lock AFI command to the activated ISO 15693 tag. 655 ** 656 ** When the operation has completed (or if an error occurs), the 657 ** app will be notified with NFA_I93_CMD_CPLT_EVT. 658 ** 659 ** Returns: 660 ** NFA_STATUS_OK if successfully initiated 661 ** NFA_STATUS_WRONG_PROTOCOL: ISO 15693 tag not activated 662 ** NFA_STATUS_FAILED otherwise 663 ** 664 *******************************************************************************/ 665 NFC_API extern tNFA_STATUS NFA_RwI93LockAFI (void); 666 667 /******************************************************************************* 668 ** 669 ** Function NFA_RwI93WriteDSFID 670 ** 671 ** Description: 672 ** Send Write DSFID command to the activated ISO 15693 tag. 673 ** 674 ** When the operation has completed (or if an error occurs), the 675 ** app will be notified with NFA_I93_CMD_CPLT_EVT. 676 ** 677 ** Returns: 678 ** NFA_STATUS_OK if successfully initiated 679 ** NFA_STATUS_WRONG_PROTOCOL: ISO 15693 tag not activated 680 ** NFA_STATUS_FAILED otherwise 681 ** 682 *******************************************************************************/ 683 NFC_API extern tNFA_STATUS NFA_RwI93WriteDSFID (UINT8 dsfid); 684 685 /******************************************************************************* 686 ** 687 ** Function NFA_RwI93LockDSFID 688 ** 689 ** Description: 690 ** Send Lock DSFID command to the activated ISO 15693 tag. 691 ** 692 ** When the operation has completed (or if an error occurs), the 693 ** app will be notified with NFA_I93_CMD_CPLT_EVT. 694 ** 695 ** Returns: 696 ** NFA_STATUS_OK if successfully initiated 697 ** NFA_STATUS_WRONG_PROTOCOL: ISO 15693 tag not activated 698 ** NFA_STATUS_FAILED otherwise 699 ** 700 *******************************************************************************/ 701 NFC_API extern tNFA_STATUS NFA_RwI93LockDSFID (void); 702 703 /******************************************************************************* 704 ** 705 ** Function NFA_RwI93GetSysInfo 706 ** 707 ** Description: 708 ** Send Get system information command to the activated ISO 15693 tag. 709 ** If UID is provided then set UID[0]:MSB, ... UID[7]:LSB 710 ** 711 ** When the operation has completed (or if an error occurs), the 712 ** app will be notified with NFA_I93_CMD_CPLT_EVT. 713 ** 714 ** Returns: 715 ** NFA_STATUS_OK if successfully initiated 716 ** NFA_STATUS_WRONG_PROTOCOL: ISO 15693 tag not activated 717 ** NFA_STATUS_FAILED otherwise 718 ** 719 *******************************************************************************/ 720 NFC_API extern tNFA_STATUS NFA_RwI93GetSysInfo (UINT8 *p_uid); 721 722 /******************************************************************************* 723 ** 724 ** Function NFA_RwI93GetMultiBlockSecurityStatus 725 ** 726 ** Description: 727 ** Send Get Multiple block security status command to the activated ISO 15693 tag. 728 ** 729 ** Data is returned to the application using the NFA_DATA_EVT. When the read 730 ** operation has completed, or if an error occurs, the app will be notified with 731 ** NFA_I93_CMD_CPLT_EVT. 732 ** 733 ** Returns: 734 ** NFA_STATUS_OK if successfully initiated 735 ** NFA_STATUS_WRONG_PROTOCOL: ISO 15693 tag not activated 736 ** NFA_STATUS_FAILED otherwise 737 ** 738 *******************************************************************************/ 739 NFC_API extern tNFA_STATUS NFA_RwI93GetMultiBlockSecurityStatus (UINT8 first_block_number, 740 UINT16 number_blocks); 741 742 #ifdef __cplusplus 743 } 744 #endif 745 746 #endif /* NFA_RW_API_H */ 747