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