<!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: pn532_uart.c File Reference</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 <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 Page</span></a></li> <li><a href="annotated.html"><span>Data 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 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_f6487a516c33f7a4d7b1775e3b9657a7.html">drivers</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <h1>pn532_uart.c File Reference</h1> </div> </div> <div class="contents"> <p>PN532 driver using UART bus (UART, RS232, etc.) <a href="#_details">More...</a></p> <div class="textblock"><code>#include "<a class="el" href="drivers_8h_source.html">../drivers.h</a>"</code><br/> <code>#include <stdio.h></code><br/> <code>#include <string.h></code><br/> <code>#include "<a class="el" href="pn532__uart_8h_source.html">pn532_uart.h</a>"</code><br/> <code>#include <nfc/nfc.h></code><br/> <code>#include <nfc/nfc-messages.h></code><br/> <code>#include "uart.h"</code><br/> </div> <p><a href="pn532__uart_8c_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="func-members"></a> Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="pn532__uart_8c.html#a1b7d8d250f63d153cdba11625219692e">pn532_uart_wakeup</a> (const nfc_device_spec_t nds)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="pn532__uart_8c.html#a5ba1691e518d61088e6d9553af051d49">pn532_uart_check_communication</a> (const nfc_device_spec_t nds, bool *success)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="pn532__uart_8c.html#add391a8dfaee62f3a7c066912301e3ad">pn532_uart_list_devices</a> (<a class="el" href="structnfc__device__desc__t.html">nfc_device_desc_t</a> pnddDevices[], size_t szDevices, size_t *pszDeviceFound)</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <div class="textblock"><p>PN532 driver using UART bus (UART, RS232, etc.) </p> <p>Definition in file <a class="el" href="pn532__uart_8c_source.html">pn532_uart.c</a>.</p> </div><hr/><h2>Function Documentation</h2> <a class="anchor" id="a5ba1691e518d61088e6d9553af051d49"></a><!-- doxytag: member="pn532_uart.c::pn532_uart_check_communication" ref="a5ba1691e518d61088e6d9553af051d49" args="(const nfc_device_spec_t nds, bool *success)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool pn532_uart_check_communication </td> <td>(</td> <td class="paramtype">const nfc_device_spec_t </td> <td class="paramname"><em>nds</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool * </td> <td class="paramname"><em>success</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p><p>To be sure that PN532 is alive, we have put a "Diagnose" command to execute a "Communication Line Test" </p> </p> <p>Definition at line <a class="el" href="pn532__uart_8c_source.html#l00335">335</a> of file <a class="el" href="pn532__uart_8c_source.html">pn532_uart.c</a>.</p> </div> </div> <a class="anchor" id="add391a8dfaee62f3a7c066912301e3ad"></a><!-- doxytag: member="pn532_uart.c::pn532_uart_list_devices" ref="add391a8dfaee62f3a7c066912301e3ad" args="(nfc_device_desc_t pnddDevices[], size_t szDevices, size_t *pszDeviceFound)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool pn532_uart_list_devices </td> <td>(</td> <td class="paramtype"><a class="el" href="structnfc__device__desc__t.html">nfc_device_desc_t</a> </td> <td class="paramname"><em>pnddDevices</em>[], </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>szDevices</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t * </td> <td class="paramname"><em>pszDeviceFound</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p><dl class="note"><dt><b>Note:</b></dt><dd>: Due to UART bus we can't know if its really a pn532 without sending some PN53x commands. But using this way to probe devices, we can have serious problem with other device on this bus </dd></dl> </p> <p>Definition at line <a class="el" href="pn532__uart_8c_source.html#l00076">76</a> of file <a class="el" href="pn532__uart_8c_source.html">pn532_uart.c</a>.</p> </div> </div> <a class="anchor" id="a1b7d8d250f63d153cdba11625219692e"></a><!-- doxytag: member="pn532_uart.c::pn532_uart_wakeup" ref="a1b7d8d250f63d153cdba11625219692e" args="(const nfc_device_spec_t nds)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void pn532_uart_wakeup </td> <td>(</td> <td class="paramtype">const nfc_device_spec_t </td> <td class="paramname"><em>nds</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p><p>PN532C106 wakeup.</p> <p>High Speed Unit (HSU) wake up consist to send 0x55 and wait a "long" delay for PN532 being wakeup.</p> <p>After the preamble we request the PN532C106 chip to switch to "normal" mode (SAM is not used) </p> </p> <p>Definition at line <a class="el" href="pn532__uart_8c_source.html#l00307">307</a> of file <a class="el" href="pn532__uart_8c_source.html">pn532_uart.c</a>.</p> </div> </div> </div> <hr class="footer"/><address class="footer"><small>Generated on Wed Feb 23 2011 for libnfc by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address> </body> </html>