📄 main_8c.html
字号:
00149 <a class="code" href="main_8c.html#a2">ShowHelp</a>();00150 00151 <span class="comment">// Clear RXbuffer.</span>00152 <a class="code" href="main_8c.html#a0">status</a>.<a class="code" href="structGLOBAL__FLAGS.html#o0">cmd</a> = <a class="code" href="global_8h.html#a1">FALSE</a>;00153 <a class="code" href="uart_8c.html#a10">uart_FlushRxBuffer</a>();00154 00155 <span class="keywordflow">if</span>(<a class="code" href="main_8c.html#a0">status</a>.<a class="code" href="structGLOBAL__FLAGS.html#o2">running</a> == <a class="code" href="global_8h.html#a0">TRUE</a>){00156 <a class="code" href="uart_8h.html#a9">uart_SendString</a>(<span class="stringliteral">"Running..."</span>);00157 <span class="keywordflow">while</span>(<a class="code" href="main_8c.html#a0">status</a>.<a class="code" href="structGLOBAL__FLAGS.html#o2">running</a> == <a class="code" href="global_8h.html#a0">TRUE</a>);00158 <a class="code" href="uart_8h.html#a9">uart_SendString</a>(<span class="stringliteral">"OK\n\r"</span>);00159 }00160 00161 <a class="code" href="main_8c.html#a3">ShowData</a>(stepPosition, acceleration, deceleration, speed, steps);00162 }<span class="comment">//end if(cmd)</span>00163 }<span class="comment">//end while(1)</span>00164 }</div></pre><p>Here is the call graph for this function:<p><center><img src="main_8c_a5_cgraph.png" border="0" usemap="#main_8c_a5_cgraph_map" alt=""></center><map name="main_8c_a5_cgraph_map"><area href="main_8c.html#a4" shape="rect" coords="157,108,197,135" alt=""><area href="main_8c.html#a3" shape="rect" coords="136,209,219,236" alt=""><area href="uart_8h.html#a9" shape="rect" coords="317,260,435,287" alt=""><area href="main_8c.html#a2" shape="rect" coords="136,311,219,337" alt=""><area href="speed__cntr_8h.html#a12" shape="rect" coords="113,361,241,388" alt=""><area href="uart_8c.html#a10" shape="rect" coords="108,412,247,439" alt=""><area href="uart_8c.html#a6" shape="rect" coords="339,7,413,33" alt=""><area href="sm__driver_8c.html#a6" shape="rect" coords="312,57,440,84" alt=""><area href="sm__driver_8h.html#a12" shape="rect" coords="297,108,455,135" alt=""><area href="speed__cntr_8c.html#a2" shape="rect" coords="295,159,457,185" alt=""><area href="uart_8h.html#a10" shape="rect" coords="327,209,425,236" alt=""><area href="uart_8h.html#a8" shape="rect" coords="507,260,616,287" alt=""></map> </td> </tr></table><a class="anchor" name="a3" doxytag="main.c::ShowData" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void ShowData </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">int </td> <td class="mdname" nowrap> <em>position</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>acceleration</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>deceleration</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>speed</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>steps</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Sends out data. <p>Outputs the values of the data you can control by serial interface and the current position of the stepper motor.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>acceleration</em> </td><td>Accelration setting. </td></tr> <tr><td></td><td valign=top><em>deceleration</em> </td><td>Deceleration setting. </td></tr> <tr><td></td><td valign=top><em>speed</em> </td><td>Speed setting. </td></tr> <tr><td></td><td valign=top><em>steps</em> </td><td>Position of the stepper motor. </td></tr> </table></dl><p>Definition at line <a class="el" href="main_8c-source.html#l00190">190</a> of file <a class="el" href="main_8c-source.html">main.c</a>.<p>References <a class="el" href="uart_8c-source.html#l00111">uart_SendInt()</a>, and <a class="el" href="uart_8c-source.html#l00097">uart_SendString()</a>.<p>Referenced by <a class="el" href="main_8c-source.html#l00062">main()</a>.<p><pre class="fragment"><div>00191 {00192 <a class="code" href="uart_8h.html#a9">uart_SendString</a>(<span class="stringliteral">"\n\r Motor pos: "</span>);00193 <a class="code" href="uart_8h.html#a10">uart_SendInt</a>(position);00194 <a class="code" href="uart_8h.html#a9">uart_SendString</a>(<span class="stringliteral">" a:"</span>);00195 <a class="code" href="uart_8h.html#a10">uart_SendInt</a>(acceleration);00196 <a class="code" href="uart_8h.html#a9">uart_SendString</a>(<span class="stringliteral">" d:"</span>);00197 <a class="code" href="uart_8h.html#a10">uart_SendInt</a>(deceleration);00198 <a class="code" href="uart_8h.html#a9">uart_SendString</a>(<span class="stringliteral">" s:"</span>);00199 <a class="code" href="uart_8h.html#a10">uart_SendInt</a>(speed);00200 <a class="code" href="uart_8h.html#a9">uart_SendString</a>(<span class="stringliteral">" m:"</span>);00201 <a class="code" href="uart_8h.html#a10">uart_SendInt</a>(steps);00202 <a class="code" href="uart_8h.html#a9">uart_SendString</a>(<span class="stringliteral">"\n\r> "</span>);00203 }</div></pre><p>Here is the call graph for this function:<p><center><img src="main_8c_a3_cgraph.png" border="0" usemap="#main_8c_a3_cgraph_map" alt=""></center><map name="main_8c_a3_cgraph_map"><area href="uart_8h.html#a10" shape="rect" coords="148,7,247,34" alt=""><area href="uart_8h.html#a9" shape="rect" coords="139,58,256,84" alt=""><area href="uart_8h.html#a8" shape="rect" coords="307,32,416,59" alt=""></map> </td> </tr></table><a class="anchor" name="a2" doxytag="main.c::ShowHelp" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void ShowHelp </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Sends help message. <p>Outputs help message. <p>Definition at line <a class="el" href="main_8c-source.html#l00173">173</a> of file <a class="el" href="main_8c-source.html">main.c</a>.<p>References <a class="el" href="main_8c-source.html#l00167">Help</a>, and <a class="el" href="uart_8c-source.html#l00073">uart_SendByte()</a>.<p>Referenced by <a class="el" href="main_8c-source.html#l00062">main()</a>.<p><pre class="fragment"><div>00174 {00175 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0;00176 <span class="keywordflow">while</span>(<a class="code" href="main_8c.html#a1">Help</a>[i] != 0)00177 <a class="code" href="uart_8h.html#a8">uart_SendByte</a>(Help[i++]);00178 }</div></pre><p>Here is the call graph for this function:<p><center><img src="main_8c_a2_cgraph.png" border="0" usemap="#main_8c_a2_cgraph_map" alt=""></center><map name="main_8c_a2_cgraph_map"><area href="uart_8h.html#a8" shape="rect" coords="139,7,248,33" alt=""></map> </td> </tr></table><hr><h2>Variable Documentation</h2><a class="anchor" name="a1" doxytag="main.c::Help" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> __flash char <a class="el" href="main_8c.html#a1">Help</a>[] = {"\n\r--------------------------------------------------------------\n\rAtmel AVR446 - Linear speed control of stepper motor\n\r\n\r? - Show help\n\ra [data] - Set acceleration (range: 71 - 32000)\n\rd [data] - Set deceleration (range: 71 - 32000)\n\rs [data] - Set speed (range: 12 - motor limit)\n\rm [data] - Move [data] steps (range: -64000 - 64000)\n\rmove [steps] [accel] [decel] [speed]\n\r - Move with all parameters given\n\r<enter> - Repeat last move\n\r\n\r acc/dec data given in 0.01*rad/sec^2 (100 = 1 rad/sec^2)\n\r speed data given in 0.01*rad/sec (100 = 1 rad/sec)\n\r--------------------------------------------------------------\n\r"} </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Help message. <p><p>Definition at line <a class="el" href="main_8c-source.html#l00167">167</a> of file <a class="el" href="main_8c-source.html">main.c</a>.<p>Referenced by <a class="el" href="main_8c-source.html#l00173">ShowHelp()</a>. </td> </tr></table><a class="anchor" name="a0" doxytag="main.c::status" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> struct <a class="el" href="structGLOBAL__FLAGS.html">GLOBAL_FLAGS</a> <a class="el" href="speed__cntr_8h.html#a11">status</a> = {FALSE, FALSE, 0} </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Global status flags. <p><p>Definition at line <a class="el" href="main_8c-source.html#l00033">33</a> of file <a class="el" href="main_8c-source.html">main.c</a>.<p>Referenced by <a class="el" href="main_8c-source.html#l00062">main()</a>, <a class="el" href="speed__cntr_8c-source.html#l00046">speed_cntr_Move()</a>, <a class="el" href="speed__cntr_8c-source.html#l00164">speed_cntr_TIMER1_COMPA_interrupt()</a>, and <a class="el" href="uart_8c-source.html#l00146">UART_RX_interrupt()</a>. </td> </tr></table><hr size="1"><address style="align: right;"><small>Generated on Mon May 8 15:05:03 2006 for AVR446 - Linear speed control of stepper motor by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -