rw_api.h revision 2eba59f3f0639fbf6a2be8cc54167e9ffd5d8536
1/****************************************************************************** 2 * 3 * Copyright (C) 2009-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 * This file contains the Near Field Communication (NFC) Reader/Writer mode 22 * related API function external definitions. 23 * 24 ******************************************************************************/ 25 26#ifndef RW_API_H 27#define RW_API_H 28#include "nfc_api.h" 29#include "tags_defs.h" 30 31#define RW_T1T_BLD_ADD(a, k, y) (a) = (((k) & 0xF) << 3) | ((y) & 0x7); 32#define RW_T1T_BLD_ADDS(a, s) (a) = (((s) & 0xF) << 4); 33 34#define RW_T1T_FIRST_EVT 0x20 35#define RW_T2T_FIRST_EVT 0x40 36#define RW_T3T_FIRST_EVT 0x60 37#define RW_T4T_FIRST_EVT 0x80 38#define RW_I93_FIRST_EVT 0xA0 39 40enum { 41 /* Note: the order of these events can not be changed */ 42 /* Type 1 tag events for tRW_CBACK */ 43 RW_T1T_RID_EVT = RW_T1T_FIRST_EVT, /* Read ID command completd */ 44 RW_T1T_RALL_CPLT_EVT, /* Read All command completed */ 45 RW_T1T_READ_CPLT_EVT, /* Read byte completed */ 46 RW_T1T_WRITE_E_CPLT_EVT, /* Write byte after erase completed */ 47 RW_T1T_WRITE_NE_CPLT_EVT, /* Write byte with no erase completed */ 48 RW_T1T_RSEG_CPLT_EVT, /* Read segment completed */ 49 RW_T1T_READ8_CPLT_EVT, /* Read block completed */ 50 RW_T1T_WRITE_E8_CPLT_EVT, /* Write block after erase completed */ 51 RW_T1T_WRITE_NE8_CPLT_EVT, /* Write block with no erase completed */ 52 RW_T1T_TLV_DETECT_EVT, /* Lock/Mem/Prop tlv detection complete */ 53 RW_T1T_NDEF_DETECT_EVT, /* NDEF detection complete */ 54 RW_T1T_NDEF_READ_EVT, /* NDEF read completed */ 55 RW_T1T_NDEF_WRITE_EVT, /* NDEF write complete */ 56 RW_T1T_SET_TAG_RO_EVT, /* Tag is set as read only */ 57 RW_T1T_RAW_FRAME_EVT, /* Response of raw frame sent */ 58 RW_T1T_PRESENCE_CHECK_EVT, /* Response to RW_T1tPresenceCheck */ 59 RW_T1T_FORMAT_CPLT_EVT, /* Tag Formated */ 60 RW_T1T_INTF_ERROR_EVT, /* RF Interface error event */ 61 RW_T1T_MAX_EVT, 62 63 /* Type 2 tag events */ 64 RW_T2T_READ_CPLT_EVT = RW_T2T_FIRST_EVT, /* Read completed */ 65 RW_T2T_WRITE_CPLT_EVT, /* Write completed */ 66 RW_T2T_SELECT_CPLT_EVT, /* Sector select completed */ 67 RW_T2T_NDEF_DETECT_EVT, /* NDEF detection complete */ 68 RW_T2T_TLV_DETECT_EVT, /* Lock/Mem/Prop tlv detection complete */ 69 RW_T2T_NDEF_READ_EVT, /* NDEF read completed */ 70 RW_T2T_NDEF_WRITE_EVT, /* NDEF write complete */ 71 RW_T2T_SET_TAG_RO_EVT, /* Tag is set as read only */ 72 RW_T2T_RAW_FRAME_EVT, /* Response of raw frame sent */ 73 RW_T2T_PRESENCE_CHECK_EVT, /* Response to RW_T2tPresenceCheck */ 74 RW_T2T_FORMAT_CPLT_EVT, /* Tag Formated */ 75 RW_T2T_INTF_ERROR_EVT, /* RF Interface error event */ 76 RW_T2T_MAX_EVT, 77 78 /* Type 3 tag events for tRW_CBACK */ 79 RW_T3T_CHECK_CPLT_EVT = RW_T3T_FIRST_EVT, /* Read completed */ 80 RW_T3T_UPDATE_CPLT_EVT, /* Write completed */ 81 RW_T3T_CHECK_EVT, /* Segment of data received from type 3 tag */ 82 RW_T3T_RAW_FRAME_EVT, /* SendRawFrame response */ 83 RW_T3T_NDEF_DETECT_EVT, /* NDEF detection complete */ 84 RW_T3T_PRESENCE_CHECK_EVT, /* Response to RW_T3tPresenceCheck */ 85 RW_T3T_POLL_EVT, /* Response to RW_T3tPoll */ 86 RW_T3T_GET_SYSTEM_CODES_EVT, /* Response to RW_T3tGetSystemCodes */ 87 RW_T3T_FORMAT_CPLT_EVT, /* Tag Formated (Felica-Lite only) */ 88 RW_T3T_SET_READ_ONLY_CPLT_EVT, /* Tag is set as Read only */ 89 RW_T3T_INTF_ERROR_EVT, /* RF Interface error event */ 90 RW_T3T_MAX_EVT, 91 92 /* Type 4 tag events for tRW_CBACK */ 93 RW_T4T_NDEF_DETECT_EVT = 94 RW_T4T_FIRST_EVT, /* Result of NDEF detection procedure */ 95 /* Mandatory NDEF file is selected */ 96 RW_T4T_NDEF_READ_EVT, /* Segment of data received from type 4 tag */ 97 RW_T4T_NDEF_READ_CPLT_EVT, /* Read operation completed */ 98 RW_T4T_NDEF_READ_FAIL_EVT, /* Read operation failed */ 99 RW_T4T_NDEF_UPDATE_CPLT_EVT, /* Update operation completed */ 100 RW_T4T_NDEF_UPDATE_FAIL_EVT, /* Update operation failed */ 101 RW_T4T_SET_TO_RO_EVT, /* Tag is set as read only */ 102 RW_T4T_PRESENCE_CHECK_EVT, /* Response to RW_T4tPresenceCheck */ 103 RW_T4T_RAW_FRAME_EVT, /* Response of raw frame sent */ 104 RW_T4T_INTF_ERROR_EVT, /* RF Interface error event */ 105 RW_T4T_NDEF_FORMAT_CPLT_EVT, /* Format operation completed */ 106 RW_T4T_MAX_EVT, 107 108 /* ISO 15693 tag events for tRW_CBACK */ 109 RW_I93_NDEF_DETECT_EVT = 110 RW_I93_FIRST_EVT, /* Result of NDEF detection procedure */ 111 RW_I93_NDEF_READ_EVT, /* Segment of data received from tag */ 112 RW_I93_NDEF_READ_CPLT_EVT, /* Read operation completed */ 113 RW_I93_NDEF_READ_FAIL_EVT, /* Read operation failed */ 114 RW_I93_NDEF_UPDATE_CPLT_EVT, /* Update operation completed */ 115 RW_I93_NDEF_UPDATE_FAIL_EVT, /* Update operation failed */ 116 RW_I93_FORMAT_CPLT_EVT, /* Format procedure complete */ 117 RW_I93_SET_TAG_RO_EVT, /* Set read-only procedure complete */ 118 RW_I93_INVENTORY_EVT, /* Response of Inventory */ 119 RW_I93_DATA_EVT, /* Response of Read, Get Multi Security */ 120 RW_I93_SYS_INFO_EVT, /* Response of System Information */ 121 RW_I93_CMD_CMPL_EVT, /* Command complete */ 122 RW_I93_PRESENCE_CHECK_EVT, /* Response to RW_I93PresenceCheck */ 123 RW_I93_RAW_FRAME_EVT, /* Response of raw frame sent */ 124 RW_I93_INTF_ERROR_EVT, /* RF Interface error event */ 125 RW_I93_MAX_EVT 126}; 127 128#define RW_RAW_FRAME_EVT 0xFF 129 130typedef uint8_t tRW_EVENT; 131 132/* Tag is read only */ 133#define RW_NDEF_FL_READ_ONLY 0x01 134/* Tag formated for NDEF */ 135#define RW_NDEF_FL_FORMATED 0x02 136/* NDEF supported by the tag */ 137#define RW_NDEF_FL_SUPPORTED 0x04 138/* Unable to find if tag is ndef capable/formated/read only */ 139#define RW_NDEF_FL_UNKNOWN 0x08 140/* Tag supports format operation */ 141#define RW_NDEF_FL_FORMATABLE 0x10 142/* Tag can be soft locked */ 143#define RW_NDEF_FL_SOFT_LOCKABLE 0x20 144/* Tag can be hard locked */ 145#define RW_NDEF_FL_HARD_LOCKABLE 0x40 146/* Tag is one time programmable */ 147#define RW_NDEF_FL_OTP 0x80 148 149typedef uint8_t tRW_NDEF_FLAG; 150 151/* options for RW_T4tPresenceCheck */ 152#define RW_T4T_CHK_READ_BINARY_CH0 0 153#define RW_T4T_CHK_READ_BINARY_CH3 3 154#define RW_T4T_CHK_EMPTY_I_BLOCK 4 155#define RW_T4T_CHK_ISO_DEP_NAK_PRES_CHK 5 156 157typedef struct { 158 tNFC_STATUS status; 159 uint16_t msg_len; /* Length of the NDEF message */ 160} tRW_T2T_DETECT; 161 162typedef struct { 163 tNFC_STATUS status; /* Status of the POLL request */ 164 uint8_t rc; /* RC (request code) used in the POLL request */ 165 uint8_t response_num; /* Number of SENSF_RES responses */ 166 uint8_t response_bufsize; /* Size of SENSF_RES responses */ 167 uint8_t* response_buf; /* Buffer of responses (length + SENSF_RES) see 168 $8.1.2.2 of NCI specs */ 169} tRW_T3T_POLL; 170 171typedef struct { 172 tNFC_STATUS status; /* Status of the Get System Codes request */ 173 uint8_t num_system_codes; /* Number of system codes */ 174 uint16_t* p_system_codes; /* Table of system codes */ 175} tRW_T3T_SYSTEM_CODES; 176 177typedef struct { 178 tNFC_STATUS status; /* status of NDEF detection */ 179 tNFC_PROTOCOL protocol; /* protocol used to detect NDEF */ 180 uint32_t max_size; /* max number of bytes available for NDEF data */ 181 uint32_t cur_size; /* current size of stored NDEF data (in bytes) */ 182 tRW_NDEF_FLAG 183 flags; /* Flags to indicate NDEF capability,formated,formatable and read 184 only */ 185} tRW_DETECT_NDEF_DATA; 186 187typedef struct { 188 tNFC_STATUS status; /* status of NDEF detection */ 189 tNFC_PROTOCOL protocol; /* protocol used to detect TLV */ 190 uint8_t 191 num_bytes; /* number of reserved/lock bytes based on the type of tlv */ 192} tRW_DETECT_TLV_DATA; 193 194typedef struct { 195 tNFC_STATUS status; 196 NFC_HDR* p_data; 197} tRW_READ_DATA; 198 199typedef struct { 200 tNFC_STATUS status; 201 uint8_t sw1; 202 uint8_t sw2; 203} tRW_T4T_SW; 204 205typedef struct /* RW_I93_INVENTORY_EVT */ 206{ 207 tNFC_STATUS status; /* status of Inventory command */ 208 uint8_t dsfid; /* DSFID */ 209 uint8_t uid[I93_UID_BYTE_LEN]; /* UID[0]:MSB, ... UID[7]:LSB */ 210} tRW_I93_INVENTORY; 211 212typedef struct /* RW_I93_DATA_EVT */ 213{ 214 tNFC_STATUS status; /* status of Read/Get security status command */ 215 uint8_t command; /* sent command */ 216 NFC_HDR* p_data; /* block data of security status */ 217} tRW_I93_DATA; 218 219typedef struct /* RW_I93_SYS_INFO_EVT */ 220{ 221 tNFC_STATUS status; /* status of Get Sys Info command */ 222 uint8_t info_flags; /* information flags */ 223 uint8_t uid[I93_UID_BYTE_LEN]; /* UID[0]:MSB, ... UID[7]:LSB */ 224 uint8_t dsfid; /* DSFID if I93_INFO_FLAG_DSFID */ 225 uint8_t afi; /* AFI if I93_INFO_FLAG_AFI */ 226 uint16_t num_block; /* number of blocks if I93_INFO_FLAG_MEM_SIZE */ 227 uint8_t block_size; /* block size in byte if I93_INFO_FLAG_MEM_SIZE */ 228 uint8_t IC_reference; /* IC Reference if I93_INFO_FLAG_IC_REF */ 229} tRW_I93_SYS_INFO; 230 231typedef struct /* RW_I93_CMD_CMPL_EVT */ 232{ 233 tNFC_STATUS status; /* status of sent command */ 234 uint8_t command; /* sent command */ 235 uint8_t error_code; /* error code; I93_ERROR_CODE_XXX */ 236} tRW_I93_CMD_CMPL; 237 238typedef struct { 239 tNFC_STATUS status; 240 NFC_HDR* p_data; 241} tRW_RAW_FRAME; 242 243typedef union { 244 tNFC_STATUS status; 245 tRW_T3T_POLL t3t_poll; /* Response to t3t poll command */ 246 tRW_T3T_SYSTEM_CODES t3t_sc; /* Received system codes from t3 tag */ 247 tRW_DETECT_TLV_DATA tlv; /* The information of detected TLV data */ 248 tRW_DETECT_NDEF_DATA ndef; /* The information of detected NDEF data */ 249 tRW_READ_DATA data; /* The received data from a tag */ 250 tRW_RAW_FRAME raw_frame; /* Response of raw frame sent */ 251 tRW_T4T_SW t4t_sw; /* Received status words from a tag */ 252 tRW_I93_INVENTORY i93_inventory; /* ISO 15693 Inventory response */ 253 tRW_I93_DATA i93_data; /* ISO 15693 Data response */ 254 tRW_I93_SYS_INFO i93_sys_info; /* ISO 15693 System Information */ 255 tRW_I93_CMD_CMPL i93_cmd_cmpl; /* ISO 15693 Command complete */ 256} tRW_DATA; 257 258typedef void(tRW_CBACK)(tRW_EVENT event, tRW_DATA* p_data); 259 260/******************************************************************************* 261** 262** Function RW_T1tRid 263** 264** Description This function send a RID command for Reader/Writer mode. 265** 266** Returns tNFC_STATUS 267** 268*******************************************************************************/ 269extern tNFC_STATUS RW_T1tRid(void); 270 271/******************************************************************************* 272** 273** Function RW_T1tReadAll 274** 275** Description This function send a RALL command for Reader/Writer mode. 276** 277** Returns tNFC_STATUS 278** 279*******************************************************************************/ 280extern tNFC_STATUS RW_T1tReadAll(void); 281 282/******************************************************************************* 283** 284** Function RW_T1tRead 285** 286** Description This function send a READ command for Reader/Writer mode. 287** 288** Returns tNFC_STATUS 289** 290*******************************************************************************/ 291extern tNFC_STATUS RW_T1tRead(uint8_t block, uint8_t byte); 292 293/******************************************************************************* 294** 295** Function RW_T1tWriteErase 296** 297** Description This function send a WRITE-E command for Reader/Writer mode. 298** 299** Returns tNFC_STATUS 300** 301*******************************************************************************/ 302extern tNFC_STATUS RW_T1tWriteErase(uint8_t block, uint8_t byte, 303 uint8_t new_byte); 304 305/******************************************************************************* 306** 307** Function RW_T1tWriteNoErase 308** 309** Description This function send a WRITE-NE command for Reader/Writer 310** mode. 311** 312** Returns tNFC_STATUS 313** 314*******************************************************************************/ 315extern tNFC_STATUS RW_T1tWriteNoErase(uint8_t block, uint8_t byte, 316 uint8_t new_byte); 317 318/******************************************************************************* 319** 320** Function RW_T1tReadSeg 321** 322** Description This function send a RSEG command for Reader/Writer mode. 323** 324** Returns tNFC_STATUS 325** 326*******************************************************************************/ 327extern tNFC_STATUS RW_T1tReadSeg(uint8_t segment); 328 329/******************************************************************************* 330** 331** Function RW_T1tRead8 332** 333** Description This function send a READ8 command for Reader/Writer mode. 334** 335** Returns tNFC_STATUS 336** 337*******************************************************************************/ 338extern tNFC_STATUS RW_T1tRead8(uint8_t block); 339 340/******************************************************************************* 341** 342** Function RW_T1tWriteErase8 343** 344** Description This function send a WRITE-E8 command for Reader/Writer 345** mode. 346** 347** Returns tNFC_STATUS 348** 349*******************************************************************************/ 350extern tNFC_STATUS RW_T1tWriteErase8(uint8_t block, uint8_t* p_new_dat); 351 352/******************************************************************************* 353** 354** Function RW_T1tWriteNoErase8 355** 356** Description This function send a WRITE-NE8 command for Reader/Writer 357** mode. 358** 359** Returns tNFC_STATUS 360** 361*******************************************************************************/ 362extern tNFC_STATUS RW_T1tWriteNoErase8(uint8_t block, uint8_t* p_new_dat); 363 364/******************************************************************************* 365** 366** Function RW_T1tLocateTlv 367** 368** Description This function is called to find the start of the given TLV 369** 370** Parameters: void 371** 372** Returns NCI_STATUS_OK, if detection was started. Otherwise, error 373** status. 374** 375*******************************************************************************/ 376extern tNFC_STATUS RW_T1tLocateTlv(uint8_t tlv_type); 377 378/******************************************************************************* 379** 380** Function RW_T1tDetectNDef 381** 382** Description This function can be called to detect if there is an NDEF 383** message on the tag. 384** 385** Parameters: void 386** 387** Returns NCI_STATUS_OK, if detection was started. Otherwise, error 388** status. 389** 390*******************************************************************************/ 391extern tNFC_STATUS RW_T1tDetectNDef(void); 392 393/******************************************************************************* 394** 395** Function RW_T1tReadNDef 396** 397** Description This function can be called to read the NDEF message on the 398** tag. 399** 400** Parameters: p_buffer: The buffer into which to read the NDEF message 401** buf_len: The length of the buffer 402** 403** Returns NCI_STATUS_OK, if read was started. Otherwise, error status. 404** 405*******************************************************************************/ 406extern tNFC_STATUS RW_T1tReadNDef(uint8_t* p_buffer, uint16_t buf_len); 407 408/******************************************************************************* 409** 410** Function RW_T1tWriteNDef 411** 412** Description This function can be called to write an NDEF message to the 413** tag. 414** 415** Parameters: msg_len: The length of the buffer 416** p_msg: The NDEF message to write 417** 418** Returns NCI_STATUS_OK, if write was started. Otherwise, error 419** status. 420** 421*******************************************************************************/ 422extern tNFC_STATUS RW_T1tWriteNDef(uint16_t msg_len, uint8_t* p_msg); 423 424/******************************************************************************* 425** 426** Function RW_T1tSetTagReadOnly 427** 428** Description This function can be called to set the tag in to read only 429** state 430** 431** Parameters: b_hard_lock: To hard lock or just soft lock the tag 432** 433** Returns NCI_STATUS_OK, if set readonly operation started. 434** Otherwise, error status. 435** 436*******************************************************************************/ 437extern tNFC_STATUS RW_T1tSetTagReadOnly(bool b_hard_lock); 438 439/***************************************************************************** 440** 441** Function RW_T1tPresenceCheck 442** 443** Description 444** Check if the tag is still in the field. 445** 446** The RW_T1T_PRESENCE_CHECK_EVT w/ status is used to indicate presence 447** or non-presence. 448** 449** Returns 450** NFC_STATUS_OK, if raw data frame sent 451** NFC_STATUS_NO_BUFFERS: unable to allocate a buffer for this operation 452** NFC_STATUS_FAILED: other error 453** 454*****************************************************************************/ 455extern tNFC_STATUS RW_T1tPresenceCheck(void); 456 457/***************************************************************************** 458** 459** Function RW_T1tFormatNDef 460** 461** Description 462** Format Tag content 463** 464** Returns 465** NFC_STATUS_OK, Command sent to format Tag 466** NFC_STATUS_REJECTED: Invalid HR0 and cannot format the tag 467** NFC_STATUS_FAILED: other error 468** 469*****************************************************************************/ 470tNFC_STATUS RW_T1tFormatNDef(void); 471 472/******************************************************************************* 473** 474** Function RW_T2tLocateTlv 475** 476** Description This function is called to find the start of the given TLV 477** 478** Returns Pointer to the TLV, if successful. Otherwise, NULL. 479** 480*******************************************************************************/ 481extern tNFC_STATUS RW_T2tLocateTlv(uint8_t tlv_type); 482 483/******************************************************************************* 484** 485** Function RW_T2tRead 486** 487** Description This function issues the Type 2 Tag READ command. When the 488** operation is complete the callback function will be called 489** with a RW_T2T_READ_EVT. 490** 491** Returns tNFC_STATUS 492** 493*******************************************************************************/ 494extern tNFC_STATUS RW_T2tRead(uint16_t block); 495 496/******************************************************************************* 497** 498** Function RW_T2tWrite 499** 500** Description This function issues the Type 2 Tag WRITE command. When the 501** operation is complete the callback function will be called 502** with a RW_T2T_WRITE_EVT. 503** 504** p_write_data points to the array of 4 bytes to be written 505** 506** Returns tNFC_STATUS 507** 508*******************************************************************************/ 509extern tNFC_STATUS RW_T2tWrite(uint16_t block, uint8_t* p_write_data); 510 511/******************************************************************************* 512** 513** Function RW_T2tSectorSelect 514** 515** Description This function issues the Type 2 Tag SECTOR-SELECT command 516** packet 1. If a NACK is received as the response, the 517** callback function will be called with a 518** RW_T2T_SECTOR_SELECT_EVT. If an ACK is received as the 519** response, the command packet 2 with the given sector number 520** is sent to the peer device. When the response for packet 2 521** is received, the callback function will be called with a 522** RW_T2T_SECTOR_SELECT_EVT. 523** 524** A sector is 256 contiguous blocks (1024 bytes). 525** 526** Returns tNFC_STATUS 527** 528*******************************************************************************/ 529extern tNFC_STATUS RW_T2tSectorSelect(uint8_t sector); 530 531/******************************************************************************* 532** 533** Function RW_T2tDetectNDef 534** 535** Description This function will find NDEF message if any in the Tag 536** 537** Returns tNFC_STATUS 538** 539*******************************************************************************/ 540extern tNFC_STATUS RW_T2tDetectNDef(bool skip_dyn_locks); 541 542/******************************************************************************* 543** 544** Function RW_T2tReadNDef 545** 546** Description This function can be called to read the NDEF message on the 547** tag. 548** 549** Parameters: p_buffer: The buffer into which to read the NDEF message 550** buf_len: The length of the buffer 551** 552** Returns NCI_STATUS_OK, if read was started. Otherwise, error status. 553** 554*******************************************************************************/ 555extern tNFC_STATUS RW_T2tReadNDef(uint8_t* p_buffer, uint16_t buf_len); 556 557/******************************************************************************* 558** 559** Function RW_T2tWriteNDef 560** 561** Description This function can be called to write an NDEF message to the 562** tag. 563** 564** Parameters: msg_len: The length of the buffer 565** p_msg: The NDEF message to write 566** 567** Returns NCI_STATUS_OK, if write was started. Otherwise, error 568** status. 569** 570*******************************************************************************/ 571extern tNFC_STATUS RW_T2tWriteNDef(uint16_t msg_len, uint8_t* p_msg); 572 573/******************************************************************************* 574** 575** Function RW_T2tSetTagReadOnly 576** 577** Description This function can be called to set the tag in to read only 578** state 579** 580** Parameters: b_hard_lock: To indicate hard lock the tag or not 581** 582** Returns NCI_STATUS_OK, if set readonly operation started. 583** Otherwise, error status. 584** 585*******************************************************************************/ 586extern tNFC_STATUS RW_T2tSetTagReadOnly(bool b_hard_lock); 587 588/***************************************************************************** 589** 590** Function RW_T2tPresenceCheck 591** 592** Description 593** Check if the tag is still in the field. 594** 595** The RW_T2T_PRESENCE_CHECK_EVT w/ status is used to indicate presence 596** or non-presence. 597** 598** Returns 599** NFC_STATUS_OK, if raw data frame sent 600** NFC_STATUS_NO_BUFFERS: unable to allocate a buffer for this operation 601** NFC_STATUS_FAILED: other error 602** 603*****************************************************************************/ 604extern tNFC_STATUS RW_T2tPresenceCheck(void); 605 606/***************************************************************************** 607** 608** Function RW_T2tFormatNDef 609** 610** Description 611** Format Tag content 612** 613** Returns 614** NFC_STATUS_OK, Command sent to format Tag 615** NFC_STATUS_FAILED: otherwise 616** 617*****************************************************************************/ 618tNFC_STATUS RW_T2tFormatNDef(void); 619 620/***************************************************************************** 621** 622** Function RW_T3tDetectNDef 623** 624** Description 625** This function is used to perform NDEF detection on a Type 3 tag, and 626** retrieve the tag's NDEF attribute information (block 0). 627** 628** Before using this API, the application must call RW_SelectTagType to 629** indicate that a Type 3 tag has been activated, and to provide the 630** tag's Manufacture ID (IDm) . 631** 632** Returns 633** NFC_STATUS_OK: ndef detection procedure started 634** NFC_STATUS_NO_BUFFERS: unable to allocate a buffer for this operation 635** NFC_STATUS_FAILED: other error 636** 637*****************************************************************************/ 638extern tNFC_STATUS RW_T3tDetectNDef(void); 639 640/***************************************************************************** 641** 642** Function RW_T3tFormatNDef 643** 644** Description 645** Format a type-3 tag for NDEF. 646** 647** Only Felica-Lite tags are supported by this API. The 648** RW_T3T_FORMAT_CPLT_EVT is used to notify the status of the operation. 649** 650** Returns 651** NFC_STATUS_OK: ndef detection procedure started 652** NFC_STATUS_NO_BUFFERS: unable to allocate a buffer for this operation 653** NFC_STATUS_FAILED: other error 654** 655*****************************************************************************/ 656extern tNFC_STATUS RW_T3tFormatNDef(void); 657 658/***************************************************************************** 659** 660** Function RW_T3tSetReadOnly 661** 662** Description 663** Set a type-3 tag to Read Only 664** 665** Only Felica-Lite tags are supported by this API. 666** RW_T3tDetectNDef() must be called before using this 667** The RW_T3T_SET_READ_ONLY_CPLT_EVT event will be returned. 668** 669** Returns 670** NFC_STATUS_OK if success 671** NFC_STATUS_FAILED if T3T is busy or other error 672** 673*****************************************************************************/ 674extern tNFC_STATUS RW_T3tSetReadOnly(bool b_hard_lock); 675 676/***************************************************************************** 677** 678** Function RW_T3tCheckNDef 679** 680** Description 681** Retrieve NDEF contents from a Type3 tag. 682** 683** The RW_T3T_CHECK_EVT event is used to notify the application for each 684** segment of NDEF data received. The RW_T3T_CHECK_CPLT_EVT event is used 685** to notify the application all segments have been received. 686** 687** Before using this API, the RW_T3tDetectNDef function must be called to 688** verify that the tag contains NDEF data, and to retrieve the NDEF 689** attributes. 690** 691** Internally, this command will be separated into multiple Tag 3 Check 692** commands (if necessary) - depending on the tag's Nbr (max number of 693** blocks per read) attribute. 694** 695** Returns 696** NFC_STATUS_OK: check command started 697** NFC_STATUS_NO_BUFFERS: unable to allocate a buffer for this operation 698** NFC_STATUS_FAILED: other error 699** 700*****************************************************************************/ 701extern tNFC_STATUS RW_T3tCheckNDef(void); 702 703/***************************************************************************** 704** 705** Function RW_T3tUpdateNDef 706** 707** Description 708** Write NDEF contents to a Type3 tag. 709** 710** The RW_T3T_UPDATE_CPLT_EVT callback event will be used to notify the 711** application of the response. 712** 713** Before using this API, the RW_T3tDetectNDef function must be called to 714** verify that the tag contains NDEF data, and to retrieve the NDEF 715** attributes. 716** 717** Internally, this command will be separated into multiple Tag 3 Update 718** commands (if necessary) - depending on the tag's Nbw (max number of 719** blocks per write) attribute. 720** 721** Returns 722** NFC_STATUS_OK: check command started 723** NFC_STATUS_NO_BUFFERS: unable to allocate a buffer for this operation 724** NFC_STATUS_REFUSED: tag is read-only 725** NFC_STATUS_BUFFER_FULL: len exceeds tag's maximum size 726** NFC_STATUS_FAILED: other error 727** 728*****************************************************************************/ 729extern tNFC_STATUS RW_T3tUpdateNDef(uint32_t len, uint8_t* p_data); 730 731/***************************************************************************** 732** 733** Function RW_T3tCheck 734** 735** Description 736** Read (non-NDEF) contents from a Type3 tag. 737** 738** The RW_READ_EVT event is used to notify the application for each 739** segment of NDEF data received. The RW_READ_CPLT_EVT event is used to 740** notify the application all segments have been received. 741** 742** Before using this API, the application must call RW_SelectTagType to 743** indicate that a Type 3 tag has been activated, and to provide the 744** tag's Manufacture ID (IDm) . 745** 746** Returns 747** NFC_STATUS_OK: check command started 748** NFC_STATUS_NO_BUFFERS: unable to allocate a buffer for this operation 749** NFC_STATUS_FAILED: other error 750** 751*****************************************************************************/ 752extern tNFC_STATUS RW_T3tCheck(uint8_t num_blocks, tT3T_BLOCK_DESC* t3t_blocks); 753 754/***************************************************************************** 755** 756** Function RW_T3tUpdate 757** 758** Description 759** Write (non-NDEF) contents to a Type3 tag. 760** 761** The RW_WRITE_CPLT_EVT event is used to notify the application all 762** segments have been received. 763** 764** Before using this API, the application must call RW_SelectTagType to 765** indicate that a Type 3 tag has been activated, and to provide the tag's 766** Manufacture ID (IDm) . 767** 768** Returns 769** NFC_STATUS_OK: check command started 770** NFC_STATUS_NO_BUFFERS: unable to allocate a buffer for this operation 771** NFC_STATUS_FAILED: other error 772** 773*****************************************************************************/ 774extern tNFC_STATUS RW_T3tUpdate(uint8_t num_blocks, tT3T_BLOCK_DESC* t3t_blocks, 775 uint8_t* p_data); 776 777/***************************************************************************** 778** 779** Function RW_T3tSendRawFrame 780** 781** Description 782** This function is called to send a raw data frame to the peer device. 783** When type 3 tag receives response from peer, the callback function 784** will be called with a RW_T3T_RAW_FRAME_EVT [Table 6]. 785** 786** Before using this API, the application must call RW_SelectTagType to 787** indicate that a Type 3 tag has been activated. 788** 789** The raw frame should be a properly formatted Type 3 tag message. 790** 791** Returns 792** NFC_STATUS_OK, if raw data frame sent 793** NFC_STATUS_NO_BUFFERS: unable to allocate a buffer for this operation 794** NFC_STATUS_FAILED: other error 795** 796*****************************************************************************/ 797extern tNFC_STATUS RW_T3tSendRawFrame(uint16_t len, uint8_t* p_data); 798 799/***************************************************************************** 800** 801** Function RW_T3tPoll 802** 803** Description 804** Send POLL command 805** 806** Returns 807** NFC_STATUS_OK, if raw data frame sent 808** NFC_STATUS_NO_BUFFERS: unable to allocate a buffer for this operation 809** NFC_STATUS_FAILED: other error 810** 811*****************************************************************************/ 812extern tNFC_STATUS RW_T3tPoll(uint16_t system_code, tT3T_POLL_RC rc, 813 uint8_t tsn); 814 815/***************************************************************************** 816** 817** Function RW_T3tPresenceCheck 818** 819** Description 820** Check if the tag is still in the field. 821** 822** The RW_T3T_PRESENCE_CHECK_EVT w/ status is used to indicate presence 823** or non-presence. 824** 825** Returns 826** NFC_STATUS_OK, if raw data frame sent 827** NFC_STATUS_NO_BUFFERS: unable to allocate a buffer for this operation 828** NFC_STATUS_FAILED: other error 829** 830*****************************************************************************/ 831extern tNFC_STATUS RW_T3tPresenceCheck(void); 832 833/***************************************************************************** 834** 835** Function RW_T3tGetSystemCodes 836** 837** Description 838** Get systems codes supported by the activated tag: 839** Poll for wildcard (FFFF): 840** - If felica-lite code then poll for ndef (12fc) 841** - Otherwise send RequestSystmCode command to get 842** system codes. 843** 844** Before using this API, the application must call RW_SelectTagType to 845** indicate that a Type 3 tag has been activated. 846** 847** Returns 848** NFC_STATUS_OK, if raw data frame sent 849** NFC_STATUS_NO_BUFFERS: unable to allocate a buffer for this operation 850** NFC_STATUS_FAILED: other error 851** 852*****************************************************************************/ 853extern tNFC_STATUS RW_T3tGetSystemCodes(void); 854 855/***************************************************************************** 856** 857** Function RW_T4tFormatNDef 858** 859** Description 860** Format a type-4 tag for NDEF. 861** 862** Only Desifire tags are supported by this API. The 863** RW_T4T_FORMAT_CPLT_EVT is used to notify the status of the operation. 864** 865** Returns 866** NFC_STATUS_OK: if success 867** NFC_STATUS_FAILED: other error 868*****************************************************************************/ 869extern tNFC_STATUS RW_T4tFormatNDef(void); 870 871/******************************************************************************* 872** 873** Function RW_T4tDetectNDef 874** 875** Description This function performs NDEF detection procedure 876** 877** RW_T4T_NDEF_DETECT_EVT will be returned 878** 879** Returns NFC_STATUS_OK if success 880** NFC_STATUS_FAILED if T4T is busy or other error 881** 882*******************************************************************************/ 883extern tNFC_STATUS RW_T4tDetectNDef(void); 884 885/******************************************************************************* 886** 887** Function RW_T4tReadNDef 888** 889** Description This function performs NDEF read procedure 890** Note: RW_T4tDetectNDef() must be called before using this 891** 892** The following event will be returned 893** RW_T4T_NDEF_READ_EVT for each segmented NDEF message 894** RW_T4T_NDEF_READ_CPLT_EVT for the last segment or 895** complete NDEF 896** RW_T4T_NDEF_READ_FAIL_EVT for failure 897** 898** Returns NFC_STATUS_OK if success 899** NFC_STATUS_FAILED if T4T is busy or other error 900** 901*******************************************************************************/ 902extern tNFC_STATUS RW_T4tReadNDef(void); 903 904/******************************************************************************* 905** 906** Function RW_T4tUpdateNDef 907** 908** Description This function performs NDEF update procedure 909** Note: RW_T4tDetectNDef() must be called before using this 910** Updating data must not be removed until returning 911** event 912** 913** The following event will be returned 914** RW_T4T_NDEF_UPDATE_CPLT_EVT for complete 915** RW_T4T_NDEF_UPDATE_FAIL_EVT for failure 916** 917** Returns NFC_STATUS_OK if success 918** NFC_STATUS_FAILED if T4T is busy or other error 919** 920*******************************************************************************/ 921extern tNFC_STATUS RW_T4tUpdateNDef(uint16_t length, uint8_t* p_data); 922 923/***************************************************************************** 924** 925** Function RW_T4tPresenceCheck 926** 927** Description 928** Check if the tag is still in the field. 929** 930** The RW_T4T_PRESENCE_CHECK_EVT w/ status is used to indicate presence 931** or non-presence. 932** 933** option is RW_T4T_CHK_EMPTY_I_BLOCK, use empty I block for presence 934** check. 935** 936** Returns 937** NFC_STATUS_OK, if raw data frame sent 938** NFC_STATUS_NO_BUFFERS: unable to allocate a buffer for this operation 939** NFC_STATUS_FAILED: other error 940** 941*****************************************************************************/ 942extern tNFC_STATUS RW_T4tPresenceCheck(uint8_t option); 943 944/***************************************************************************** 945** 946** Function RW_T4tSetNDefReadOnly 947** 948** Description This function performs NDEF read-only procedure 949** Note: RW_T4tDetectNDef() must be called before using this 950** 951** The RW_T4T_SET_TO_RO_EVT event will be returned. 952** 953** Returns NFC_STATUS_OK if success 954** NFC_STATUS_FAILED if T4T is busy or other error 955** 956*****************************************************************************/ 957extern tNFC_STATUS RW_T4tSetNDefReadOnly(void); 958 959/******************************************************************************* 960** 961** Function RW_I93Inventory 962** 963** Description This function send Inventory command with/without AFI 964** If UID is provided then set UID[0]:MSB, ... UID[7]:LSB 965** 966** RW_I93_RESPONSE_EVT will be returned 967** 968** Returns NFC_STATUS_OK if success 969** NFC_STATUS_NO_BUFFERS if out of buffer 970** NFC_STATUS_FAILED if T4T is busy or other error 971** 972*******************************************************************************/ 973extern tNFC_STATUS RW_I93Inventory(bool including_afi, uint8_t afi, 974 uint8_t* p_uid); 975 976/******************************************************************************* 977** 978** Function RW_I93StayQuiet 979** 980** Description This function send Inventory command 981** 982** RW_I93_CMD_CMPL_EVT will be returned 983** 984** Returns NFC_STATUS_OK if success 985** NFC_STATUS_NO_BUFFERS if out of buffer 986** NFC_STATUS_BUSY if busy 987** NFC_STATUS_FAILED if other error 988** 989*******************************************************************************/ 990extern tNFC_STATUS RW_I93StayQuiet(void); 991 992/******************************************************************************* 993** 994** Function RW_I93ReadSingleBlock 995** 996** Description This function send Read Single Block command 997** 998** RW_I93_RESPONSE_EVT will be returned 999** 1000** Returns NFC_STATUS_OK if success 1001** NFC_STATUS_NO_BUFFERS if out of buffer 1002** NFC_STATUS_BUSY if busy 1003** NFC_STATUS_FAILED if other error 1004** 1005*******************************************************************************/ 1006extern tNFC_STATUS RW_I93ReadSingleBlock(uint16_t block_number); 1007 1008/******************************************************************************* 1009** 1010** Function RW_I93WriteSingleBlock 1011** 1012** Description This function send Write Single Block command 1013** Application must get block size first by calling 1014** RW_I93GetSysInfo(). 1015** 1016** RW_I93_CMD_CMPL_EVT will be returned 1017** 1018** Returns NFC_STATUS_OK if success 1019** NFC_STATUS_NO_BUFFERS if out of buffer 1020** NFC_STATUS_BUSY if busy 1021** NFC_STATUS_FAILED if other error 1022** 1023*******************************************************************************/ 1024extern tNFC_STATUS RW_I93WriteSingleBlock(uint16_t block_number, 1025 uint8_t* p_data); 1026 1027/******************************************************************************* 1028** 1029** Function RW_I93LockBlock 1030** 1031** Description This function send Lock Block command 1032** 1033** RW_I93_CMD_CMPL_EVT will be returned 1034** 1035** Returns NFC_STATUS_OK if success 1036** NFC_STATUS_NO_BUFFERS if out of buffer 1037** NFC_STATUS_BUSY if busy 1038** NFC_STATUS_FAILED if other error 1039** 1040*******************************************************************************/ 1041extern tNFC_STATUS RW_I93LockBlock(uint8_t block_number); 1042 1043/******************************************************************************* 1044** 1045** Function RW_I93ReadMultipleBlocks 1046** 1047** Description This function send Read Multiple Blocks command 1048** 1049** RW_I93_RESPONSE_EVT will be returned 1050** 1051** Returns NFC_STATUS_OK if success 1052** NFC_STATUS_NO_BUFFERS if out of buffer 1053** NFC_STATUS_BUSY if busy 1054** NFC_STATUS_FAILED if other error 1055** 1056*******************************************************************************/ 1057extern tNFC_STATUS RW_I93ReadMultipleBlocks(uint16_t first_block_number, 1058 uint16_t number_blocks); 1059 1060/******************************************************************************* 1061** 1062** Function RW_I93WriteMultipleBlocks 1063** 1064** Description This function send Write Multiple Blocks command 1065** 1066** RW_I93_CMD_CMPL_EVT will be returned 1067** 1068** Returns NFC_STATUS_OK if success 1069** NFC_STATUS_NO_BUFFERS if out of buffer 1070** NFC_STATUS_BUSY if busy 1071** NFC_STATUS_FAILED if other error 1072** 1073*******************************************************************************/ 1074extern tNFC_STATUS RW_I93WriteMultipleBlocks(uint8_t first_block_number, 1075 uint16_t number_blocks, 1076 uint8_t* p_data); 1077 1078/******************************************************************************* 1079** 1080** Function RW_I93Select 1081** 1082** Description This function send Select command 1083** 1084** UID[0]: 0xE0, MSB 1085** UID[1]: IC Mfg Code 1086** ... 1087** UID[7]: LSB 1088** 1089** RW_I93_CMD_CMPL_EVT will be returned 1090** 1091** Returns NFC_STATUS_OK if success 1092** NFC_STATUS_NO_BUFFERS if out of buffer 1093** NFC_STATUS_BUSY if busy 1094** NFC_STATUS_FAILED if other error 1095** 1096*******************************************************************************/ 1097extern tNFC_STATUS RW_I93Select(uint8_t* p_uid); 1098 1099/******************************************************************************* 1100** 1101** Function RW_I93ResetToReady 1102** 1103** Description This function send Reset To Ready command 1104** 1105** RW_I93_CMD_CMPL_EVT will be returned 1106** 1107** Returns NFC_STATUS_OK if success 1108** NFC_STATUS_NO_BUFFERS if out of buffer 1109** NFC_STATUS_BUSY if busy 1110** NFC_STATUS_FAILED if other error 1111** 1112*******************************************************************************/ 1113extern tNFC_STATUS RW_I93ResetToReady(void); 1114 1115/******************************************************************************* 1116** 1117** Function RW_I93WriteAFI 1118** 1119** Description This function send Write AFI command 1120** 1121** RW_I93_CMD_CMPL_EVT will be returned 1122** 1123** Returns NFC_STATUS_OK if success 1124** NFC_STATUS_NO_BUFFERS if out of buffer 1125** NFC_STATUS_BUSY if busy 1126** NFC_STATUS_FAILED if other error 1127** 1128*******************************************************************************/ 1129extern tNFC_STATUS RW_I93WriteAFI(uint8_t afi); 1130 1131/******************************************************************************* 1132** 1133** Function RW_I93LockAFI 1134** 1135** Description This function send Lock AFI command 1136** 1137** RW_I93_CMD_CMPL_EVT will be returned 1138** 1139** Returns NFC_STATUS_OK if success 1140** NFC_STATUS_NO_BUFFERS if out of buffer 1141** NFC_STATUS_BUSY if busy 1142** NFC_STATUS_FAILED if other error 1143** 1144*******************************************************************************/ 1145extern tNFC_STATUS RW_I93LockAFI(void); 1146 1147/******************************************************************************* 1148** 1149** Function RW_I93WriteDSFID 1150** 1151** Description This function send Write DSFID command 1152** 1153** RW_I93_CMD_CMPL_EVT will be returned 1154** 1155** Returns NFC_STATUS_OK if success 1156** NFC_STATUS_NO_BUFFERS if out of buffer 1157** NFC_STATUS_BUSY if busy 1158** NFC_STATUS_FAILED if other error 1159** 1160*******************************************************************************/ 1161extern tNFC_STATUS RW_I93WriteDSFID(uint8_t dsfid); 1162 1163/******************************************************************************* 1164** 1165** Function RW_I93LockDSFID 1166** 1167** Description This function send Lock DSFID command 1168** 1169** RW_I93_CMD_CMPL_EVT will be returned 1170** 1171** Returns NFC_STATUS_OK if success 1172** NFC_STATUS_NO_BUFFERS if out of buffer 1173** NFC_STATUS_BUSY if busy 1174** NFC_STATUS_FAILED if other error 1175** 1176*******************************************************************************/ 1177extern tNFC_STATUS RW_I93LockDSFID(void); 1178 1179/******************************************************************************* 1180** 1181** Function RW_I93GetSysInfo 1182** 1183** Description This function send Get System Information command 1184** If UID is provided then set UID[0]:MSB, ... UID[7]:LSB 1185** 1186** RW_I93_RESPONSE_EVT will be returned 1187** 1188** Returns NFC_STATUS_OK if success 1189** NFC_STATUS_NO_BUFFERS if out of buffer 1190** NFC_STATUS_BUSY if busy 1191** NFC_STATUS_FAILED if other error 1192** 1193*******************************************************************************/ 1194extern tNFC_STATUS RW_I93GetSysInfo(uint8_t* p_uid); 1195 1196/******************************************************************************* 1197** 1198** Function RW_I93GetMultiBlockSecurityStatus 1199** 1200** Description This function send Get Multiple Block Security Status 1201** command 1202** 1203** RW_I93_RESPONSE_EVT will be returned 1204** 1205** Returns NFC_STATUS_OK if success 1206** NFC_STATUS_NO_BUFFERS if out of buffer 1207** NFC_STATUS_BUSY if busy 1208** NFC_STATUS_FAILED if other error 1209** 1210*******************************************************************************/ 1211extern tNFC_STATUS RW_I93GetMultiBlockSecurityStatus( 1212 uint16_t first_block_number, uint16_t number_blocks); 1213 1214/******************************************************************************* 1215** 1216** Function RW_I93DetectNDef 1217** 1218** Description This function performs NDEF detection procedure 1219** 1220** RW_I93_NDEF_DETECT_EVT will be returned 1221** 1222** Returns NFC_STATUS_OK if success 1223** NFC_STATUS_FAILED if busy or other error 1224** 1225*******************************************************************************/ 1226extern tNFC_STATUS RW_I93DetectNDef(void); 1227 1228/******************************************************************************* 1229** 1230** Function RW_I93ReadNDef 1231** 1232** Description This function performs NDEF read procedure 1233** Note: RW_I93DetectNDef() must be called before using this 1234** 1235** The following event will be returned 1236** RW_I93_NDEF_READ_EVT for each segmented NDEF message 1237** RW_I93_NDEF_READ_CPLT_EVT for the last segment or 1238** complete NDEF 1239** RW_I93_NDEF_READ_FAIL_EVT for failure 1240** 1241** Returns NFC_STATUS_OK if success 1242** NFC_STATUS_FAILED if I93 is busy or other error 1243** 1244*******************************************************************************/ 1245extern tNFC_STATUS RW_I93ReadNDef(void); 1246 1247/******************************************************************************* 1248** 1249** Function RW_I93UpdateNDef 1250** 1251** Description This function performs NDEF update procedure 1252** Note: RW_I93DetectNDef() must be called before using this 1253** Updating data must not be removed until returning 1254** event 1255** 1256** The following event will be returned 1257** RW_I93_NDEF_UPDATE_CPLT_EVT for complete 1258** RW_I93_NDEF_UPDATE_FAIL_EVT for failure 1259** 1260** Returns NFC_STATUS_OK if success 1261** NFC_STATUS_FAILED if I93 is busy or other error 1262** 1263*******************************************************************************/ 1264extern tNFC_STATUS RW_I93UpdateNDef(uint16_t length, uint8_t* p_data); 1265 1266/******************************************************************************* 1267** 1268** Function RW_I93FormatNDef 1269** 1270** Description This function performs formatting procedure 1271** 1272** RW_I93_FORMAT_CPLT_EVT will be returned 1273** 1274** Returns NFC_STATUS_OK if success 1275** NFC_STATUS_FAILED if busy or other error 1276** 1277*******************************************************************************/ 1278extern tNFC_STATUS RW_I93FormatNDef(void); 1279 1280/******************************************************************************* 1281** 1282** Function RW_I93SetTagReadOnly 1283** 1284** Description This function performs NDEF read-only procedure 1285** Note: RW_I93DetectNDef() must be called before using this 1286** Updating data must not be removed until returning 1287** event 1288** 1289** The RW_I93_SET_TAG_RO_EVT event will be returned. 1290** 1291** Returns NFC_STATUS_OK if success 1292** NFC_STATUS_FAILED if I93 is busy or other error 1293** 1294*******************************************************************************/ 1295extern tNFC_STATUS RW_I93SetTagReadOnly(void); 1296 1297/***************************************************************************** 1298** 1299** Function RW_I93PresenceCheck 1300** 1301** Description Check if the tag is still in the field. 1302** 1303** The RW_I93_PRESENCE_CHECK_EVT w/ status is used to indicate 1304** presence or non-presence. 1305** 1306** Returns NFC_STATUS_OK, if raw data frame sent 1307** NFC_STATUS_NO_BUFFERS: unable to allocate a buffer for this 1308** operation 1309** NFC_STATUS_FAILED: other error 1310** 1311*****************************************************************************/ 1312extern tNFC_STATUS RW_I93PresenceCheck(void); 1313 1314/******************************************************************************* 1315** 1316** Function RW_SendRawFrame 1317** 1318** Description This function sends a raw frame to the peer device. 1319** 1320** Returns tNFC_STATUS 1321** 1322*******************************************************************************/ 1323extern tNFC_STATUS RW_SendRawFrame(uint8_t* p_raw_data, uint16_t data_len); 1324 1325/******************************************************************************* 1326** 1327** Function RW_SetActivatedTagType 1328** 1329** Description This function sets tag type for Reader/Writer mode. 1330** 1331** Returns tNFC_STATUS 1332** 1333*******************************************************************************/ 1334extern tNFC_STATUS RW_SetActivatedTagType(tNFC_ACTIVATE_DEVT* p_activate_params, 1335 tRW_CBACK* p_cback); 1336#endif /* RW_API_H */ 1337