📄 lcd15xx.lst
字号:
C51 COMPILER V8.05a LCD15XX 04/11/2008 14:19:23 PAGE 1
C51 COMPILER V8.05a, COMPILATION OF MODULE LCD15XX
OBJECT MODULE PLACED IN LCD15XX.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\LCDDriver\LCD15XX.c LARGE BROWSE MDU_F120 DEBUG OBJECTEXT
-END PRINT(.\LCD15XX.lst) OBJECT(LCD15XX.obj)
line level source
1 /*
2 *********************************************************************************************************
3 * uC/GUI
4 * Universal graphic software for embedded applications
5 *
6 * (c) Copyright 2002, Micrium Inc., Weston, FL
7 * (c) Copyright 2002, SEGGER Microcontroller Systeme GmbH
8 *
9 * 礐/GUI is protected by international copyright laws. Knowledge of the
10 * source code may not be used to write a similar product. This file may
11 * only be used in accordance with a license and should not be redistributed
12 * in any way. We appreciate your understanding and fairness.
13 *
14 ----------------------------------------------------------------------
15 File : LCD15XX.C
16 Purpose : Driver for LCDs using Seiko Epson SED15XX controllers
17 The current version supports up to 4 LCD controllers in
18 (almost) any hardware configuration. The following
19 derivatives are currently supported:
20 Epson SED1560
21 Epson SED1565 132*65 BW
22 Epson SED1566 132*49 BW (untested due to lack of hardware)
23 Epson SED1567 132*33 BW (untested due to lack of hardware)
24 Epson SED1568 132*55 BW (untested due to lack of hardware)
25 Epson SED1569 132*53 BW (untested due to lack of hardware)
26 Epson SED1575 132*200 BW
27 Samsung KS0108B
28 Hitachi HD61202
29
30 Other Epson LCD controllers are very similar and could
31 be covered by this driver as well, but are not
32 currently supported.
33 ----------------------------------------------------------------------
34 Version-Date---Author-Explanation
35 ----------------------------------------------------------------------
36 2.02e 020716 JE a) Support for KS0108B & HD61202 added
37 2.02d 020715 JE a) Reworked to work with 2 LCD-controllers
38 2.02c 020204 JE a) Hardwareinterface routines renamed:
39 ...DATA -> ...A1, ...CMD -> ...A0
40 2.02b 010706 JE a) BUGFIXES: DrawBitLine1BPP_NoSwap
41 2.02a 010402 RS a) LCD_GetDevCaps removed from driver
42 (now LCD.c)
43 2.02 010329 JE a) Completely revised, tested without mirror & swap
44 2.00 001107 RS a) New driver interface V2.00 used
45 1.32.01 000321 RS a) BUGFIX: LCD__ClearVRam: aCAdr set to LCD_SEGS_MAX-1
46 b) BUGFIX: Flush: DataR_Cache = DataW_Cache inserted
47 JE c) BUGFIX: ASSIGN_PIXEL_FAST now takes account
48 of LCD_DRAWMODE_XOR
49 d) BUGFIX: DrawBitLine1BPP_NoSwap XORMODE now works
50 e) BUGFIX: DrawBitLine1BPP_NoSwap clipping now works
51 f) BUGFIX: FindByte: -LCD_FIRSTSEG0 removed
52 g) BUGFIX: LCD_RefreshSection: -LCD_FIRSTSEG0 removed
53 h) LCD_DrawBit now checks number of colors
54 1.32.00 990930 RS a) LCD_Init now returns an int
C51 COMPILER V8.05a LCD15XX 04/11/2008 14:19:23 PAGE 2
55 b) bit changed -> Bit in order to vaoid problems
56 with IAR compilers
57 1.31.06 990926 RS a) Code is generated now only if LCD_CONTROLLER
58 is in the range of 1500 - 1599, allowing to
59 compile all LCD drivers with a project, making
60 the selection in the config file.
61 b) Config defaults added
62 1.31.05 990922 RS/BB a) Number of Segments for 1575 changed from 168
63 to 200. 200 is correct because the controller
64 has RAM for 200 segments, even thou just 168
65 segment lines
66 b) Transparency support for bitmaps in
67 DrawBitLine1BPP_Swap added
68 1.31.04 990810 RS a) LCD__ClearVRam: Cut and paste error elimiated
69 (Relevant only in 4 controller system)
70 b) Transparency problem in DrawBitLine1BPP_Swap
71 eliminated
72 c) CALCXY: LCD_FIRSTSEG had been subtracted,
73 but had already been subtracted before. Could
74 lead to a an offset in the memory area used as
75 video RAM if LCD_FIRSTSEG<x> != 0.
76 Fixed.
77 d) FlushCache-routine simplified for easier
78 maintanance using a macro
79 e) Bugfix in FlushCache-routine --- untested
80 due to lack of hardware !
81 1.31.03 990720 RS a) Compile problem in single-controller system
82 (CurController) fixed
83 b) GotoYPlus1(void) Prototype: Parameterlist:
84 () replaced by (void) to avoid comiler warning
85 1.31.02 990713 RS a) All (global/static) variables are initialized in
86 LCD_Init. This turned out to be necessary as not
87 all systems comply with ANSI-"C" and automatically
88 initialize these variables with 0.
89 1.31.01 990712 RS a) Cache locking bug for systems with seg/Com lookup
90 tables fixed. Cache writeout accelerated.
91 1.31.00 990712 RS a) FindByte made leaner and converted to a macro
92 for 2 controller systems, resulting in improved
93 performance
94 b) Internal DrawLine /DrawBitmap routines
95 improved for higher performance and better
96 readability
97 c) Inline versions of SetPixel/ClrPixel created, as
98 well as fast versions of ASSIGN_PIXEL
99 (again: for better performance !)
100 1.30.03 990709 RS a) Structural changes leading to clearer
101 structure and higher performance
102 b) FindByte Optimization for 2-Controller system
103 c) Bugfix: One of the previous optimizations
104 could lead to a duplicated byte in video memory
105 when LCD_DrawByte was called fo very
106 narrow bitmaps. Fixed.
107 1.30.02 990708 RS a) ReadData optimized if all bytes are
108 in Cache (macro, no switch statement)
109 1.30.01 990707 RS a) Add. Optimization in FindByte
110 1.30.00 990707 RS a) Various optimizations impemented, esp.
111 if translation (lookup) table for COMs is
112 activated
113 1.21.02 990617 RS a) Macro bug (created in 1.21.01) cleaned up
114 b) Page 8 of all controllers cleared during
115 init in order to make sure that the COMS
116 signal can be used and the data for it is
C51 COMPILER V8.05a LCD15XX 04/11/2008 14:19:23 PAGE 3
117 cleared to 0
118 c) Problem with segment table fixed ...
119 If used, the segments were moved by LCD_FIRSTSEG<X>
120 1.21.01 990615 RS a) Some more macros generated in order to
121 keep the driver easy to maintain
122 b) Com-offset is now subtracted from Cache<X>
123 index (in order to avoid potential bounds
124 problem): e.g.:
125 Cache0[Page][Col] --> Cache0[Page][Col-LCD_FIRSTSEG0]
126 1.21.00 990615 RS a) When using segment/com lookup tables,
127 the macro-values
128 LCD_NUM_COMS0, LCD_NUM_COMS0
129 LCD_NUM_COMS1, LCD_NUM_COMS1 (controller 1)
130 Have to be defined.
131 Add. configuration checking added.
132 1.20.02 990614 RS a) LCD_Init did not clear VMem for 3. and 4.
133 controller. Fixed.
134 configuration switches eliminated
135 1.20.01 990614 RS a) Problem with certain combination of
136 configuration switches eliminated
137 1.20.00 990614 RS a) Optional segment and com translation tables
138 supported. This turned out to be necessary
139 as with some LCDs the COM/SEG lines are
140 completely mixed up. The translation tables
141 have to be defined in a seperate file
142 (sample supplied in LCDTable.c) in
143 order to make sure that the code in this
144 driver does not have to be changed.
145 1.10.00 990505 RS a) Optional support for Cache locking added.
146 It now requires the add. configuration switch
147 LCD_SUPPORT_CACHECONTROL
148 1.04.00 990420 AW/RS a) Support for 1560 added.
149 1.03.03 990322 RS a) Bitmaps have not been properly cut off at the
150 end of the clipping region. Fixed
151 b) Clipping for horizontal/vert. lines
152 implemented
153 1.03.02 990319 RS a) When writing bitmaps in XOR-Mode, the LCD
154 cache was not automatically flushed.
155 Fixed.
156 1.03.01 990319 RS a) (Kuennemann) If multiple LCD-controllers had
157 been used in a horizontal array (different
158 SEG lines with SEG<X> > 0) the page
159 calculation did not take the SEG<X> value
160 into account. Fixed.
161 b) (Kuennemann)
162 LCD_Init(): VRAM of controller2/3 was not
163 cleared in a 3 or 4 controller system.
164 Fixed.
165 c) LCD_SetInverse / LCD_ClrInverse:
166 These routines did not write the command to
167 all LCD-controllers, but only to the first
168 one. Fixed.
169 1.03.00 990317 RS a) XOR Mode implemented for all configurations
170 b) DrawVLine accelerated
171 1.02.03 990218 RS a) (Kuennemann) If multiple LCD-controllers had
172 been used in a vertical array (different
173 COM lines with COM<X> > 0) the page
174 calculation did not take the COM<X> value
175 into account. Fixed.
176 b) Driver should now also work with 4
177 controllers. However, this configuration is
178 still untested. The #error is taken out.
C51 COMPILER V8.05a LCD15XX 04/11/2008 14:19:23 PAGE 4
179 1.02.02 990217 RS a) LCD_GetVisPage, LCD_GetSelPage added
180 1.02.01 990216 RS a) LCD_GetPixel implemented
181 b) Support for GetDeviceCaps added
182 c) Support for Drawmode can now be disabled via
183 config switch
184 1.02.00 990212 RS a) Include file string.h put back in in order to
185 be able to completly reset the LCD, including
186 clearing the cache
187 b) LCD_Refresh implemented
188 c) Support for physical bitmaps added
189 d) Support for LCD_REVERSE added
190 e) Support for Write-thru cache added
191 1.01.01 990203 RS a) Include file string.h no longer needed,
192 taken out
193 1.01.00 990203 RS a) Cache no longer filled with 0 using memset
194 (We trust the compiler to do the job for us.)
195 1.00.02 990202 RS Support for up to 4 controllers implemented
196 1.00.01 990128 RS Changes in header-configuration as discussed
197 with BB
198 1.00 990118 RS First release for up to 2 LCD controllers *
199 ----------------------------------------------------------------------
200 Known problems or limitations with current version
201 ----------------------------------------------------------------------
202 Due to the change to interface version 2.0,
203 The draw bitline routines has been temp. disabled
204 The routines:
205 LCD_L0_SetPixelIndex
206 LCD_L0_XorPixel
207 LCD_L0_GetPixelIndex
208 need to be proberly implemented
209 ----------------------------------------------------------------------
210 Possible optimizations
211 ----------------------------------------------------------------------
212 ---------------------------END-OF-HEADER------------------------------
213 */
214
215 #include <string.h> /* for memset */
216 #include <stddef.h> /* needed for definition of NULL */
217 #include "gui\Core\LCD_Private.h" /* private modul definitions & config */
218 #include "gui\Core\GUI_Private.h"
219 #include "gui\Core\GUIDebug.h"
220 #include "gui\LCDDriver\LCD_0.h" /* Defines for first display */
221
222 #if ( (LCD_CONTROLLER/100 == 15) \
223 || (LCD_CONTROLLER == 0713) \
224 || (LCD_CONTROLLER == 108) \
225 || (LCD_CONTROLLER == 61202) \
226 ) \
227 && (LCD_CONTROLLER/100 != 0x15E05 ) \
228 && (!defined(WIN32) | defined(LCD_SIMCONTROLLER))
/*
*********************************************************
* *
* Compiler specific settings *
* *
*********************************************************
*/
#ifdef WIN32 /* Avoid warnings in MS-compiler */
#pragma warning(disable : 4244) // warning C4244: '=' : conversion from 'long ' to 'unsigned char ', po
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -