📄 state__functions_8c.html
字号:
00058 00059 result = <a class="code" href="AVRGSM__api_8c.html#a10">API_modem_init</a>(); <span class="comment">//Setup phone</span>00060 00061 <span class="keywordflow">if</span>( result == 1 )00062 {00063 00064 <a class="code" href="AVRGSM__com_8c.html#a13">COM_rx_reset</a>( ); <span class="comment">//Reset receive buffer after API_phoneinit()</span>00065 <a class="code" href="AVRGSM__com_8h.html#a11">COM_setSearchString</a>( CMTI_ ); <span class="comment">//Wait for "+CMTI: ,Storage,index\r\n"</span>00066 <a class="code" href="AVRGSM__com_8c.html#a14">COM_rx_on</a>( ); <span class="comment">//Ready to receive</span>00067 00068 <span class="keywordflow">return</span> <a class="code" href="main_8h.html#a26a4">ST_AVR_READY</a>;00069 }00070 00071 <span class="keywordflow">else</span> <span class="keywordflow">if</span>( result == 0 )00072 {00073 00074 <span class="keywordflow">return</span> <a class="code" href="main_8h.html#a26a5">ST_AVR_NO_ECHO</a>; <span class="comment">//Could not set echo off</span>00075 }00076 00077 <span class="keywordflow">else</span> <span class="keywordflow">if</span>( result == -1 )00078 {00079 00080 <span class="keywordflow">return</span> <a class="code" href="main_8h.html#a26a6">ST_AVR_WRONG_STORAGE</a>; <span class="comment">//No such storage locations</span>00081 }00082 00083 <span class="keywordflow">else</span>00084 {00085 00086 <span class="keywordflow">return</span> <a class="code" href="main_8h.html#a26a7">ST_AVR_WRONG_OPTION</a>; <span class="comment">//The chosen forward option is not valid for this GSM modem</span>00087 }00088 }</div></pre><p>Here is the call graph for this function:<p><center><img src="STATE__functions_8c_a2_cgraph.png" border="0" usemap="#STATE__functions_8c_a2_cgraph_map" alt=""></center><map name="STATE__functions_8c_a2_cgraph_map"><area href="AVRGSM__api_8c.html#a10" shape="rect" coords="164,159,287,185" alt=""><area href="AVRGSM__com_8c.html#a13" shape="rect" coords="556,120,665,147" alt=""><area href="AVRGSM__com_8c.html#a14" shape="rect" coords="375,69,468,96" alt=""><area href="AVRGSM__com_8h.html#a11" shape="rect" coords="344,272,499,299" alt=""><area href="AVRGSM__api_8c.html#a9" shape="rect" coords="336,171,507,197" alt=""><area href="AVRGSM__com_8h.html#a15" shape="rect" coords="376,221,467,248" alt=""><area href="AVRGSM__com_8c.html#a15" shape="rect" coords="564,171,657,197" alt=""><area href="AVRGSM__com_8h.html#a12" shape="rect" coords="559,221,663,248" alt=""></map> </td> </tr></table><a class="anchor" name="a6" doxytag="STATE_functions.c::ST_read" ></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"> char ST_read </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char </td> <td class="mdname1" valign="top" nowrap> <em>input</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>This function will read message at memory location index. <p>State function<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>input</em> </td><td>Dummy input...joypad value.</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>char</em> </td><td>Next state. </td></tr> </table></dl><p>Definition at line <a class="el" href="STATE__functions_8c-source.html#l00158">158</a> of file <a class="el" href="STATE__functions_8c-source.html">STATE_functions.c</a>.<p>References <a class="el" href="AVRGSM__api_8c-source.html#l00232">API_readmsg()</a>, <a class="el" href="AVRGSM__com_8c-source.html#l00101">COM_rx_on()</a>, <a class="el" href="AVRGSM__com_8c-source.html#l00085">COM_rx_reset()</a>, <a class="el" href="AVRGSM__com_8c-source.html#l00127">COM_setSearchString()</a>, <a class="el" href="STATE__functions_8c-source.html#l00036">index</a>, <a class="el" href="LCD__functions_8c-source.html#l00092">LCD_puts()</a>, <a class="el" href="AVRGSM__api_8c-source.html#l00042">msgbuff</a>, and <a class="el" href="main_8h.html#a26a14">ST_AVR_DISPLAY</a>.<p><pre class="fragment"><div>00159 {00160 00161 <a class="code" href="AVRGSM__api_8h.html#a3">API_readmsg</a>( index ); <span class="comment">//Read new message, and decode</span>00162 <a class="code" href="Lcd__functions_8h.html#a1">LCD_puts</a>((<span class="keywordtype">char</span> *)msgbuff,1); <span class="comment">//Cast pointer</span>00163 00164 <a class="code" href="AVRGSM__com_8h.html#a11">COM_setSearchString</a>( 1 ); <span class="comment">//Set searchstring to "+CMTI: " again, wait for new message.</span>00165 <a class="code" href="AVRGSM__com_8c.html#a13">COM_rx_reset</a>( ); <span class="comment">//Reset buffer and interrupt routine</span>00166 <a class="code" href="AVRGSM__com_8c.html#a14">COM_rx_on</a>( ); <span class="comment">//Ready to receive*/</span>00167 00168 <span class="keywordflow">return</span> <a class="code" href="main_8h.html#a26a14">ST_AVR_DISPLAY</a>;00169 }</div></pre><p>Here is the call graph for this function:<p><center><img src="STATE__functions_8c_a6_cgraph.png" border="0" usemap="#STATE__functions_8c_a6_cgraph_map" alt=""></center><map name="STATE__functions_8c_a6_cgraph_map"><area href="AVRGSM__api_8h.html#a3" shape="rect" coords="130,260,234,287" alt=""><area href="AVRGSM__com_8c.html#a13" shape="rect" coords="503,311,612,338" alt=""><area href="AVRGSM__com_8c.html#a14" shape="rect" coords="322,362,415,388" alt=""><area href="AVRGSM__com_8h.html#a11" shape="rect" coords="291,412,446,439" alt=""><area href="Lcd__functions_8h.html#a1" shape="rect" coords="142,514,222,540" alt=""><area href="AVRGSM__api_8c.html#a9" shape="rect" coords="283,260,454,287" alt=""><area href="AVRGSM__com_8h.html#a13" shape="rect" coords="304,210,432,236" alt=""><area href="AVRGSM__com_8h.html#a15" shape="rect" coords="323,159,414,186" alt=""><area href="AVRGSM__tools_8h.html#a1" shape="rect" coords="286,58,451,84" alt=""><area href="AVRGSM__zip_8h.html#a4" shape="rect" coords="307,108,430,135" alt=""><area href="AVRGSM__com_8c.html#a15" shape="rect" coords="511,260,604,287" alt=""><area href="AVRGSM__com_8h.html#a12" shape="rect" coords="506,184,610,211" alt=""><area href="AVRGSM__com_8c.html#a23" shape="rect" coords="515,7,600,34" alt=""><area href="AVRGSM__com_8c.html#a22" shape="rect" coords="516,58,599,84" alt=""><area href="AVRGSM__zip_8h.html#a6" shape="rect" coords="522,108,594,135" alt=""></map> </td> </tr></table><a class="anchor" name="a3" doxytag="STATE_functions.c::ST_send" ></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"> char ST_send </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char </td> <td class="mdname1" valign="top" nowrap> <em>input</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>This function will send a user defined text string. <p>State function<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>input</em> </td><td>Dummy input...joypad value.</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>char</em> </td><td>Next state. </td></tr> </table></dl><p>Definition at line <a class="el" href="STATE__functions_8c-source.html#l00100">100</a> of file <a class="el" href="STATE__functions_8c-source.html">STATE_functions.c</a>.<p>References <a class="el" href="AVRGSM__api_8c-source.html#l00160">API_sendmsg()</a>, and <a class="el" href="main_8h.html#a26a4">ST_AVR_READY</a>.<p><pre class="fragment"><div>00101 {00102 00103 <a class="code" href="AVRGSM__api_8h.html#a2">API_sendmsg</a>(<span class="stringliteral">"ATMEL AVR"</span>);00104 00105 <span class="keywordflow">return</span> <a class="code" href="main_8h.html#a26a4">ST_AVR_READY</a>;00106 }</div></pre><p>Here is the call graph for this function:<p><center><img src="STATE__functions_8c_a3_cgraph.png" border="0" usemap="#STATE__functions_8c_a3_cgraph_map" alt=""></center><map name="STATE__functions_8c_a3_cgraph_map"><area href="AVRGSM__api_8h.html#a2" shape="rect" coords="129,235,236,261" alt=""><area href="AVRGSM__api_8c.html#a9" shape="rect" coords="285,7,456,33" alt=""><area href="AVRGSM__com_8c.html#a13" shape="rect" coords="505,57,615,84" alt=""><area href="AVRGSM__com_8h.html#a13" shape="rect" coords="307,108,435,135" alt=""><area href="AVRGSM__com_8h.html#a12" shape="rect" coords="508,184,612,211" alt=""><area href="AVRGSM__com_8h.html#a14" shape="rect" coords="328,209,413,236" alt=""><area href="AVRGSM__com_8h.html#a15" shape="rect" coords="325,260,416,287" alt=""><area href="AVRGSM__com_8c.html#a14" shape="rect" coords="324,311,417,337" alt=""><area href="AVRGSM__com_8h.html#a11" shape="rect" coords="293,361,448,388" alt=""><area href="AVRGSM__zip_8h.html#a3" shape="rect" coords="317,412,424,439" alt=""><area href="AVRGSM__zip_8h.html#a7" shape="rect" coords="335,463,407,489" alt=""><area href="AVRGSM__com_8c.html#a15" shape="rect" coords="513,7,607,33" alt=""></map> </td> </tr></table><hr><h2>Variable Documentation</h2><a class="anchor" name="a0" doxytag="STATE_functions.c::index" ></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 <a class="el" href="STATE__functions_8c.html#a0">index</a><code> [static]</code> </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><p>Definition at line <a class="el" href="STATE__functions_8c-source.html#l00036">36</a> of file <a class="el" href="STATE__functions_8c-source.html">STATE_functions.c</a>.<p>Referenced by <a class="el" href="STATE__functions_8c-source.html#l00118">ST_delete_msg()</a>, <a class="el" href="STATE__functions_8c-source.html#l00141">ST_get_index()</a>, and <a class="el" href="STATE__functions_8c-source.html#l00158">ST_read()</a>. </td> </tr></table><a class="anchor" name="a1" doxytag="STATE_functions.c::msgbuff" ></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"> unsigned char <a class="el" href="STATE__functions_8c.html#a1">msgbuff</a>[161] </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Message buffer for coded and decoded messages. <p><p>Definition at line <a class="el" href="STATE__functions_8c-source.html#l00038">38</a> of file <a class="el" href="STATE__functions_8c-source.html">STATE_functions.c</a>.<p>Referenced by <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>, and <a class="el" href="STATE__functions_8c-source.html#l00158">ST_read()</a>. </td> </tr></table><hr size="1"><address style="align: right;"><small>Generated on Tue Nov 1 16:21:40 2005 for AVR323 Interfacing GSM modems 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 + -