Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > f831237475ece7d1519c6812064707d4 > files > 110

libnfc-devel-1.4.2-1.fc14.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>libnfc: pn53x.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">libnfc&#160;<span id="projectnumber">1.4.2</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_fd1c9d0a8b12e3b9059fa72e8f6f49bb.html">libnfc</a>      </li>
      <li class="navelem"><a class="el" href="dir_3b2b72af2a307d568e48660511785be0.html">chips</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<h1>pn53x.h</h1>  </div>
</div>
<div class="contents">
<a href="pn53x_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*-</span>
<a name="l00002"></a>00002 <span class="comment"> * Public platform independent Near Field Communication (NFC) library</span>
<a name="l00003"></a>00003 <span class="comment"> * </span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2009, 2010, Roel Verdult, Romuald Conty</span>
<a name="l00005"></a>00005 <span class="comment"> * </span>
<a name="l00006"></a>00006 <span class="comment"> * This program is free software: you can redistribute it and/or modify it</span>
<a name="l00007"></a>00007 <span class="comment"> * under the terms of the GNU Lesser General Public License as published by the</span>
<a name="l00008"></a>00008 <span class="comment"> * Free Software Foundation, either version 3 of the License, or (at your</span>
<a name="l00009"></a>00009 <span class="comment"> * option) any later version.</span>
<a name="l00010"></a>00010 <span class="comment"> * </span>
<a name="l00011"></a>00011 <span class="comment"> * This program is distributed in the hope that it will be useful, but WITHOUT</span>
<a name="l00012"></a>00012 <span class="comment"> * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or</span>
<a name="l00013"></a>00013 <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for</span>
<a name="l00014"></a>00014 <span class="comment"> * more details.</span>
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> * You should have received a copy of the GNU Lesser General Public License</span>
<a name="l00017"></a>00017 <span class="comment"> * along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;</span>
<a name="l00018"></a>00018 <span class="comment"> */</span>
<a name="l00019"></a>00019 
<a name="l00025"></a>00025 <span class="preprocessor">#ifndef __NFC_CHIPS_PN53X_H__</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#  define __NFC_CHIPS_PN53X_H__</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>
<a name="l00028"></a>00028 <span class="preprocessor">#  include &lt;nfc/nfc-types.h&gt;</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="preprocessor">#  define PN53x_NORMAL_FRAME_MAX_LEN    255</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#  define PN53x_NORMAL_FRAME_OVERHEAD   7</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#  define PN53x_EXTENDED_FRAME_MAX_LEN    264</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#  define PN53x_EXTENDED_FRAME_OVERHEAD   10</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a>00035 <span class="comment">// Registers and symbols masks used to covers parts within a register</span>
<a name="l00036"></a>00036 <span class="preprocessor">#  define REG_CIU_TX_MODE           0x6302</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#  define SYMBOL_TX_CRC_ENABLE      0x80</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="comment">// TX_FRAMING bits explanation:</span>
<a name="l00039"></a>00039 <span class="comment">//   00 : ISO/IEC 14443A/MIFARE and Passive Communication mode 106 kbit/s</span>
<a name="l00040"></a>00040 <span class="comment">//   01 : Active Communication mode</span>
<a name="l00041"></a>00041 <span class="comment">//   10 : FeliCa and Passive Communication mode at 212 kbit/s and 424 kbit/s</span>
<a name="l00042"></a>00042 <span class="comment">//   11 : ISO/IEC 14443B</span>
<a name="l00043"></a>00043 <span class="preprocessor">#  define SYMBOL_TX_FRAMING         0x03</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span>
<a name="l00045"></a>00045 <span class="preprocessor">#  define REG_CIU_RX_MODE           0x6303</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#  define SYMBOL_RX_CRC_ENABLE      0x80</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#  define SYMBOL_RX_NO_ERROR        0x08</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#  define SYMBOL_RX_MULTIPLE        0x04</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="comment">// RX_FRAMING follow same scheme than TX_FRAMING</span>
<a name="l00050"></a>00050 <span class="preprocessor">#  define SYMBOL_RX_FRAMING         0x03</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span>
<a name="l00052"></a>00052 <span class="preprocessor">#  define REG_CIU_TX_AUTO           0x6305</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor">#  define SYMBOL_FORCE_100_ASK      0x40</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#  define SYMBOL_AUTO_WAKE_UP       0x20</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">#  define SYMBOL_INITIAL_RF_ON      0x04</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span>
<a name="l00057"></a>00057 <span class="preprocessor">#  define REG_CIU_MANUAL_RCV        0x630D</span>
<a name="l00058"></a>00058 <span class="preprocessor"></span><span class="preprocessor">#  define SYMBOL_PARITY_DISABLE     0x10</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span>
<a name="l00060"></a>00060 <span class="preprocessor">#  define REG_CIU_STATUS2           0x6338</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#  define SYMBOL_MF_CRYPTO1_ON      0x08</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span>
<a name="l00063"></a>00063 <span class="preprocessor">#  define REG_CIU_CONTROL           0x633C</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor">#  define SYMBOL_INITIATOR          0x10</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">#  define SYMBOL_RX_LAST_BITS       0x07</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span>
<a name="l00067"></a>00067 <span class="preprocessor">#  define REG_CIU_BIT_FRAMING       0x633D</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span><span class="preprocessor">#  define SYMBOL_TX_LAST_BITS       0x07</span>
<a name="l00069"></a>00069 <span class="preprocessor"></span>
<a name="l00070"></a>00070 <span class="comment">// PN53X Support Byte flags</span>
<a name="l00071"></a>00071 <span class="preprocessor">#define SUPPORT_ISO14443A             0x01</span>
<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor">#define SUPPORT_ISO14443B             0x02</span>
<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#define SUPPORT_ISO18092              0x04</span>
<a name="l00074"></a>00074 <span class="preprocessor"></span>
<a name="l00075"></a>00075 <span class="comment">// Internal parameters flags</span>
<a name="l00076"></a>00076 <span class="preprocessor">#  define PARAM_NONE                  0x00</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#  define PARAM_NAD_USED              0x01</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor">#  define PARAM_DID_USED              0x02</span>
<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#  define PARAM_AUTO_ATR_RES          0x04</span>
<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#  define PARAM_AUTO_RATS             0x10</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">#  define PARAM_14443_4_PICC          0x20 </span><span class="comment">/* Only for PN532 */</span>
<a name="l00082"></a>00082 <span class="preprocessor">#  define PARAM_NFC_SECURE            0x20 </span><span class="comment">/* Only for PN533 */</span>
<a name="l00083"></a>00083 <span class="preprocessor">#  define PARAM_NO_AMBLE              0x40 </span><span class="comment">/* Only for PN532 */</span>
<a name="l00084"></a>00084 
<a name="l00085"></a>00085 <span class="comment">// Radio Field Configure Items           // Configuration Data length</span>
<a name="l00086"></a>00086 <span class="preprocessor">#  define RFCI_FIELD                  0x01      //  1</span>
<a name="l00087"></a>00087 <span class="preprocessor"></span><span class="preprocessor">#  define RFCI_TIMING                 0x02      //  3</span>
<a name="l00088"></a>00088 <span class="preprocessor"></span><span class="preprocessor">#  define RFCI_RETRY_DATA             0x04      //  1</span>
<a name="l00089"></a>00089 <span class="preprocessor"></span><span class="preprocessor">#  define RFCI_RETRY_SELECT           0x05      //  3</span>
<a name="l00090"></a>00090 <span class="preprocessor"></span><span class="preprocessor">#  define RFCI_ANALOG_TYPE_A_106      0x0A      // 11</span>
<a name="l00091"></a>00091 <span class="preprocessor"></span><span class="preprocessor">#  define RFCI_ANALOG_TYPE_A_212_424  0x0B      //  8</span>
<a name="l00092"></a>00092 <span class="preprocessor"></span><span class="preprocessor">#  define RFCI_ANALOG_TYPE_B          0x0C      //  3</span>
<a name="l00093"></a>00093 <span class="preprocessor"></span><span class="preprocessor">#  define RFCI_ANALOG_TYPE_14443_4    0x0D      //  9</span>
<a name="l00094"></a>00094 <span class="preprocessor"></span>
<a name="l00095"></a>00095 <span class="comment">/* PN53x specific device-level errors */</span>
<a name="l00096"></a>00096 <span class="preprocessor">#  define DENACK          0x0100</span><span class="comment">/* NACK */</span>
<a name="l00097"></a>00097 <span class="preprocessor">#  define DEACKMISMATCH   0x0200</span><span class="comment">/* Unexpected data */</span>
<a name="l00098"></a>00098 <span class="preprocessor">#  define DEISERRFRAME    0x0300</span><span class="comment">/* Error frame */</span>
<a name="l00099"></a>00099 <span class="preprocessor">#  define DENOTSUP        0x0400</span><span class="comment">/* Not supported */</span>
<a name="l00100"></a>00100 
<a name="l00101"></a>00101 <span class="comment">/* PN53x specific types */</span>
<a name="l00106"></a><a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776">00106</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00108"></a><a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776a1b86f958cc35d323aba6a2b30ef8c41f">00108</a>   <a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776a1b86f958cc35d323aba6a2b30ef8c41f">PM_UNDEFINED</a> = -1,
<a name="l00110"></a><a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776a87b4b5283f2908af4cd6847c98c01af2">00110</a>   <a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776a87b4b5283f2908af4cd6847c98c01af2">PM_ISO14443A_106</a> = 0x00,
<a name="l00112"></a><a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776a3a877f1eddd3f50aa185eb8bc74d8378">00112</a>   <a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776a3a877f1eddd3f50aa185eb8bc74d8378">PM_FELICA_212</a> = 0x01,
<a name="l00114"></a><a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776a0d173fe81bde95eb6a7b9a9e487713bc">00114</a>   <a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776a0d173fe81bde95eb6a7b9a9e487713bc">PM_FELICA_424</a> = 0x02,
<a name="l00116"></a><a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776addf15ec37f6e40fa209a8bd9b8701d8f">00116</a>   <a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776addf15ec37f6e40fa209a8bd9b8701d8f">PM_ISO14443B_106</a> = 0x03, 
<a name="l00118"></a><a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776a3babb4a226cdb7bdc7d594e5d0e43edd">00118</a>   <a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776a3babb4a226cdb7bdc7d594e5d0e43edd">PM_JEWEL_106</a> = 0x04,
<a name="l00120"></a><a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776ae4077ede2dcb630e37cb901ff990af30">00120</a>   <a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776ae4077ede2dcb630e37cb901ff990af30">PM_ISO14443B_212</a> = 0x06,
<a name="l00122"></a><a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776a1413e1b968c815ecb0c2d0082728a412">00122</a>   <a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776a1413e1b968c815ecb0c2d0082728a412">PM_ISO14443B_424</a> = 0x07,
<a name="l00124"></a><a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776a804037230dc6fa23104556a353a89171">00124</a>   <a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776a804037230dc6fa23104556a353a89171">PM_ISO14443B_847</a> = 0x08,
<a name="l00125"></a>00125 } <a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776" title="NFC modulation.">pn53x_modulation_t</a>;
<a name="l00126"></a>00126 
<a name="l00131"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466">00131</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00133"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a4160ac4479fc43554c2ee8d5cd4a3634">00133</a>   <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a4160ac4479fc43554c2ee8d5cd4a3634">PTT_UNDEFINED</a> = -1,
<a name="l00135"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466adb2c6f146643f4c932b44f8446c498d8">00135</a>   <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466adb2c6f146643f4c932b44f8446c498d8">PTT_GENERIC_PASSIVE_106</a> = 0x00,
<a name="l00137"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466ad460942d15dd8f9f13f9b8b61300e256">00137</a>   <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466ad460942d15dd8f9f13f9b8b61300e256">PTT_GENERIC_PASSIVE_212</a> = 0x01,
<a name="l00139"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466abd1ab088c0795e1c12693a3af3412c97">00139</a>   <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466abd1ab088c0795e1c12693a3af3412c97">PTT_GENERIC_PASSIVE_424</a> = 0x02,
<a name="l00141"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a8008f8b52e4135720339f222f3e030e1">00141</a>   <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a8008f8b52e4135720339f222f3e030e1">PTT_ISO14443_4B_106</a> = 0x03,
<a name="l00143"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466ade3d43812066b43894dfb6b56ff310ad">00143</a>   <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466ade3d43812066b43894dfb6b56ff310ad">PTT_JEWEL_106</a> = 0x04,
<a name="l00145"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466accdb2084e55f727e0606e2331f95b89c">00145</a>   <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466accdb2084e55f727e0606e2331f95b89c">PTT_MIFARE</a> = 0x10,
<a name="l00147"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466abc78236f65531c76921196c24c54435d">00147</a>   <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466abc78236f65531c76921196c24c54435d">PTT_FELICA_212</a> = 0x11,
<a name="l00149"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a8390feb26d747b50244522ebe6a0c2ce">00149</a>   <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a8390feb26d747b50244522ebe6a0c2ce">PTT_FELICA_424</a> = 0x12,
<a name="l00151"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a3371859dca06604026affa701f058ce0">00151</a>   <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a3371859dca06604026affa701f058ce0">PTT_ISO14443_4A_106</a> = 0x20,
<a name="l00153"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a9f0e50c8fe0a6c16f44f0cb84d459aad">00153</a>   <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a9f0e50c8fe0a6c16f44f0cb84d459aad">PTT_ISO14443_4B_TCL_106</a> = 0x23,
<a name="l00155"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a92d7ac3b51cda3fd80f8b57c3310cb33">00155</a>   <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a92d7ac3b51cda3fd80f8b57c3310cb33">PTT_DEP_PASSIVE_106</a> = 0x40,
<a name="l00157"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a0f3b0949fdd46d32e1c44015391096a4">00157</a>   <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a0f3b0949fdd46d32e1c44015391096a4">PTT_DEP_PASSIVE_212</a> = 0x41,
<a name="l00159"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a20432d9897721118d43de6478291abb7">00159</a>   <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a20432d9897721118d43de6478291abb7">PTT_DEP_PASSIVE_424</a> = 0x42,
<a name="l00161"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466afe85fbf70502b22ab64188d280361be3">00161</a>   <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466afe85fbf70502b22ab64188d280361be3">PTT_DEP_ACTIVE_106</a> = 0x80,
<a name="l00163"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a0cc8ab2e83d9e8b2cdaaea5ab13c5eb3">00163</a>   <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466a0cc8ab2e83d9e8b2cdaaea5ab13c5eb3">PTT_DEP_ACTIVE_212</a> = 0x81,
<a name="l00165"></a><a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466af4075919ddea2eba0d40a0d0661975bc">00165</a>   <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466af4075919ddea2eba0d40a0d0661975bc">PTT_DEP_ACTIVE_424</a> = 0x82,
<a name="l00166"></a>00166 } <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466" title="NFC target type enumeration.">pn53x_target_type_t</a>;
<a name="l00167"></a>00167 
<a name="l00172"></a><a class="code" href="pn53x_8h.html#a3cf73127b850fc4e506be9d299c1281b">00172</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00174"></a><a class="code" href="pn53x_8h.html#a3cf73127b850fc4e506be9d299c1281ba36bde60d16c940bf3b38b6e8d009a596">00174</a>   <a class="code" href="pn53x_8h.html#a3cf73127b850fc4e506be9d299c1281ba36bde60d16c940bf3b38b6e8d009a596">PTM_NORMAL</a> = 0x00,
<a name="l00176"></a><a class="code" href="pn53x_8h.html#a3cf73127b850fc4e506be9d299c1281ba41cbe6a07c4ed6941dffa9ac481a930d">00176</a>   <a class="code" href="pn53x_8h.html#a3cf73127b850fc4e506be9d299c1281ba41cbe6a07c4ed6941dffa9ac481a930d">PTM_PASSIVE_ONLY</a> = 0x01,
<a name="l00178"></a><a class="code" href="pn53x_8h.html#a3cf73127b850fc4e506be9d299c1281ba61a9d8d0790d0fd09831182223e3c58a">00178</a>   <a class="code" href="pn53x_8h.html#a3cf73127b850fc4e506be9d299c1281ba61a9d8d0790d0fd09831182223e3c58a">PTM_DEP_ONLY</a> = 0x02,
<a name="l00180"></a><a class="code" href="pn53x_8h.html#a3cf73127b850fc4e506be9d299c1281ba166bd41ff2540a09746d7942e4a27f1b">00180</a>   <a class="code" href="pn53x_8h.html#a3cf73127b850fc4e506be9d299c1281ba166bd41ff2540a09746d7942e4a27f1b">PTM_ISO14443_4_PICC_ONLY</a> = 0x04
<a name="l00181"></a>00181 } <a class="code" href="pn53x_8h.html#a3cf73127b850fc4e506be9d299c1281b" title="PN53x target mode enumeration.">pn53x_target_mode_t</a>;
<a name="l00182"></a>00182 
<a name="l00183"></a>00183 <span class="keywordtype">bool</span>  pn53x_init(<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd);
<a name="l00184"></a>00184 <span class="keywordtype">bool</span>    pn53x_check_ack_frame_callback (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <span class="keyword">const</span> byte_t * pbtRxFrame,
<a name="l00185"></a>00185                                                    <span class="keyword">const</span> <span class="keywordtype">size_t</span> szRxFrameLen);
<a name="l00186"></a>00186 <span class="keywordtype">bool</span>    pn53x_check_error_frame_callback (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <span class="keyword">const</span> byte_t * pbtRxFrame,
<a name="l00187"></a>00187                                                      <span class="keyword">const</span> <span class="keywordtype">size_t</span> szRxFrameLen);
<a name="l00188"></a>00188 <span class="keywordtype">bool</span>    pn53x_transceive (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <span class="keyword">const</span> byte_t * pbtTx, <span class="keyword">const</span> <span class="keywordtype">size_t</span> szTx, byte_t * pbtRx,
<a name="l00189"></a>00189                           <span class="keywordtype">size_t</span> * pszRx);
<a name="l00190"></a>00190 <span class="keywordtype">bool</span>    pn53x_get_reg (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, uint16_t ui16Reg, uint8_t * ui8Value);
<a name="l00191"></a>00191 <span class="keywordtype">bool</span>    pn53x_set_reg (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, uint16_t ui16Reg, uint8_t ui8SymbolMask, uint8_t ui8Value);
<a name="l00192"></a>00192 <span class="keywordtype">bool</span>    pn53x_set_parameter (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <span class="keyword">const</span> uint8_t ui8Value, <span class="keyword">const</span> <span class="keywordtype">bool</span> bEnable);
<a name="l00193"></a>00193 <span class="keywordtype">bool</span>    pn53x_set_tx_bits (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <span class="keyword">const</span> uint8_t ui8Bits);
<a name="l00194"></a>00194 <span class="keywordtype">bool</span>    pn53x_wrap_frame (<span class="keyword">const</span> byte_t * pbtTx, <span class="keyword">const</span> <span class="keywordtype">size_t</span> szTxBits, <span class="keyword">const</span> byte_t * pbtTxPar, byte_t * pbtFrame,
<a name="l00195"></a>00195                           <span class="keywordtype">size_t</span> * pszFrameBits);
<a name="l00196"></a>00196 <span class="keywordtype">bool</span>    pn53x_unwrap_frame (<span class="keyword">const</span> byte_t * pbtFrame, <span class="keyword">const</span> <span class="keywordtype">size_t</span> szFrameBits, byte_t * pbtRx, <span class="keywordtype">size_t</span> * pszRxBits,
<a name="l00197"></a>00197                             byte_t * pbtRxPar);
<a name="l00198"></a>00198 <span class="keywordtype">bool</span>    pn53x_decode_target_data (<span class="keyword">const</span> byte_t * pbtRawData, <span class="keywordtype">size_t</span> szRawData,
<a name="l00199"></a>00199                                   nfc_chip_t nc, <a class="code" href="nfc-types_8h.html#a0ba2d4ab603fd8f3f0745cd1f44e9893" title="NFC modulation type enumeration.">nfc_modulation_type_t</a> nmt,
<a name="l00200"></a>00200                                   <a class="code" href="unionnfc__target__info__t.html" title="Union between all kind of tags information structures.">nfc_target_info_t</a> * pnti);
<a name="l00201"></a>00201 <span class="keywordtype">bool</span>    pn53x_get_firmware_version (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <span class="keywordtype">char</span> abtFirmwareText[18]);
<a name="l00202"></a>00202 <span class="keywordtype">bool</span>    pn53x_configure (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <span class="keyword">const</span> <a class="code" href="nfc-types_8h.html#ab2cdef5e5ac453e9c60c9fe449cb311e" title="NFC device option.">nfc_device_option_t</a> ndo, <span class="keyword">const</span> <span class="keywordtype">bool</span> bEnable);
<a name="l00203"></a>00203 
<a name="l00204"></a>00204 <span class="comment">// NFC device as Initiator functions</span>
<a name="l00205"></a>00205 <span class="keywordtype">bool</span>    pn53x_initiator_select_passive_target (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd,
<a name="l00206"></a>00206                                                <span class="keyword">const</span> <a class="code" href="structnfc__modulation__t.html" title="NFC modulation structure.">nfc_modulation_t</a> nm,
<a name="l00207"></a>00207                                                <span class="keyword">const</span> byte_t * pbtInitData, <span class="keyword">const</span> <span class="keywordtype">size_t</span> szInitData,
<a name="l00208"></a>00208                                                <a class="code" href="structnfc__target__t.html" title="NFC target structure.">nfc_target_t</a> * pnt);
<a name="l00209"></a>00209 <span class="keywordtype">bool</span>    pn53x_initiator_poll_targets (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd,
<a name="l00210"></a>00210                                       <span class="keyword">const</span> <a class="code" href="structnfc__modulation__t.html" title="NFC modulation structure.">nfc_modulation_t</a> * pnmModulations, <span class="keyword">const</span> <span class="keywordtype">size_t</span> szModulations,
<a name="l00211"></a>00211                                       <span class="keyword">const</span> byte_t btPollNr, <span class="keyword">const</span> byte_t btPeriod,
<a name="l00212"></a>00212                                       <a class="code" href="structnfc__target__t.html" title="NFC target structure.">nfc_target_t</a> * pntTargets, <span class="keywordtype">size_t</span> * pszTargetFound);
<a name="l00213"></a>00213 <span class="keywordtype">bool</span>    pn53x_initiator_select_dep_target (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd,
<a name="l00214"></a>00214                                            <span class="keyword">const</span> <a class="code" href="nfc-types_8h.html#a0403437f90b1c17f0177fc26c1f4e0fc" title="NFC D.E.P. (Data Exchange Protocol) active/passive mode.">nfc_dep_mode_t</a> ndm, <span class="keyword">const</span> <a class="code" href="nfc-types_8h.html#ae9d7b01916fb677e7c0ad1de171b1fdd" title="NFC baud rate enumeration.">nfc_baud_rate_t</a> nbr,
<a name="l00215"></a>00215                                            <span class="keyword">const</span> <a class="code" href="structnfc__dep__info__t.html" title="NFC target information in D.E.P. (Data Exchange Protocol) see ISO/IEC 18092 (NFCIP-1)">nfc_dep_info_t</a> * pndiInitiator, 
<a name="l00216"></a>00216                                            <a class="code" href="structnfc__target__t.html" title="NFC target structure.">nfc_target_t</a> * pnt);
<a name="l00217"></a>00217 <span class="keywordtype">bool</span>    pn53x_initiator_transceive_bits (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <span class="keyword">const</span> byte_t * pbtTx, <span class="keyword">const</span> <span class="keywordtype">size_t</span> szTxBits,
<a name="l00218"></a>00218                                          <span class="keyword">const</span> byte_t * pbtTxPar, byte_t * pbtRx, <span class="keywordtype">size_t</span> * pszRxBits,
<a name="l00219"></a>00219                                          byte_t * pbtRxPar);
<a name="l00220"></a>00220 <span class="keywordtype">bool</span>    pn53x_initiator_transceive_bytes (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <span class="keyword">const</span> byte_t * pbtTx, <span class="keyword">const</span> <span class="keywordtype">size_t</span> szTx,
<a name="l00221"></a>00221                                           byte_t * pbtRx, <span class="keywordtype">size_t</span> * pszRx);
<a name="l00222"></a>00222 <span class="comment">// NFC device as Target functions</span>
<a name="l00223"></a>00223 <span class="keywordtype">bool</span>    pn53x_target_init (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <a class="code" href="structnfc__target__t.html" title="NFC target structure.">nfc_target_t</a> * pnt, byte_t * pbtRx, <span class="keywordtype">size_t</span> * pszRx);
<a name="l00224"></a>00224 <span class="keywordtype">bool</span>    pn53x_target_receive_bits (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, byte_t * pbtRx, <span class="keywordtype">size_t</span> * pszRxBits, byte_t * pbtRxPar);
<a name="l00225"></a>00225 <span class="keywordtype">bool</span>    pn53x_target_receive_bytes (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, byte_t * pbtRx, <span class="keywordtype">size_t</span> * pszRx);
<a name="l00226"></a>00226 <span class="keywordtype">bool</span>    pn53x_target_send_bits (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <span class="keyword">const</span> byte_t * pbtTx, <span class="keyword">const</span> <span class="keywordtype">size_t</span> szTxBits,
<a name="l00227"></a>00227                                 <span class="keyword">const</span> byte_t * pbtTxPar);
<a name="l00228"></a>00228 <span class="keywordtype">bool</span>    pn53x_target_send_bytes (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <span class="keyword">const</span> byte_t * pbtTx, <span class="keyword">const</span> <span class="keywordtype">size_t</span> szTx);
<a name="l00229"></a>00229 <span class="comment">// Error handling functions</span>
<a name="l00230"></a>00230 <span class="keyword">const</span> <span class="keywordtype">char</span> *pn53x_strerror (<span class="keyword">const</span> <a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd);
<a name="l00231"></a>00231 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">struct </span><a class="code" href="structchip__callbacks.html" title="Functions for chip specific functions.">chip_callbacks</a> pn53x_callbacks_list = {
<a name="l00232"></a>00232   pn53x_strerror
<a name="l00233"></a>00233 };
<a name="l00234"></a>00234 
<a name="l00235"></a>00235 <span class="comment">// C wrappers for PN53x commands</span>
<a name="l00236"></a>00236 <span class="keywordtype">bool</span>    pn53x_SetParameters (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <span class="keyword">const</span> uint8_t ui8Value);
<a name="l00237"></a>00237 <span class="keywordtype">bool</span>    pn53x_InListPassiveTarget (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <span class="keyword">const</span> <a class="code" href="pn53x_8h.html#aeb3b53b6b1712facea7649bcc8c70776" title="NFC modulation.">pn53x_modulation_t</a> pmInitModulation,
<a name="l00238"></a>00238                                    <span class="keyword">const</span> byte_t szMaxTargets, <span class="keyword">const</span> byte_t * pbtInitiatorData,
<a name="l00239"></a>00239                                    <span class="keyword">const</span> <span class="keywordtype">size_t</span> szInitiatorDataLen, byte_t * pbtTargetsData, <span class="keywordtype">size_t</span> * pszTargetsData);
<a name="l00240"></a>00240 <span class="keywordtype">bool</span>    pn53x_InDeselect (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <span class="keyword">const</span> uint8_t ui8Target);
<a name="l00241"></a>00241 <span class="keywordtype">bool</span>    pn53x_InRelease (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <span class="keyword">const</span> uint8_t ui8Target);
<a name="l00242"></a>00242 <span class="keywordtype">bool</span>    pn53x_InAutoPoll (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <span class="keyword">const</span> <a class="code" href="pn53x_8h.html#a6cbb381a7ee7dbc59d0c6627cca12466" title="NFC target type enumeration.">pn53x_target_type_t</a> * ppttTargetTypes, <span class="keyword">const</span> <span class="keywordtype">size_t</span> szTargetTypes,
<a name="l00243"></a>00243                           <span class="keyword">const</span> byte_t btPollNr, <span class="keyword">const</span> byte_t btPeriod, <a class="code" href="structnfc__target__t.html" title="NFC target structure.">nfc_target_t</a> * pntTargets,
<a name="l00244"></a>00244                           <span class="keywordtype">size_t</span> * pszTargetFound);
<a name="l00245"></a>00245 <span class="keywordtype">bool</span>    pn53x_InJumpForDEP (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd,
<a name="l00246"></a>00246                             <span class="keyword">const</span> <a class="code" href="nfc-types_8h.html#a0403437f90b1c17f0177fc26c1f4e0fc" title="NFC D.E.P. (Data Exchange Protocol) active/passive mode.">nfc_dep_mode_t</a> ndm, <span class="keyword">const</span> <a class="code" href="nfc-types_8h.html#ae9d7b01916fb677e7c0ad1de171b1fdd" title="NFC baud rate enumeration.">nfc_baud_rate_t</a> nbr,
<a name="l00247"></a>00247                             <span class="keyword">const</span> byte_t * pbtPassiveInitiatorData,
<a name="l00248"></a>00248                             <span class="keyword">const</span> byte_t * pbtNFCID3i,
<a name="l00249"></a>00249                             <span class="keyword">const</span> byte_t * pbtGB, <span class="keyword">const</span> <span class="keywordtype">size_t</span> szGB,
<a name="l00250"></a>00250                             <a class="code" href="structnfc__target__t.html" title="NFC target structure.">nfc_target_t</a> * pnt);
<a name="l00251"></a>00251 <span class="keywordtype">bool</span>  pn53x_TgInitAsTarget (<a class="code" href="structnfc__device__t.html" title="NFC device information.">nfc_device_t</a> * pnd, <a class="code" href="pn53x_8h.html#a3cf73127b850fc4e506be9d299c1281b" title="PN53x target mode enumeration.">pn53x_target_mode_t</a> ptm,
<a name="l00252"></a>00252                               <span class="keyword">const</span> byte_t * pbtMifareParams,
<a name="l00253"></a>00253                               <span class="keyword">const</span> byte_t * pbtTkt, <span class="keywordtype">size_t</span> szTkt,
<a name="l00254"></a>00254                               <span class="keyword">const</span> byte_t * pbtFeliCaParams,
<a name="l00255"></a>00255                               <span class="keyword">const</span> byte_t * pbtNFCID3t, <span class="keyword">const</span> byte_t * pbtGB, <span class="keyword">const</span> <span class="keywordtype">size_t</span> szGB,
<a name="l00256"></a>00256                               byte_t * pbtRx, <span class="keywordtype">size_t</span> * pszRx, byte_t * pbtModeByte);
<a name="l00257"></a>00257 
<a name="l00258"></a>00258 
<a name="l00259"></a>00259 <span class="preprocessor">#endif // __NFC_CHIPS_PN53X_H__</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Feb 23 2011 for libnfc by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>