📄 pio_8h.html
字号:
</table></div><div class="memdoc"><p><p>Definition at line <a class="el" href="pio_8c-source.html#l00022">22</a> of file <a class="el" href="pio_8c-source.html">pio.c</a>.<p>References <a class="el" href="pio_8c-source.html#l00034">pio_enable_module_pin()</a>, and <a class="el" href="pio_8h-source.html#l00009">PIO_SUCCESS</a>.<div class="fragment"><pre class="fragment"><a name="l00023"></a>00023 {<a name="l00024"></a>00024 <span class="keywordtype">int</span> i,status=<a class="code" href="pio_8h.html#52cd0b7b2d8c06258aac84decb82f5c3">PIO_SUCCESS</a>;<a name="l00025"></a>00025 <a name="l00026"></a>00026 <span class="keywordflow">for</span>(i=0; i<size; i++){<a name="l00027"></a>00027 status |= <a class="code" href="pio_8c.html#4e0d680d4fb8958d5d08c37a14d2f38b">pio_enable_module_pin</a>(**piomap, *(*piomap+1) );<a name="l00028"></a>00028 piomap++;<a name="l00029"></a>00029 }<a name="l00030"></a>00030 <a name="l00031"></a>00031 <span class="keywordflow">return</span> status;<a name="l00032"></a>00032 }</pre></div><p><p>Here is the call graph for this function:</div></div><p><a class="anchor" name="4e0d680d4fb8958d5d08c37a14d2f38b"></a><!-- doxytag: member="pio.h::pio_enable_module_pin" ref="4e0d680d4fb8958d5d08c37a14d2f38b" args="(int pin, int function)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">int pio_enable_module_pin </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>pin</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>function</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p><p>Definition at line <a class="el" href="pio_8c-source.html#l00034">34</a> of file <a class="el" href="pio_8c-source.html">pio.c</a>.<p>References <a class="el" href="pio_8h-source.html#l00008">PIO_INVALID_ARGUMENT</a>, <a class="el" href="pio_8h-source.html#l00009">PIO_SUCCESS</a>, and <a class="el" href="pio_8c-source.html#l00003">pioGetHandle()</a>.<p>Referenced by <a class="el" href="pio_8c-source.html#l00022">pio_enable_module()</a>.<div class="fragment"><pre class="fragment"><a name="l00035"></a>00035 {<a name="l00036"></a>00036 avr32_pio_t *pio = (<span class="keywordtype">void</span> *) <a class="code" href="pio_8c.html#772eae8b42e7fcfb83b26715f3320fb6">pioGetHandle</a>(pin/32);<a name="l00037"></a>00037 <a name="l00038"></a>00038 <a name="l00039"></a>00039 <span class="comment">/* Disable pio control */</span><a name="l00040"></a>00040 pio->pdr |= (1<<(pin%32));<a name="l00041"></a>00041 <a name="l00042"></a>00042 <span class="comment">/* Enable the correct function */</span><a name="l00043"></a>00043 <span class="keywordflow">switch</span>(function){<a name="l00044"></a>00044 <span class="keywordflow">case</span> 0:<a name="l00045"></a>00045 pio->asr |= (1<<(pin%32));<a name="l00046"></a>00046 <span class="keywordflow">break</span>;<a name="l00047"></a>00047 <span class="keywordflow">case</span> 1:<a name="l00048"></a>00048 pio->bsr |= (1<<(pin%32));<a name="l00049"></a>00049 <span class="keywordflow">break</span>;<a name="l00050"></a>00050 <span class="keywordflow">default</span>:<a name="l00051"></a>00051 <span class="keywordflow">return</span> <a class="code" href="pio_8h.html#28429517612c8802636a443b9d07fd72">PIO_INVALID_ARGUMENT</a>;<a name="l00052"></a>00052 }<a name="l00053"></a>00053 <span class="keywordflow">return</span> <a class="code" href="pio_8h.html#52cd0b7b2d8c06258aac84decb82f5c3">PIO_SUCCESS</a>;<a name="l00054"></a>00054 }</pre></div><p><p>Here is the call graph for this function:</div></div><p><a class="anchor" name="f30ad30a3166614ef92bda4c579bbd5c"></a><!-- doxytag: member="pio.h::pio_enable_pio" ref="f30ad30a3166614ef92bda4c579bbd5c" args="(avr32_piomap_t piomap, int size)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">int pio_enable_pio </td> <td>(</td> <td class="paramtype"><a class="el" href="usart__example_8c.html#8a26ea9b2ab943a38ada2d6ca9282231">avr32_piomap_t</a> </td> <td class="paramname"> <em>piomap</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>size</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p><p>Definition at line <a class="el" href="pio_8c-source.html#l00058">58</a> of file <a class="el" href="pio_8c-source.html">pio.c</a>.<p>References <a class="el" href="pio_8c-source.html#l00070">pio_enable_pio_pin()</a>, and <a class="el" href="pio_8h-source.html#l00009">PIO_SUCCESS</a>.<div class="fragment"><pre class="fragment"><a name="l00059"></a>00059 {<a name="l00060"></a>00060 <span class="keywordtype">int</span> i,status=<a class="code" href="pio_8h.html#52cd0b7b2d8c06258aac84decb82f5c3">PIO_SUCCESS</a>;<a name="l00061"></a>00061 <a name="l00062"></a>00062 <span class="keywordflow">for</span>(i=0; i<size; i++){<a name="l00063"></a>00063 status |= <a class="code" href="pio_8c.html#6570afaec1ff091456bb327bf60bc535">pio_enable_pio_pin</a>(**piomap);<a name="l00064"></a>00064 piomap++;<a name="l00065"></a>00065 }<a name="l00066"></a>00066 <a name="l00067"></a>00067 <span class="keywordflow">return</span> status;<a name="l00068"></a>00068 }</pre></div><p><p>Here is the call graph for this function:</div></div><p><a class="anchor" name="6570afaec1ff091456bb327bf60bc535"></a><!-- doxytag: member="pio.h::pio_enable_pio_pin" ref="6570afaec1ff091456bb327bf60bc535" args="(int pin)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">int pio_enable_pio_pin </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>pin</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p><p>Definition at line <a class="el" href="pio_8c-source.html#l00070">70</a> of file <a class="el" href="pio_8c-source.html">pio.c</a>.<p>References <a class="el" href="pio_8h-source.html#l00009">PIO_SUCCESS</a>, and <a class="el" href="pio_8c-source.html#l00003">pioGetHandle()</a>.<p>Referenced by <a class="el" href="pio_8c-source.html#l00058">pio_enable_pio()</a>.<div class="fragment"><pre class="fragment"><a name="l00071"></a>00071 {<a name="l00072"></a>00072 avr32_pio_t *pio = (<span class="keywordtype">void</span> *) <a class="code" href="pio_8c.html#772eae8b42e7fcfb83b26715f3320fb6">pioGetHandle</a>(pin/32);<a name="l00073"></a>00073 <a name="l00074"></a>00074 pio->per |= (1<<(pin%32));<a name="l00075"></a>00075 <a name="l00076"></a>00076 <span class="keywordflow">return</span> <a class="code" href="pio_8h.html#52cd0b7b2d8c06258aac84decb82f5c3">PIO_SUCCESS</a>;<a name="l00077"></a>00077 }</pre></div><p><p>Here is the call graph for this function:</div></div><p><a class="anchor" name="772eae8b42e7fcfb83b26715f3320fb6"></a><!-- doxytag: member="pio.h::pioGetHandle" ref="772eae8b42e7fcfb83b26715f3320fb6" args="(int port)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">int pioGetHandle </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>port</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p><p>Definition at line <a class="el" href="pio_8c-source.html#l00003">3</a> of file <a class="el" href="pio_8c-source.html">pio.c</a>.<p>References <a class="el" href="pio_8h-source.html#l00008">PIO_INVALID_ARGUMENT</a>.<p>Referenced by <a class="el" href="pio_8c-source.html#l00093">pio_disable_pio_pin()</a>, <a class="el" href="pio_8c-source.html#l00034">pio_enable_module_pin()</a>, and <a class="el" href="pio_8c-source.html#l00070">pio_enable_pio_pin()</a>.<div class="fragment"><pre class="fragment"><a name="l00004"></a>00004 {<a name="l00005"></a>00005 <span class="keywordflow">switch</span> (port) {<a name="l00006"></a>00006 <span class="keywordflow">case</span> 0:<a name="l00007"></a>00007 <span class="keywordflow">return</span> AVR32_PIOA_ADDRESS;<a name="l00008"></a>00008 <span class="keywordflow">case</span> 1:<a name="l00009"></a>00009 <span class="keywordflow">return</span> AVR32_PIOB_ADDRESS;<a name="l00010"></a>00010 <span class="keywordflow">case</span> 2:<a name="l00011"></a>00011 <span class="keywordflow">return</span> AVR32_PIOC_ADDRESS;<a name="l00012"></a>00012 <span class="keywordflow">case</span> 3:<a name="l00013"></a>00013 <span class="keywordflow">return</span> AVR32_PIOD_ADDRESS;<a name="l00014"></a>00014 <span class="keywordflow">case</span> 4:<a name="l00015"></a>00015 <span class="keywordflow">return</span> AVR32_PIOE_ADDRESS;<a name="l00016"></a>00016 <span class="keywordflow">default</span> :<a name="l00017"></a>00017 <span class="keywordflow">break</span>;<a name="l00018"></a>00018 }<a name="l00019"></a>00019 <span class="keywordflow">return</span> <a class="code" href="pio_8h.html#28429517612c8802636a443b9d07fd72">PIO_INVALID_ARGUMENT</a>;<a name="l00020"></a>00020 }</pre></div><p></div></div><p><hr size="1"><address style="align: right;"><small>Generated on Thu May 10 14:14:48 2007 for AVR321000 Communication with the AVR32 USART by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -