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

📄 lcd__functions_8c-source.html

📁 SMS傳送Sourcode,compiler with C,AT command
💻 HTML
📖 第 1 页 / 共 2 页
字号:
00146 <span class="comment">*       Parameters :    None</span>00147 <span class="comment">*</span>00148 <span class="comment">*       Purpose :               Clear the LCD</span>00149 <span class="comment">*</span>00150 <span class="comment">*****************************************************************************/</span><a name="l00151"></a><a class="code" href="Lcd__functions_8h.html#a4">00151</a> <span class="keywordtype">void</span> <a class="code" href="LCD__functions_8c.html#a7">LCD_Clear</a>(<span class="keywordtype">void</span>)00152 {00153     <span class="keywordtype">char</span> i;00154 00155     <span class="keywordflow">for</span> (i=0; i&lt;<a class="code" href="LCD__driver_8h.html#a4">TEXTBUFFER_SIZE</a>; i++)00156         <a class="code" href="LCD__driver_8c.html#a4">gTextBuffer</a>[i] = <span class="charliteral">' '</span>;00157 }00158 00159 00160 <span class="comment">/****************************************************************************</span>00161 <span class="comment">*</span>00162 <span class="comment">*       Function name : LCD_Colon</span>00163 <span class="comment">*</span>00164 <span class="comment">*       Returns :               None</span>00165 <span class="comment">*</span>00166 <span class="comment">*       Parameters :    show: Enables the colon if TRUE, disable if FALSE</span>00167 <span class="comment">*</span>00168 <span class="comment">*       Purpose :               Enable/disable colons on the LCD</span>00169 <span class="comment">*</span>00170 <span class="comment">*****************************************************************************/</span><a name="l00171"></a><a class="code" href="Lcd__functions_8h.html#a5">00171</a> <span class="keywordtype">void</span> <a class="code" href="Lcd__functions_8h.html#a5">LCD_Colon</a>(<span class="keywordtype">char</span> show)00172 {00173     <a class="code" href="LCD__driver_8c.html#a9">gColon</a> = show;00174 }00175 00176 00177 <span class="comment">/****************************************************************************</span>00178 <span class="comment">*</span>00179 <span class="comment">*       Function name : LCD_UpdateRequired</span>00180 <span class="comment">*</span>00181 <span class="comment">*       Returns :               None</span>00182 <span class="comment">*</span>00183 <span class="comment">*       Parameters :    update: TRUE/FALSE</span>00184 <span class="comment">*                   scrollmode: not in use</span>00185 <span class="comment">*</span>00186 <span class="comment">*       Purpose :               Tells the LCD that there is new data to be presented</span>00187 <span class="comment">*</span>00188 <span class="comment">*****************************************************************************/</span><a name="l00189"></a><a class="code" href="Lcd__functions_8h.html#a2">00189</a> <span class="keywordtype">void</span> <a class="code" href="Lcd__functions_8h.html#a2">LCD_UpdateRequired</a>(<span class="keywordtype">char</span> update, <span class="keywordtype">char</span> scrollmode)00190 {00191 00192     <span class="keywordflow">while</span> (<a class="code" href="LCD__driver_8c.html#a2">gLCD_Update_Required</a>);00193 00194     <a class="code" href="LCD__driver_8c.html#a6">gScrollMode</a> = scrollmode;00195     <a class="code" href="LCD__driver_8c.html#a5">gScroll</a> = 0;00196 00197     <a class="code" href="LCD__driver_8c.html#a2">gLCD_Update_Required</a> = update;00198 }00199 00200 00201 <span class="comment">/****************************************************************************</span>00202 <span class="comment">*</span>00203 <span class="comment">*       Function name : LCD_FlashReset</span>00204 <span class="comment">*</span>00205 <span class="comment">*       Returns :               None</span>00206 <span class="comment">*</span>00207 <span class="comment">*       Parameters :    None</span>00208 <span class="comment">*</span>00209 <span class="comment">*       Purpose :               This function resets the blinking cycle of a flashing digit</span>00210 <span class="comment">*</span>00211 <span class="comment">*****************************************************************************/</span><a name="l00212"></a><a class="code" href="Lcd__functions_8h.html#a6">00212</a> <span class="keywordtype">void</span> <a class="code" href="LCD__functions_8c.html#a10">LCD_FlashReset</a>(<span class="keywordtype">void</span>)00213 {00214     <a class="code" href="LCD__driver_8c.html#a8">gFlashTimer</a> = 0;00215 }00216 00217 00218 00219 <span class="comment">/****************************************************************************</span>00220 <span class="comment">*</span>00221 <span class="comment">*       Function name : SetContrast</span>00222 <span class="comment">*</span>00223 <span class="comment">*   Returns :       char ST_state (to the state-machine)</span>00224 <span class="comment">*</span>00225 <span class="comment">*   Parameters :    char input (from joystick)</span>00226 <span class="comment">*</span>00227 <span class="comment">*       Purpose :               Adjust the LCD contrast</span>00228 <span class="comment">*</span>00229 <span class="comment">*****************************************************************************/</span><a name="l00230"></a><a class="code" href="Lcd__functions_8h.html#a7">00230</a> <span class="keywordtype">char</span> <a class="code" href="Lcd__functions_8h.html#a7">SetContrast</a>(<span class="keywordtype">char</span> input)00231 {00232     <span class="keyword">static</span> <span class="keywordtype">char</span> enter = 1;00233     <span class="keywordtype">char</span> CH, CL;00234 00235     <span class="keywordflow">if</span> (enter)00236     {00237         <a class="code" href="LCD__functions_8c.html#a7">LCD_Clear</a>();00238         enter = 0;00239     }00240 00241     CH = <a class="code" href="BCD_8h.html#a0">CHAR2BCD2</a>(<a class="code" href="LCD__functions_8c.html#a2">CONTRAST</a>);00242     CL = (CH &amp; 0x0F) + <span class="charliteral">'0'</span>;00243     CH = (CH &gt;&gt; 4) + <span class="charliteral">'0'</span>;00244 00245     <a class="code" href="Lcd__functions_8h.html#a3">LCD_putc</a>(0, <span class="charliteral">'C'</span>);00246     <a class="code" href="Lcd__functions_8h.html#a3">LCD_putc</a>(1, <span class="charliteral">'T'</span>);00247     <a class="code" href="Lcd__functions_8h.html#a3">LCD_putc</a>(2, <span class="charliteral">'R'</span>);00248     <a class="code" href="Lcd__functions_8h.html#a3">LCD_putc</a>(3, <span class="charliteral">' '</span>);00249     <a class="code" href="Lcd__functions_8h.html#a3">LCD_putc</a>(4, CH);00250     <a class="code" href="Lcd__functions_8h.html#a3">LCD_putc</a>(5, CL);00251 00252     <a class="code" href="Lcd__functions_8h.html#a2">LCD_UpdateRequired</a>(<a class="code" href="LCD__functions_8c.html#a1">TRUE</a>, 0);00253 00254     <span class="keywordflow">if</span> (<a class="code" href="main_8h.html#a27">input</a> == <a class="code" href="main_8h.html#a27a21">KEY_PLUS</a>)00255         <a class="code" href="LCD__functions_8c.html#a2">CONTRAST</a>++;00256     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="main_8h.html#a27">input</a> == <a class="code" href="main_8h.html#a27a22">KEY_MINUS</a>)00257         <a class="code" href="LCD__functions_8c.html#a2">CONTRAST</a>--;00258 00259     <span class="keywordflow">if</span> (<a class="code" href="LCD__functions_8c.html#a2">CONTRAST</a> == 255)00260         <a class="code" href="LCD__functions_8c.html#a2">CONTRAST</a> = 0;00261     <span class="keywordflow">if</span> (<a class="code" href="LCD__functions_8c.html#a2">CONTRAST</a> &gt; 15)00262         <a class="code" href="LCD__functions_8c.html#a2">CONTRAST</a> = 15;00263 00264     <a class="code" href="LCD__driver_8h.html#a10">LCD_CONTRAST_LEVEL</a>(<a class="code" href="LCD__functions_8c.html#a2">CONTRAST</a>);00265 00266 00267 00268 00269     <span class="keywordflow">return</span> 1;00270 }</div></pre><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 + -