⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lcd_8c.html

📁 MP3播放器源代码, VS1003B
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!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>VLSI Solution Oy Evaluation MP3 Player Source Code Documentation</title><link href="doxygen.css" rel="stylesheet" type="text/css"><img src="vlsi_small.gif" hspace="20" bordercolor="#ffffff"  alt="VLSI Solution Oy"><b>VLSI Solution Oy Evaluation MP3 Player Source Code Documentation</b><p></p></head><body><!-- Generated by Doxygen 1.3.7 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div><h1>lcd.c File Reference</h1>LCD function implementations.  <a href="#_details">More...</a><p><code>#include "<a class="el" href="board_8h-source.html">board.h</a>"</code><br><code>#include "<a class="el" href="lcd_8h-source.html">lcd.h</a>"</code><br><code>#include "<a class="el" href="lcdfonts_8c-source.html">lcdfonts.c</a>"</code><br><p>Include dependency graph for lcd.c:<p><center><img src="lcd_8c__incl.png" border="0" usemap="#lcd.c_map" alt="Include dependency graph"></center><map name="lcd.c_map"><area href="board_8h.html" shape="rect" coords="71,93,121,117" alt=""><area href="lcd_8h.html" shape="rect" coords="172,93,209,117" alt=""><area href="lcdfonts_8h.html" shape="rect" coords="246,18,310,42" alt=""><area href="lcdfonts_8c.html" shape="rect" coords="233,93,297,117" alt=""></map><p><a href="lcd_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>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lcd_8c.html#a1">LcdPutChar</a> (char c)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Low level: Send one data character to LCD.  <a href="#a1"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lcd_8c.html#a2">LcdPutCommand</a> (char cmd)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Low level: Send one command octet to LCD.  <a href="#a2"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lcd_8c.html#a3">LcdSelectFont</a> (ROM_CHAR_PTR font)</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lcd_8c.html#a4">LcdReset</a> ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Low level: Reset LCD.  <a href="#a4"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lcd_8c.html#a5">LcdPutString</a> (char *str)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Low level: Send a zero-terminated string of bytes to lcd from buffer in any memory.  <a href="#a5"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lcd_8c.html#a6">LcdPutConstantString</a> (char code *str)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Low level: Send a zero-terminated string of bytes to lcd from buffer in ROM.  <a href="#a6"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lcd_8c.html#a7">LcdFadeIn</a> ()</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lcd_8c.html#a8">LcdFadeOut</a> ()</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lcd_8c.html#a9">LcdSplashScreen</a> ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Splash screen.  <a href="#a9"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lcd_8c.html#a10">LcdPutHex16</a> (unsigned int value)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Print a 16-bit hex value on LCD.  <a href="#a10"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lcd_8c.html#a11">LcdPutHex8</a> (unsigned char value)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Print an 8-bit hex value on LCD.  <a href="#a11"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>unsigned char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lcd_8c.html#a12">LcdPrintGenericResult</a> (unsigned char errorlevel)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Print OK or Error (hex8) on LCD.  <a href="#a12"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lcd_8c.html#a13">LcdPutUInt</a> (unsigned long value)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Print a 16-bit unsigned integer value on LCD.  <a href="#a13"></a><br><br></td></tr><tr><td colspan=2><br><h2>Variables</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>code const unsigned char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lcd_8c.html#a0">lcd_hexchars</a> [17] = "0123456789abcdef"</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">hexadecimal character set  <a href="#a0"></a><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>LCD function implementations. <p>Required modules: board<p>Definition in file <a class="el" href="lcd_8c-source.html">lcd.c</a>.<hr><h2>Function Documentation</h2><a class="anchor" name="a7" doxytag="lcd.c::LcdFadeIn" ></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 LcdFadeIn           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><p>Definition at line <a class="el" href="lcd_8c-source.html#l00111">111</a> of file <a class="el" href="lcd_8c-source.html">lcd.c</a>.<p>References <a class="el" href="board_8h-source.html#l00210">InitiateDelay</a>, and <a class="el" href="lcd_8c-source.html#l00033">LcdPutCommand()</a>.<p>Referenced by <a class="el" href="lcd_8c-source.html#l00147">LcdSplashScreen()</a>.<p><pre class="fragment"><div>00111                 {00112   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> c,d;00113   <span class="keywordflow">for</span> (c=0; c&lt;254; c++){00114     <span class="keywordflow">for</span> (d=252; d; d-=2){00115       <span class="keywordflow">if</span> (d&gt;c){00116         <a class="code" href="lcd_8h.html#a7">LcdPutCommand</a> (8);00117         <a class="code" href="board_8h.html#a40">InitiateDelay</a>(40);00118       }<span class="keywordflow">else</span>{00119         <a class="code" href="lcd_8h.html#a7">LcdPutCommand</a> (12);00120         <a class="code" href="board_8h.html#a40">InitiateDelay</a>(40);00121       }00122     }00123   }00124   <a class="code" href="lcd_8h.html#a7">LcdPutCommand</a>(12);00125   <a class="code" href="board_8h.html#a40">InitiateDelay</a>(40);00126 }</div></pre><p>Here is the call graph for this function:<p><center><img src="lcd_8c_a7_cgraph.png" border="0" usemap="#lcd_8c_a7_cgraph_map" alt=""></center><map name="lcd_8c_a7_cgraph_map"><area href="lcd_8h.html#a7" shape="rect" coords="136,7,242,30" alt=""></map>    </td>  </tr></table><a class="anchor" name="a8" doxytag="lcd.c::LcdFadeOut" ></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 LcdFadeOut           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><p>Definition at line <a class="el" href="lcd_8c-source.html#l00128">128</a> of file <a class="el" href="lcd_8c-source.html">lcd.c</a>.<p>References <a class="el" href="board_8h-source.html#l00210">InitiateDelay</a>, and <a class="el" href="lcd_8c-source.html#l00033">LcdPutCommand()</a>.<p>Referenced by <a class="el" href="lcd_8c-source.html#l00147">LcdSplashScreen()</a>.<p><pre class="fragment"><div>00128                  {00129   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> c,d;00130   <span class="keywordflow">for</span> (c=0; c&lt;254; c++){00131     <span class="keywordflow">for</span> (d=252; d; d-=2){00132       <span class="keywordflow">if</span> (d&lt;c){00133         <a class="code" href="lcd_8h.html#a7">LcdPutCommand</a> (8);00134         <a class="code" href="board_8h.html#a40">InitiateDelay</a>(40);00135       }<span class="keywordflow">else</span>{00136         <a class="code" href="lcd_8h.html#a7">LcdPutCommand</a> (12);00137         <a class="code" href="board_8h.html#a40">InitiateDelay</a>(40);00138       }00139     }00140   }00141   <a class="code" href="lcd_8h.html#a7">LcdPutCommand</a>(8);00142   <a class="code" href="board_8h.html#a40">InitiateDelay</a>(40);00143 }</div></pre><p>Here is the call graph for this function:<p><center><img src="lcd_8c_a8_cgraph.png" border="0" usemap="#lcd_8c_a8_cgraph_map" alt=""></center><map name="lcd_8c_a8_cgraph_map"><area href="lcd_8h.html#a7" shape="rect" coords="146,7,253,30" alt=""></map>    </td>  </tr></table><a class="anchor" name="a12" doxytag="lcd.c::LcdPrintGenericResult" ></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 LcdPrintGenericResult           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">unsigned char&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>errorlevel</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Print OK or Error (hex8) on LCD. <p><p>Definition at line <a class="el" href="lcd_8c-source.html#l00185">185</a> of file <a class="el" href="lcd_8c-source.html">lcd.c</a>.<p>References <a class="el" href="board_8c-source.html#l00036">Delay()</a>, <a class="el" href="lcd_8c-source.html#l00011">lcd_hexchars</a>, <a class="el" href="lcd_8c-source.html#l00017">LcdPutChar()</a>, and <a class="el" href="lcd_8c-source.html#l00102">LcdPutConstantString()</a>.<p>Referenced by <a class="el" href="player_8c-source.html#l00765">main()</a>.<p><pre class="fragment"><div>00185                                                               {00186   <span class="keywordflow">if</span> (!errorlevel){        00187     <a class="code" href="lcd_8h.html#a10">LcdPutConstantString</a> (<span class="stringliteral">"OK      "</span>);00188   }<span class="keywordflow">else</span>{00189     <a class="code" href="lcd_8h.html#a10">LcdPutConstantString</a> (<span class="stringliteral">"Error "</span>);00190     <a class="code" href="lcd_8h.html#a6">LcdPutChar</a>(lcd_hexchars[(errorlevel&gt;&gt;4)&amp;0xf]);00191     <a class="code" href="lcd_8h.html#a6">LcdPutChar</a>(lcd_hexchars[(errorlevel)&amp;0xf]);00192     ConsoleWrite (<span class="stringliteral">"\rSystem error "</span>);00193     ConsolePutHex8 (errorlevel);00194     ConsoleWrite (<span class="stringliteral">": \""</span>);00195 00196     <span class="keywordflow">switch</span> (errorlevel){00197     <span class="keywordflow">case</span> 0x01: ConsoleWrite (<span class="stringliteral">"No storage"</span>); <span class="keywordflow">break</span>;00198     <span class="keywordflow">case</span> 0x02: ConsoleWrite (<span class="stringliteral">"Storage powerup"</span>); <span class="keywordflow">break</span>;00199     <span class="keywordflow">case</span> 0x03: ConsoleWrite (<span class="stringliteral">"Storage init"</span>); <span class="keywordflow">break</span>;00200     <span class="keywordflow">case</span> 0x04: ConsoleWrite (<span class="stringliteral">"No storage ID"</span>); <span class="keywordflow">break</span>;00201     <span class="keywordflow">case</span> 0x05: ConsoleWrite (<span class="stringliteral">"Datablock header"</span>); <span class="keywordflow">break</span>;00202     <span class="keywordflow">case</span> 0x06: ConsoleWrite (<span class="stringliteral">"Storage Data reply failed"</span>); <span class="keywordflow">break</span>;00203     <span class="keywordflow">case</span> 0x07: ConsoleWrite (<span class="stringliteral">"Generic Storage Command"</span>); <span class="keywordflow">break</span>;00204     <span class="keywordflow">case</span> 0x08: ConsoleWrite (<span class="stringliteral">"Sector 0 not in recognized format"</span>); <span class="keywordflow">break</span>;00205     <span class="keywordflow">case</span> 0x09: ConsoleWrite (<span class="stringliteral">"No active partition"</span>); <span class="keywordflow">break</span>;00206     <span class="keywordflow">case</span> 0x0a: ConsoleWrite (<span class="stringliteral">"Filesystem load"</span>); <span class="keywordflow">break</span>;00207     <span class="keywordflow">case</span> 0x0b: ConsoleWrite (<span class="stringliteral">"No root directory"</span>); <span class="keywordflow">break</span>;00208     <span class="keywordflow">case</span> 0x0c: ConsoleWrite (<span class="stringliteral">"File not found"</span>); <span class="keywordflow">break</span>;00209 00210     };00211     ConsoleWrite(<span class="stringliteral">"\" failure.\r"</span>);00212     00213 00214     <a class="code" href="board_8h.html#a51">Delay</a>(500);00215   }00216   <span class="keywordflow">return</span> errorlevel;00217 }</div></pre><p>Here is the call graph for this function:<p><center><img src="lcd_8c_a12_cgraph.png" border="0" usemap="#lcd_8c_a12_cgraph_map" alt=""></center><map name="lcd_8c_a12_cgraph_map"><area href="board_8h.html#a51" shape="rect" coords="252,6,292,30" alt=""><area href="lcd_8h.html#a6" shape="rect" coords="388,81,465,105" alt=""><area href="lcd_8h.html#a10" shape="rect" coords="205,105,338,129" alt=""></map>    </td>  </tr></table><a class="anchor" name="a1" doxytag="lcd.c::LcdPutChar" ></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 LcdPutChar           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">char&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>c</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -