📄 pm__example_8c.html
字号:
<!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/power_manager/pm_example.c 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 Page</span></a></li> <li><a href="annotated.html"><span>Data 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 Pages</span></a></li> </ul></div><div class="tabs"> <ul> <li><a href="files.html"><span>File 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> » <a class="el" href="dir_18e6971fa792d4606dff45a531675719.html">bravo_validation</a> » <a class="el" href="dir_ccff2bf392818c53411e9baf433c1483.html">power_manager</a></div><h1>pm_example.c File Reference</h1><p><code>#include <avr32/io.h></code><br><code>#include "<a class="el" href="pm_8h-source.html">pm.h</a>"</code><br><p>Include dependency graph for pm_example.c:<p><a href="pm__example_8c-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">int </td><td class="memItemRight" valign="bottom"><a class="el" href="pm__example_8c.html#840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr></table><hr><h2>Function Documentation</h2><a class="anchor" name="840291bc02cba5474a4cb46a9b9566fe"></a><!-- doxytag: member="pm_example.c::main" ref="840291bc02cba5474a4cb46a9b9566fe" args="(void)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">int main </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p><p>Definition at line <a class="el" href="pm__example_8c-source.html#l00004">4</a> of file <a class="el" href="pm__example_8c-source.html">pm_example.c</a>.<p>References <a class="el" href="pm_8h-source.html#l00011">PM_OSC0</a>, <a class="el" href="pm_8h-source.html#l00014">PM_PLL0</a>, <a class="el" href="pm_8c-source.html#l00135">pm_set_mclk_source()</a>, and <a class="el" href="pm_8c-source.html#l00051">pm_set_pll()</a>.<div class="fragment"><pre class="fragment"><a name="l00005"></a>00005 {<a name="l00006"></a>00006 <span class="comment">/* you are by default running at 20MHz */</span><a name="l00007"></a>00007 <a name="l00008"></a>00008 <span class="comment">/*</span><a name="l00009"></a>00009 <span class="comment"> Setup the PLL0 with a the following frequency</span><a name="l00010"></a>00010 <span class="comment"></span><a name="l00011"></a>00011 <span class="comment"> MULTIPLIER</span><a name="l00012"></a>00012 <span class="comment"> PLL_f =------------ * OSCILLATOR_f</span><a name="l00013"></a>00013 <span class="comment"> DIVIDER</span><a name="l00014"></a>00014 <span class="comment"> */</span><a name="l00015"></a>00015 pll_opt.oscillator=<a class="code" href="pm_8h.html#b6ed62883d39ae18a209e0a3dbfbeb40">PM_OSC0</a>;<a name="l00016"></a>00016 pll_opt.pll=<a class="code" href="pm_8h.html#b496d79f3a521e4335d24be892bf085a">PM_PLL0</a>;<a name="l00017"></a>00017 pll_opt.multiplier=2;<a name="l00018"></a>00018 pll_opt.divider=1;<a name="l00019"></a>00019 <a name="l00020"></a>00020 <span class="comment">/* Apply the changes */</span><a name="l00021"></a>00021 <a class="code" href="pm_8c.html#7fc09cb1d5ede1dea772f8b03ee154be">pm_set_pll</a>(&pll_opt);<a name="l00022"></a>00022 <a name="l00023"></a>00023 <span class="comment">/*Set the frequency to mclk */</span><a name="l00024"></a>00024 <a class="code" href="pm_8c.html#5ee9297ef8a710f6f1c7b3f60d6f7369">pm_set_mclk_source</a>(<a class="code" href="pm_8h.html#b496d79f3a521e4335d24be892bf085a">PM_PLL0</a>);<a name="l00025"></a>00025 <a name="l00026"></a>00026 <span class="comment">/* You are now running at 40 Mhz! */</span><a name="l00027"></a>00027 <a name="l00028"></a>00028 <span class="keywordflow">return</span> 0;<a name="l00029"></a>00029 }</pre></div><p><p>Here is the call graph for this function:</div></div><p><hr size="1"><address style="align: right;"><small>Generated on Thu May 10 14:14:49 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 + -