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

📄 ks0108conf_8h-source.html

📁 单片机的软件
💻 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>Procyon AVRlib: conf/ks0108conf.h Source File</title><link href="dox.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.2 --><div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a></div><div class="nav"><a class="el" href="dir_000000.html">conf</a></div><h1>ks0108conf.h</h1><a href="ks0108conf_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*! \file ks0108conf.h \brief Graphic LCD driver configuration. */</span>00002 <span class="comment">//*****************************************************************************</span>00003 <span class="comment">//</span>00004 <span class="comment">// File Name    : 'ks0108conf.h'</span>00005 <span class="comment">// Title        : Graphic LCD driver for HD61202/KS0108 displays</span>00006 <span class="comment">// Author       : Pascal Stang - Copyright (C) 2001-2003</span>00007 <span class="comment">// Date         : 10/19/2001</span>00008 <span class="comment">// Revised      : 5/1/2003</span>00009 <span class="comment">// Version      : 0.5</span>00010 <span class="comment">// Target MCU   : Atmel AVR</span>00011 <span class="comment">// Editor Tabs  : 4</span>00012 <span class="comment">//</span>00013 <span class="comment">// NOTE: This code is currently below version 1.0, and therefore is considered</span>00014 <span class="comment">// to be lacking in some functionality or documentation, or may not be fully</span>00015 <span class="comment">// tested.  Nonetheless, you can expect most functions to work.</span>00016 <span class="comment">//</span>00017 <span class="comment">// This code is distributed under the GNU Public License</span>00018 <span class="comment">//      which can be found at http://www.gnu.org/licenses/gpl.txt</span>00019 <span class="comment">//</span>00020 <span class="comment">//*****************************************************************************</span>00021 00022 00023 <span class="preprocessor">#ifndef KS0108CONF_H</span>00024 <span class="preprocessor"></span><span class="preprocessor">#define KS0108CONF_H</span>00025 <span class="preprocessor"></span>00026 <span class="comment">// define LCD hardware interface</span>00027 <span class="comment">// -LCD_MEMORY_INTERFACE assumes that the registers of the LCD have been mapped</span>00028 <span class="comment">// into the external memory space of the AVR processor memory bus</span>00029 <span class="comment">// -LCD_PORT_INTERFACE is a direct-connection interface from port pins to LCD</span>00030 <span class="comment">// SELECT (UNCOMMENT) ONLY ONE!</span>00031 00032 <span class="comment">// *** NOTE: memory interface is not yet fully supported, but it might work</span>00033 00034 <span class="comment">//#define GLCD_MEMORY_INTERFACE</span>00035 <span class="preprocessor">#define GLCD_PORT_INTERFACE</span>00036 <span class="preprocessor"></span>00037 <span class="comment">// GLCD_PORT_INTERFACE specifics</span>00038 <span class="preprocessor">#ifdef GLCD_PORT_INTERFACE</span>00039 <span class="preprocessor"></span>    <span class="comment">// make sure these parameters are not already defined elsewhere</span>00040 <span class="preprocessor">    #ifndef GLCD_CTRL_PORT</span>00041 <span class="preprocessor"></span><span class="preprocessor">        #define GLCD_CTRL_PORT  PORTB   // PORT for LCD control signals</span>00042 <span class="preprocessor"></span><span class="preprocessor">        #define GLCD_CTRL_DDR   DDRB    // DDR register of LCD_CTRL_PORT</span>00043 <span class="preprocessor"></span><span class="preprocessor">        #define GLCD_CTRL_RS    PB0     // pin for LCD Register Select</span>00044 <span class="preprocessor"></span><span class="preprocessor">        #define GLCD_CTRL_RW    PB1     // pin for LCD Read/Write</span>00045 <span class="preprocessor"></span><span class="preprocessor">        #define GLCD_CTRL_E     PB2     // pin for LCD Enable</span>00046 <span class="preprocessor"></span><span class="preprocessor">        #define GLCD_CTRL_CS0   PB3     // pin for LCD Controller 0 Chip Select</span>00047 <span class="preprocessor"></span><span class="preprocessor">        #define GLCD_CTRL_CS1   PB4     // pin for LCD Controller 1 Chip Select(*)</span>00048 <span class="preprocessor"></span><span class="preprocessor">        #define GLCD_CTRL_CS2   PB6     // pin for LCD Controller 2 Chip Select(*)</span>00049 <span class="preprocessor"></span><span class="preprocessor">        #define GLCD_CTRL_CS3   PB7     // pin for LCD Controller 3 Chip Select(*)</span>00050 <span class="preprocessor"></span><span class="preprocessor">        #define GLCD_CTRL_RESET PB5     // pin for LCD Reset</span>00051 <span class="preprocessor"></span>        <span class="comment">// (*) NOTE: additonal controller chip selects are optional and </span>00052         <span class="comment">// will be automatically used per each step in 64 pixels of display size</span>00053         <span class="comment">// Example: Display with 128 hozizontal pixels uses 2 controllers</span>00054 <span class="preprocessor">    #endif</span>00055 <span class="preprocessor"></span><span class="preprocessor">    #ifndef GLCD_DATA_PORT</span>00056 <span class="preprocessor"></span><span class="preprocessor">        #define GLCD_DATA_PORT  PORTC   // PORT for LCD data signals</span>00057 <span class="preprocessor"></span><span class="preprocessor">        #define GLCD_DATA_DDR   DDRC    // DDR register of LCD_DATA_PORT</span>00058 <span class="preprocessor"></span><span class="preprocessor">        #define GLCD_DATA_PIN   PINC    // PIN register of LCD_DATA_PORT</span>00059 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>00060 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00061 <span class="preprocessor"></span>00062 <span class="comment">// GLCD_MEMORY_INTERFACE specifics</span>00063 <span class="preprocessor">#ifdef GLCD_MEMORY_INTERFACE</span>00064 <span class="preprocessor"></span>    <span class="comment">// make sure these parameters are not already defined elsewhere</span>00065 <span class="preprocessor">    #ifndef GLCD_CONTROLLER0_CTRL_ADDR</span>00066 <span class="preprocessor"></span>        <span class="comment">// absolute address of LCD Controller #0 CTRL and DATA registers</span>00067 <span class="preprocessor">        #define GLCD_CONTROLLER0_CTRL_ADDR  0x1000</span>00068 <span class="preprocessor"></span><span class="preprocessor">        #define GLCD_CONTROLLER0_DATA_ADDR  0x1001</span>00069 <span class="preprocessor"></span>        <span class="comment">// offset of other controllers with respect to controller0</span>00070 <span class="preprocessor">        #define GLCD_CONTROLLER_ADDR_OFFSET 0x0002</span>00071 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>00072 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00073 <span class="preprocessor"></span>00074 00075 <span class="comment">// LCD geometry defines (change these definitions to adapt code/settings)</span>00076 <span class="preprocessor">#define GLCD_XPIXELS            128     // pixel width of entire display</span>00077 <span class="preprocessor"></span><span class="preprocessor">#define GLCD_YPIXELS            64      // pixel height of entire display</span>00078 <span class="preprocessor"></span><span class="preprocessor">#define GLCD_CONTROLLER_XPIXELS 64      // pixel width of one display controller</span>00079 <span class="preprocessor"></span>00080 <span class="comment">// Set text size of display</span>00081 <span class="comment">// These definitions are not currently used and will probably move to glcd.h</span>00082 <span class="preprocessor">#define GLCD_TEXT_LINES           8     // visible lines</span>00083 <span class="preprocessor"></span><span class="preprocessor">#define GLCD_TEXT_LINE_LENGTH    22     // internal line length</span>00084 <span class="preprocessor"></span>00085 <span class="preprocessor">#endif</span></pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Aug 22 04:29:27 2005 for Procyon AVRlib by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address></body></html>

⌨️ 快捷键说明

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