📄 avrgsm__com_8c.html
字号:
00245 }</div></pre><p>Here is the call graph for this function:<p><center><img src="AVRGSM__com_8c_a19_cgraph.png" border="0" usemap="#AVRGSM__com_8c_a19_cgraph_map" alt=""></center><map name="AVRGSM__com_8c_a19_cgraph_map"><area href="AVRGSM__com_8h.html#a12" shape="rect" coords="184,7,288,33" alt=""></map> </td> </tr></table><a class="anchor" name="a18" doxytag="AVRGSM_com.c::COM_putchar" ></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"> int COM_putchar </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">unsigned char </td> <td class="mdname1" valign="top" nowrap> <em>data</em> </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>Adapted putchar method...no need for interrup driven tx-isr. <p>Adpation of ansi c putchar() method<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>data</em> </td><td>Character to send</td></tr> </table></dl><dl compact><dt><b>Return values:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>data</em> </td><td>if successful </td></tr> <tr><td></td><td valign=top><em>-1</em> </td><td>if timeout </td></tr> </table></dl><p>Definition at line <a class="el" href="AVRGSM__com_8c-source.html#l00198">198</a> of file <a class="el" href="AVRGSM__com_8c-source.html">AVRGSM_com.c</a>.<p>References <a class="el" href="AVRGSM__com_8h-source.html#l00028">RX_WAIT</a>.<p>Referenced by <a class="el" href="AVRGSM__api_8c-source.html#l00160">API_sendmsg()</a>, <a class="el" href="AVRGSM__com_8c-source.html#l00224">COM_put_integer()</a>, <a class="el" href="AVRGSM__com_8c-source.html#l00254">COM_puts()</a>, and <a class="el" href="AVRGSM__com_8c-source.html#l00270">COM_putsf()</a>.<p><pre class="fragment"><div>00199 {00200 00201 <span class="comment">//Local variables</span>00202 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i;00203 00204 <span class="keywordflow">for</span>( i = 0; !( UCSR0A & ( 1 << UDRE0 ) ); i++ ) <span class="comment">// Wait for empty transmit buffer</span>00205 {00206 <span class="keywordflow">if</span>( i > <a class="code" href="AVRGSM__com_8h.html#a2">RX_WAIT</a> ) <span class="comment">//How long one should wait</span>00207 {00208 <span class="keywordflow">return</span> -1; <span class="comment">//Give feedback to function caller</span>00209 }00210 }00211 00212 UDR0 = data; <span class="comment">// Start transmittion </span>00213 00214 <span class="keywordflow">return</span> (<span class="keywordtype">int</span>)data; <span class="comment">//Cast and return int value</span>00215 }</div></pre> </td> </tr></table><a class="anchor" name="a20" doxytag="AVRGSM_com.c::COM_puts" ></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 COM_puts </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">unsigned char * </td> <td class="mdname1" valign="top" nowrap> <em>str</em> </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>Print unsigned char string. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>str</em> </td><td>Pointer to the string</td></tr> </table></dl><dl compact><dt><b>Return values:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>void</em> </td><td></td></tr> </table></dl><p>Definition at line <a class="el" href="AVRGSM__com_8c-source.html#l00254">254</a> of file <a class="el" href="AVRGSM__com_8c-source.html">AVRGSM_com.c</a>.<p>References <a class="el" href="AVRGSM__com_8c-source.html#l00198">COM_putchar()</a>.<p>Referenced by <a class="el" href="AVRGSM__api_8c-source.html#l00160">API_sendmsg()</a>.<p><pre class="fragment"><div>00255 {00256 00257 <span class="keywordflow">for</span>( ;*str != <span class="charliteral">'\0'</span>; )00258 {00259 <a class="code" href="AVRGSM__com_8h.html#a12">COM_putchar</a>( *str++ );00260 }00261 }</div></pre><p>Here is the call graph for this function:<p><center><img src="AVRGSM__com_8c_a20_cgraph.png" border="0" usemap="#AVRGSM__com_8c_a20_cgraph_map" alt=""></center><map name="AVRGSM__com_8c_a20_cgraph_map"><area href="AVRGSM__com_8h.html#a12" shape="rect" coords="141,7,245,33" alt=""></map> </td> </tr></table><a class="anchor" name="a21" doxytag="AVRGSM_com.c::COM_putsf" ></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 COM_putsf </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const unsigned char __flash * </td> <td class="mdname1" valign="top" nowrap> <em>fstr</em> </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>Print const unsigned char __flash string. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>fstr</em> </td><td>Pointer to the string</td></tr> </table></dl><dl compact><dt><b>Return values:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>void</em> </td><td></td></tr> </table></dl><p>Definition at line <a class="el" href="AVRGSM__com_8c-source.html#l00270">270</a> of file <a class="el" href="AVRGSM__com_8c-source.html">AVRGSM_com.c</a>.<p>References <a class="el" href="AVRGSM__com_8c-source.html#l00198">COM_putchar()</a>.<p>Referenced by <a class="el" href="AVRGSM__api_8c-source.html#l00125">API_deletemsg()</a>, <a class="el" href="AVRGSM__api_8c-source.html#l00073">API_modem_init()</a>, <a class="el" href="AVRGSM__api_8c-source.html#l00232">API_readmsg()</a>, and <a class="el" href="AVRGSM__api_8c-source.html#l00160">API_sendmsg()</a>.<p><pre class="fragment"><div>00271 {00272 00273 <span class="keywordflow">for</span>( ;*fstr != <span class="charliteral">'\0'</span>; )00274 {00275 <a class="code" href="AVRGSM__com_8h.html#a12">COM_putchar</a>( *fstr++ );00276 }00277 }</div></pre><p>Here is the call graph for this function:<p><center><img src="AVRGSM__com_8c_a21_cgraph.png" border="0" usemap="#AVRGSM__com_8c_a21_cgraph_map" alt=""></center><map name="AVRGSM__com_8c_a21_cgraph_map"><area href="AVRGSM__com_8h.html#a12" shape="rect" coords="147,7,251,33" alt=""></map> </td> </tr></table><a class="anchor" name="a15" doxytag="AVRGSM_com.c::COM_rx_off" ></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 COM_rx_off </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>RX interrupt disable. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>void</em> </td><td></td></tr> </table></dl><dl compact><dt><b>Return values:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>void</em> </td><td></td></tr> </table></dl><p>Definition at line <a class="el" href="AVRGSM__com_8c-source.html#l00114">114</a> of file <a class="el" href="AVRGSM__com_8c-source.html">AVRGSM_com.c</a>.<p>Referenced by <a class="el" href="AVRGSM__api_8c-source.html#l00278">API_check_acknowledge()</a>.<p><pre class="fragment"><div>00115 {00116 00117 UCSR0B &= ~( 1 << RXCIE0 ); <span class="comment">// Disable RX interrupt</span>00118 }</div></pre> </td> </tr></table><a class="anchor" name="a14" doxytag="AVRGSM_com.c::COM_rx_on" ></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 COM_rx_on </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>RX interrupt enable. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>void</em> </td><td></td></tr> </table></dl><dl compact><dt><b>Return values:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>void</em> </td><td></td></tr> </table></dl><p>Definition at line <a class="el" href="AVRGSM__com_8c-source.html#l00101">101</a> of file <a class="el" href="AVRGSM__com_8c-source.html">AVRGSM_com.c</a>.<p>Referenced by <a class="el" href="AVRGSM__api_8c-source.html#l00125">API_deletemsg()</a>, <a class="el" href="AVRGSM__api_8c-source.html#l00073">API_modem_init()</a>, <a class="el" href="AVRGSM__api_8c-source.html#l00232">API_readmsg()</a>, <a class="el" href="AVRGSM__api_8c-source.html#l00160">API_sendmsg()</a>, <a class="el" href="STATE__functions_8c-source.html#l00118">ST_delete_msg()</a>, <a class="el" href="STATE__functions_8c-source.html#l00051">ST_init_phone()</a>, and <a class="el" href="STATE__functions_8c-source.html#l00158">ST_read()</a>.<p><pre class="fragment"><div>00102 {00103 00104 UCSR0B |= ( 1 << RXCIE0 ); <span class="comment">// Enable RX interrupt</span>00105 }</div></pre> </td> </tr></table><a class="anchor" name="a13" doxytag="AVRGSM_com.c::COM_rx_reset" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -