⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pdc_8h.html

📁 avr32100.zip Embedded demo
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>AVR321000 Communication with the AVR32 USART: testsuite/bravo_validation/pdc/pdc.h File Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.1 --><div class="tabs">  <ul>    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>    <li id="current"><a href="files.html"><span>Files</span></a></li>    <li><a href="dirs.html"><span>Directories</span></a></li>    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>  </ul></div><div class="tabs">  <ul>    <li><a href="files.html"><span>File&nbsp;List</span></a></li>    <li><a href="globals.html"><span>Globals</span></a></li>  </ul></div><div class="nav"><a class="el" href="dir_ed041fa8052270846d9a0dab17b0d151.html">testsuite</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_18e6971fa792d4606dff45a531675719.html">bravo_validation</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_8c4082e77fbbc3a6ea8174dc22e0d829.html">pdc</a></div><h1>pdc.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>SSC I2S example application. <p>This file gives an example of using the PDC to burst data on the USART.<p><ul><li>Compiler: IAR EWAAVR32 and GNU GCC for AVR32</li><li>Supported devices: All AVR32 devices with PDC and USART module.</li><li>AppNote: AVR32106 - Peripheral Direct Memory Access Driver</li></ul><p><dl class="author" compact><dt><b>Author:</b></dt><dd>Atmel Corporation: <a href="http://www.atmel.com">http://www.atmel.com</a> <br> Support email: <a href="mailto:avr32@atmel.com">avr32@atmel.com</a></dd></dl>$Name$ <dl class="rcs" compact><dt><b>Revision</b></dt><dd>42 </dd></dl>$RCSfile$ <dl class="rcs" compact><dt><b>Date</b></dt><dd>2006-03-22 09:08:08 +0100 (Wed, 22 Mar 2006) </dd></dl><p>Definition in file <a class="el" href="pdc_8h-source.html">pdc.h</a>.<p><code>#include &lt;avr32/io.h&gt;</code><br><code>#include &quot;<a class="el" href="settings_8h-source.html">settings.h</a>&quot;</code><br><p>Include dependency graph for pdc.h:<p>This graph shows which files directly or indirectly include this file:<p><a href="pdc_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdc_8h.html#b3971528b8bc10aa7cf4b6a9fa02efec">pdc_disable</a> (void *dev)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Disable the PDC for the given peripheral device.  <a href="#b3971528b8bc10aa7cf4b6a9fa02efec"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdc_8h.html#f7ff3c2c5cdd78b2ea4bcdd4d534db4e">pdc_disableRx</a> (void *dev)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Disable the PDC receiver.  <a href="#f7ff3c2c5cdd78b2ea4bcdd4d534db4e"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdc_8h.html#e1ea60180ce5ff3c1de231a030750200">pdc_disableTx</a> (void *dev)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Disable the PDC transmitter.  <a href="#e1ea60180ce5ff3c1de231a030750200"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdc_8h.html#a785b05ff9a4ab8aeb81add0dcee22de">pdc_enable</a> (void *dev)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enable the PDC for the given peripheral device.  <a href="#a785b05ff9a4ab8aeb81add0dcee22de"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdc_8h.html#f018b706f6ae4dc602ecbfaef2f7bc91">pdc_enableRx</a> (void *dev)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enable the PDC receiver, the buffers will remain the same as they were before PDC got disabled (ie. the PDC continues were it left of.  <a href="#f018b706f6ae4dc602ecbfaef2f7bc91"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdc_8h.html#4d8e210909d08e220d94ba17f30d6788">pdc_enableTx</a> (void *dev)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enable the PDC transmitter, the buffers will remain the same as they were before PDC got disabled (ie. the PDC continues were it left of).  <a href="#4d8e210909d08e220d94ba17f30d6788"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdc_8h.html#2b547452934d9ac4de77067b9f0a50fe">pdc_flushCache</a> (void *buffer, unsigned short size)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flush the cache at a given address.  <a href="#2b547452934d9ac4de77067b9f0a50fe"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdc_8h.html#a6bf86e9cb96bfd942f55ce8373b1d8d">pdc_getRcr</a> (void *dev)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check remaining size of current receive buffer.  <a href="#a6bf86e9cb96bfd942f55ce8373b1d8d"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdc_8h.html#dd7ed0da82ce9355870e9daa04088b37">pdc_getTcr</a> (void *dev)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check remaining size of current transmit buffer.  <a href="#dd7ed0da82ce9355870e9daa04088b37"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdc_8h.html#d01334a29b7008e23adb4d02670b9291">pdc_rxBytesLeft</a> (void *dev)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check total remaining size of the receive buffers.  <a href="#d01334a29b7008e23adb4d02670b9291"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdc_8h.html#eb0a9a90269a4fc9a797a72d187d1394">pdc_setRxBuf</a> (void *dev, void *rp, unsigned short rc, void *rnp, unsigned short rnc)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Give pointers and size of receive buffers to the PDC (Peripheral DMA Controller), and enables the receiver.  <a href="#eb0a9a90269a4fc9a797a72d187d1394"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdc_8h.html#2e23b778b9c8adba8c0083a330b09462">pdc_setRxNextBuf</a> (void *dev, void *rnp, unsigned short rnc)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Give pointers and size of the next receive buffers to the PDC (Peripheral DMA Controller).  <a href="#2e23b778b9c8adba8c0083a330b09462"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdc_8h.html#98f03f3c504599d5b4569ff1c20c2794">pdc_setTxBuf</a> (void *dev, void *tp, unsigned short tc, void *tnp, unsigned short tnc)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Give pointers and size of transmit buffers to the PDC (Peripheral DMA Controller), and enables the transmitter.  <a href="#98f03f3c504599d5b4569ff1c20c2794"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdc_8h.html#3c7c380b83f6694e27d8a9332331c148">pdc_setTxNextBuf</a> (void *dev, void *tnp, unsigned short tnc)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Give pointers and size of the next transmit buffers to add to the PDC (Peripheral DMA Controller).  <a href="#3c7c380b83f6694e27d8a9332331c148"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdc_8h.html#e0911ca4f685151ee6b575d04c3ae287">pdc_translatePtr</a> (void *pointerAddr)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Translates memory addresses from P1, P2, P3 and P4 memory space to the P0 memory space. This function is only valid if the MMU is not used.  <a href="#e0911ca4f685151ee6b575d04c3ae287"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdc_8h.html#c0660b45db6f34dab2c2af12c4b196ab">pdc_txBytesLeft</a> (void *dev)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check total remaining size of the transmit buffers.  <a href="#c0660b45db6f34dab2c2af12c4b196ab"></a><br></td></tr></table><hr><h2>Function Documentation</h2><a class="anchor" name="b3971528b8bc10aa7cf4b6a9fa02efec"></a><!-- doxytag: member="pdc.h::pdc_disable" ref="b3971528b8bc10aa7cf4b6a9fa02efec" args="(void *dev)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void pdc_disable           </td>          <td>(</td>          <td class="paramtype">void *&nbsp;</td>          <td class="paramname"> <em>dev</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Disable the PDC for the given peripheral device. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>dev</em>&nbsp;</td><td>pointer to the base memory address of the device </td></tr>  </table></dl><p>Definition at line <a class="el" href="pdc_8c-source.html#l00062">62</a> of file <a class="el" href="pdc_8c-source.html">pdc.c</a>.<p>References <a class="el" href="pdc_8c-source.html#l00026">PDC_RXTDIS_OFFSET</a>, and <a class="el" href="pdc_8c-source.html#l00024">PDC_TXTDIS_OFFSET</a>.<div class="fragment"><pre class="fragment"><a name="l00063"></a>00063 {<a name="l00064"></a>00064         <span class="comment">/* Disable RX and TX */</span><a name="l00065"></a>00065         ((<span class="keyword">struct </span><a class="code" href="structperipheral__t.html">peripheral_t</a> *)dev)-&gt;ptcr =<a name="l00066"></a>00066                 (1&lt;&lt;<a class="code" href="pdc_8c.html#7a3f80a033dfce03238c7c1922a3ca34">PDC_RXTDIS_OFFSET</a>)|(1&lt;&lt;<a class="code" href="pdc_8c.html#675419758320a8376778a7e074c2d56f">PDC_TXTDIS_OFFSET</a>);<a name="l00067"></a>00067 }</pre></div><p></div></div><p><a class="anchor" name="f7ff3c2c5cdd78b2ea4bcdd4d534db4e"></a><!-- doxytag: member="pdc.h::pdc_disableRx" ref="f7ff3c2c5cdd78b2ea4bcdd4d534db4e" args="(void *dev)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void pdc_disableRx           </td>          <td>(</td>          <td class="paramtype">void *&nbsp;</td>          <td class="paramname"> <em>dev</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Disable the PDC receiver. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>dev</em>&nbsp;</td><td>pointer to the base memory address of the device </td></tr>  </table></dl><p>Definition at line <a class="el" href="pdc_8c-source.html#l00086">86</a> of file <a class="el" href="pdc_8c-source.html">pdc.c</a>.<p>References <a class="el" href="pdc_8c-source.html#l00026">PDC_RXTDIS_OFFSET</a>.<p>Referenced by <a class="el" href="pdc_8c-source.html#l00138">pdc_setRxBuf()</a>.<div class="fragment"><pre class="fragment"><a name="l00087"></a>00087 {<a name="l00088"></a>00088         <span class="comment">/* Disable RX */</span><a name="l00089"></a>00089         ((<span class="keyword">struct </span><a class="code" href="structperipheral__t.html">peripheral_t</a> *)dev)-&gt;ptcr = (1&lt;&lt;<a class="code" href="pdc_8c.html#7a3f80a033dfce03238c7c1922a3ca34">PDC_RXTDIS_OFFSET</a>);<a name="l00090"></a>00090 }</pre></div><p></div></div><p><a class="anchor" name="e1ea60180ce5ff3c1de231a030750200"></a><!-- doxytag: member="pdc.h::pdc_disableTx" ref="e1ea60180ce5ff3c1de231a030750200" args="(void *dev)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void pdc_disableTx           </td>          <td>(</td>          <td class="paramtype">void *&nbsp;</td>          <td class="paramname"> <em>dev</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Disable the PDC transmitter. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>dev</em>&nbsp;</td><td>pointer to the base memory address of the device </td></tr>  </table></dl><p>Definition at line <a class="el" href="pdc_8c-source.html#l00097">97</a> of file <a class="el" href="pdc_8c-source.html">pdc.c</a>.<p>References <a class="el" href="pdc_8c-source.html#l00024">PDC_TXTDIS_OFFSET</a>.<p>Referenced by <a class="el" href="pdc_8c-source.html#l00195">pdc_setTxBuf()</a>.<div class="fragment"><pre class="fragment"><a name="l00098"></a>00098 {<a name="l00099"></a>00099         <span class="comment">/* Disable TX */</span><a name="l00100"></a>00100         ((<span class="keyword">struct </span><a class="code" href="structperipheral__t.html">peripheral_t</a> *)dev)-&gt;ptcr = (1&lt;&lt;<a class="code" href="pdc_8c.html#675419758320a8376778a7e074c2d56f">PDC_TXTDIS_OFFSET</a>);<a name="l00101"></a>00101 }</pre></div><p></div></div><p><a class="anchor" name="a785b05ff9a4ab8aeb81add0dcee22de"></a><!-- doxytag: member="pdc.h::pdc_enable" ref="a785b05ff9a4ab8aeb81add0dcee22de" args="(void *dev)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void pdc_enable           </td>          <td>(</td>          <td class="paramtype">void *&nbsp;</td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -