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