?? display_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>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 Page</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div><h1>display.c File Reference</h1>Functions for high level display. <a href="#_details">More...</a><p><code>#include "<a class="el" href="display_8h-source.html">display.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="board_8h-source.html">board.h</a>"</code><br><code>#include "string.h"</code><br><p>Include dependency graph for display.c:<p><center><img src="display_8c__incl.png" border="0" usemap="#display.c_map" alt="Include dependency graph"></center><map name="display.c_map"><area href="display_8h.html" shape="rect" coords="25,93,84,117" alt=""><area href="lcd_8h.html" shape="rect" coords="108,93,145,117" alt=""><area href="lcdfonts_8h.html" shape="rect" coords="95,18,159,42" alt=""><area href="board_8h.html" shape="rect" coords="169,93,220,117" alt=""></map><p><a href="display_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="display_8c.html#a6">InitDisplay</a> (char style, char *title, char *text, int value)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Reset display and print initial values. <a href="#a6"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="display_8c.html#a7">UpdateDisplay</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Paint display. <a href="#a7"></a><br><br></td></tr><tr><td colspan=2><br><h2>Variables</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>volatile xdata char </td><td class="memItemRight" valign=bottom><a class="el" href="display_8c.html#a0">displayPosition</a></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>xdata char </td><td class="memItemRight" valign=bottom><a class="el" href="display_8c.html#a1">displayTitle</a> [16]</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>xdata char </td><td class="memItemRight" valign=bottom><a class="el" href="display_8c.html#a2">displayText</a> [DS_TEXTLENGTH+1]</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>xdata char </td><td class="memItemRight" valign=bottom><a class="el" href="display_8c.html#a3">displayLength</a></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>xdata char </td><td class="memItemRight" valign=bottom><a class="el" href="display_8c.html#a4">displayStyle</a></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>xdata char </td><td class="memItemRight" valign=bottom><a class="el" href="display_8c.html#a5">displayValue</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Functions for high level display. <p><p>Definition in file <a class="el" href="display_8c-source.html">display.c</a>.<hr><h2>Function Documentation</h2><a class="anchor" name="a6" doxytag="display.c::InitDisplay" ></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 InitDisplay </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char </td> <td class="mdname" nowrap> <em>style</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>char * </td> <td class="mdname" nowrap> <em>title</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>char * </td> <td class="mdname" nowrap> <em>text</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>value</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>Reset display and print initial values. <p><p>Definition at line <a class="el" href="display_8c-source.html#l00023">23</a> of file <a class="el" href="display_8c-source.html">display.c</a>.<p>References <a class="el" href="display_8c-source.html#l00013">displayLength</a>, <a class="el" href="display_8c-source.html#l00010">displayPosition</a>, <a class="el" href="display_8c-source.html#l00014">displayStyle</a>, <a class="el" href="display_8c-source.html#l00012">displayText</a>, <a class="el" href="display_8c-source.html#l00011">displayTitle</a>, <a class="el" href="display_8c-source.html#l00015">displayValue</a>, <a class="el" href="display_8h-source.html#l00017">DS_TEXTLENGTH</a>, <a class="el" href="lcd_8h-source.html#l00020">LcdLocateLine2</a>, <a class="el" href="lcd_8c-source.html#l00089">LcdPutString()</a>, <a class="el" href="lcd_8c-source.html#l00056">LcdReset()</a>, and <a class="el" href="display_8c-source.html#l00058">UpdateDisplay()</a>.<p>Referenced by <a class="el" href="player_8c-source.html#l00765">main()</a>, and <a class="el" href="record_8c-source.html#l00101">Record()</a>.<p><pre class="fragment"><div>00023 {00024 00025 <a class="code" href="lcd_8c.html#a4">LcdReset</a>();00026 00027 <span class="comment">//Init display title array</span>00028 <span class="keywordflow">for</span>(<a class="code" href="display_8c.html#a0">displayPosition</a>=0; <a class="code" href="display_8c.html#a0">displayPosition</a><8; <a class="code" href="display_8c.html#a0">displayPosition</a>++){00029 <a class="code" href="display_8c.html#a1">displayTitle</a>[<a class="code" href="display_8c.html#a0">displayPosition</a>]=<span class="charliteral">' '</span>;00030 }00031 <a class="code" href="display_8c.html#a1">displayTitle</a>[8]=0; <span class="comment">//ending zero</span>00032 strcpy(displayTitle, title);00033 00034 00035 <a class="code" href="display_8c.html#a3">displayLength</a> = strlen(text);00036 <span class="comment">//Init display text array</span>00037 <span class="comment">//Clear display text array to spaces</span>00038 <span class="keywordflow">for</span>(<a class="code" href="display_8c.html#a0">displayPosition</a>=0; <a class="code" href="display_8c.html#a0">displayPosition</a><<a class="code" href="display_8h.html#a7">DS_TEXTLENGTH</a>; <a class="code" href="display_8c.html#a0">displayPosition</a>++){00039 <a class="code" href="display_8c.html#a2">displayText</a>[<a class="code" href="display_8c.html#a0">displayPosition</a>]=<span class="charliteral">' '</span>;00040 }00041 <a class="code" href="display_8c.html#a2">displayText</a>[<a class="code" href="display_8h.html#a7">DS_TEXTLENGTH</a>] = 0; <span class="comment">//ending zero</span>00042 strcpy(displayText, text);00043 00044 00045 <a class="code" href="display_8c.html#a0">displayPosition</a> = 0;00046 <a class="code" href="display_8c.html#a4">displayStyle</a> = style;00047 <a class="code" href="display_8c.html#a5">displayValue</a> = value;00048 <a class="code" href="lcd_8h.html#a9">LcdPutString</a>(displayTitle);00049 <a class="code" href="lcd_8h.html#a2">LcdLocateLine2</a>();00050 <a class="code" href="lcd_8h.html#a9">LcdPutString</a>(displayText);00051 <a class="code" href="display_8c.html#a7">UpdateDisplay</a>();00052 00053 <span class="keywordflow">return</span> 0;00054 }</div></pre><p>Here is the call graph for this function:<p><center><img src="display_8c_a6_cgraph.png" border="0" usemap="#display_8c_a6_cgraph_map" alt=""></center><map name="display_8c_a6_cgraph_map"><area href="lcd_8h.html#a9" shape="rect" coords="140,35,222,59" alt=""><area href="lcd_8c.html#a4" shape="rect" coords="150,206,212,230" alt=""><area href="display_8c.html#a7" shape="rect" coords="136,108,226,132" alt=""><area href="lcd_8h.html#a6" shape="rect" coords="462,59,540,83" alt=""><area href="lcd_8h.html#a7" shape="rect" coords="277,254,384,278" alt=""><area href="lcd_8h.html#a5" shape="rect" coords="285,206,376,230" alt=""><area href="lcd_8h.html#a10" shape="rect" coords="434,182,568,206" alt=""><area href="lcd_8h.html#a15" shape="rect" coords="294,108,366,132" alt=""></map> </td> </tr></table><a class="anchor" name="a7" doxytag="display.c::UpdateDisplay" ></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 UpdateDisplay </td> <td class="md" valign="top">( </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>Paint display. <p><p>Definition at line <a class="el" href="display_8c-source.html#l00058">58</a> of file <a class="el" href="display_8c-source.html">display.c</a>.<p>References <a class="el" href="display_8c-source.html#l00010">displayPosition</a>, <a class="el" href="display_8c-source.html#l00014">displayStyle</a>, <a class="el" href="display_8c-source.html#l00012">displayText</a>, <a class="el" href="display_8c-source.html#l00011">displayTitle</a>, <a class="el" href="display_8c-source.html#l00015">displayValue</a>, <a class="el" href="display_8h-source.html#l00013">DS_ARROWS</a>, <a class="el" href="display_8h-source.html#l00012">DS_NO_YES</a>, <a class="el" href="display_8h-source.html#l00010">DS_NUMERIC</a>, <a class="el" href="display_8h-source.html#l00011">DS_PERCENTAGE</a>, <a class="el" href="display_8h-source.html#l00014">DS_RAWTEXT</a>, <a class="el" href="display_8h-source.html#l00008">DS_STATIC</a>, <a class="el" href="display_8h-source.html#l00009">DS_TEXT</a>, <a class="el" href="lcd_8h-source.html#l00017">LcdLocateHome</a>, <a class="el" href="lcd_8h-source.html#l00020">LcdLocateLine2</a>, <a class="el" href="lcd_8c-source.html#l00017">LcdPutChar()</a>, <a class="el" href="lcd_8c-source.html#l00102">LcdPutConstantString()</a>, <a class="el" href="lcd_8c-source.html#l00221">LcdPutUInt()</a>, and <a class="el" href="board_8c.html#a0">temp</a>.<p>Referenced by <a class="el" href="player_8c-source.html#l00332">AvailableProcessorTime()</a>, and <a class="el" href="display_8c-source.html#l00023">InitDisplay()</a>.<p><pre class="fragment"><div>00058 {00059 00060 <span class="keywordtype">signed</span> <span class="keywordtype">char</span> <a class="code" href="board_8c.html#a0">temp</a>;00061 00062 <a class="code" href="lcd_8h.html#a1">LcdLocateHome</a>();00063 <a class="code" href="lcd_8h.html#a6">LcdPutChar</a>(displayTitle[0]);00064 <a class="code" href="lcd_8h.html#a6">LcdPutChar</a>(displayTitle[1]);00065 <a class="code" href="lcd_8h.html#a6">LcdPutChar</a>(displayTitle[2]);00066 <a class="code" href="lcd_8h.html#a6">LcdPutChar</a>(displayTitle[3]);00067 <a class="code" href="lcd_8h.html#a6">LcdPutChar</a>(displayTitle[4]);00068 <a class="code" href="lcd_8h.html#a6">LcdPutChar</a>(displayTitle[5]);00069 <a class="code" href="lcd_8h.html#a6">LcdPutChar</a>(displayTitle[6]);00070 <a class="code" href="lcd_8h.html#a6">LcdPutChar</a>(displayTitle[7]);00071 <a class="code" href="lcd_8h.html#a2">LcdLocateLine2</a>();00072 00073 <span class="keywordflow">if</span> (<a class="code" href="display_8c.html#a4">displayStyle</a> == <a class="code" href="display_8h.html#a0">DS_STATIC</a>){00074 <span class="keywordflow">for</span> (<a class="code" href="board_8c.html#a0">temp</a>=0; <a class="code" href="board_8c.html#a0">temp</a><8; <a class="code" href="board_8c.html#a0">temp</a>++){00075 <a class="code" href="lcd_8h.html#a6">LcdPutChar</a>(displayText[temp]);00076 }00077 }00078 00079 <span class="keywordflow">if</span> (<a class="code" href="display_8c.html#a4">displayStyle</a> == <a class="code" href="display_8h.html#a1">DS_TEXT</a>){00080 <span class="keywordflow">for</span> (<a class="code" href="board_8c.html#a0">temp</a>=<a class="code" href="display_8c.html#a0">displayPosition</a>; <a class="code" href="board_8c.html#a0">temp</a><<a class="code" href="display_8c.html#a0">displayPosition</a> + 8; <a class="code" href="board_8c.html#a0">temp</a>++){00081 <span class="keywordflow">if</span> (<a class="code" href="board_8c.html#a0">temp</a><0){00082 <a class="code" href="lcd_8h.html#a6">LcdPutChar</a>(<span class="charliteral">' '</span>);00083 }<span class="keywordflow">else</span>{00084 <span class="keywordflow">if</span> (<a class="code" href="display_8c.html#a2">displayText</a>[<a class="code" href="board_8c.html#a0">temp</a>]){00085 <a class="code" href="lcd_8h.html#a6">LcdPutChar</a>(displayText[temp]); 00086 }<span class="keywordflow">else</span>{00087 <a class="code" href="lcd_8h.html#a6">LcdPutChar</a>(<span class="charliteral">' '</span>);00088 }00089 } 00090 }00091 }00092 00093 <span class="keywordflow">if</span> (<a class="code" href="display_8c.html#a4">displayStyle</a> == <a class="code" href="display_8h.html#a2">DS_NUMERIC</a>){00094 <a class="code" href="lcd_8h.html#a15">LcdPutUInt</a>(displayValue);00095 <a class="code" href="lcd_8h.html#a10">LcdPutConstantString</a>(<span class="stringliteral">" "</span>);00096 }00097 00098 <span class="keywordflow">if</span> (<a class="code" href="display_8c.html#a4">displayStyle</a> == <a class="code" href="display_8h.html#a4">DS_NO_YES</a>){00099 <a class="code" href="lcd_8h.html#a10">LcdPutConstantString</a>(<span class="stringliteral">" No<>Yes"</span>);00100 }00101 00102 <span class="keywordflow">if</span> (<a class="code" href="display_8c.html#a4">displayStyle</a> == <a class="code" href="display_8h.html#a5">DS_ARROWS</a>){
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -