📄 bcd_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>AVR323 Interfacing GSM modems: BCD.c File Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.7 --><div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div><h1>ATAVRBFLY_FILES/BCD.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>Atmel Corporation<p><ul><li>File : <a class="el" href="BCD_8c.html">BCD.c</a></li><li>Compiler : IAR EWAAVR 4.11a</li></ul><p><ul><li>Support mail : <a href="mailto:avr@atmel.com">avr@atmel.com</a></li></ul><p><ul><li>Supported devices : All devices with a UART/USART can be used. The example is written for ATmega169</li></ul><p><ul><li>AppNote : AVR323 - Interfacing GSM modems</li></ul><p><ul><li>Description : Example of how to use AT-Commands to control a GSM modem</li></ul><p><dl compact><dt><b>Revision</b></dt><dd>1.2 </dd></dl><dl compact><dt><b>Date</b></dt><dd>Wednesday, January 26, 2005 10:43:44 UTC </dd></dl><p>Definition in file <a class="el" href="BCD_8c-source.html">BCD.c</a>.<p><p><a href="BCD_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>char </td><td class="memItemRight" valign=bottom><a class="el" href="BCD_8c.html#a0">CHAR2BCD2</a> (char <a class="el" href="main_8h.html#a27">input</a>)</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int </td><td class="memItemRight" valign=bottom><a class="el" href="BCD_8c.html#a1">CHAR2BCD3</a> (char <a class="el" href="main_8h.html#a27">input</a>)</td></tr></table><hr><h2>Function Documentation</h2><a class="anchor" name="a0" doxytag="BCD.c::CHAR2BCD2" ></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 CHAR2BCD2 </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><p>Definition at line <a class="el" href="BCD_8c-source.html#l00037">37</a> of file <a class="el" href="BCD_8c-source.html">BCD.c</a>.<p>References <a class="el" href="main_8h-source.html#l00059">input</a>.<p>Referenced by <a class="el" href="LCD__functions_8c-source.html#l00230">SetContrast()</a>.<p><pre class="fragment"><div>00038 {00039 <span class="keywordtype">char</span> high = 0;00040 00041 00042 <span class="keywordflow">while</span> (<a class="code" href="main_8h.html#a27">input</a> >= 10) <span class="comment">// Count tens</span>00043 {00044 high++;00045 <a class="code" href="main_8h.html#a27">input</a> -= 10;00046 }00047 00048 <span class="keywordflow">return</span> (high << 4) | <a class="code" href="main_8h.html#a27">input</a>; <span class="comment">// Add ones and return answer</span>00049 }</div></pre> </td> </tr></table><a class="anchor" name="a1" doxytag="BCD.c::CHAR2BCD3" ></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 int CHAR2BCD3 </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><p>Definition at line <a class="el" href="BCD_8c-source.html#l00065">65</a> of file <a class="el" href="BCD_8c-source.html">BCD.c</a>.<p>References <a class="el" href="main_8h-source.html#l00059">input</a>.<p><pre class="fragment"><div>00066 {00067 <span class="keywordtype">int</span> high = 0;00068 00069 <span class="keywordflow">while</span> (<a class="code" href="main_8h.html#a27">input</a> >= 100) <span class="comment">// Count hundreds</span>00070 {00071 high++;00072 <a class="code" href="main_8h.html#a27">input</a> -= 100;00073 }00074 00075 high <<= 4;00076 00077 <span class="keywordflow">while</span> (<a class="code" href="main_8h.html#a27">input</a> >= 10) <span class="comment">// Count tens</span>00078 {00079 high++;00080 <a class="code" href="main_8h.html#a27">input</a> -= 10;00081 }00082 00083 <span class="keywordflow">return</span> (high << 4) | <a class="code" href="main_8h.html#a27">input</a>; <span class="comment">// Add ones and return answer</span>00084 }</div></pre> </td> </tr></table><hr size="1"><address style="align: right;"><small>Generated on Tue Nov 1 16:21:39 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 + -