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