📄 lcd13xx.lst
字号:
223 drawn correctly
224 1.10.12 991008 JE a) LCD_DrawHLine changed
225 b) renamed LCD_USE_OPT -> LCD_OPTIMIZE
226 c) LCD_LSB_SHIFT introduced in order to support
227 both big and little endian systems.
228 d) Result of XY2OFF changed from byte to word
229 1.10.11 991007 JE a) Configuration switch LCD_USE_OPT included
230 b) X-clipping in DrawBitLine1BPP & DrawBitLine2BPP changed
231 c) LCD_DrawVLine changed, the last pixel of a line was not drawn
232 1.10.10 991007 JE a) Support for clipping and XOR modes for 4bpp and 8bpp included
233 b) LCD_DrawVLine optimized
234 c) X-clipping in DrawBitLine8BPP changed
235 1.10.09 991005 JE a) Support 4bpp and 8bpp included
236 b) Optimization for LCD_DrawHLine 8bpp and 4bpp
237 c) New LCD_SHIFT_DATA to shift data bits
238 d) Offset calculation in dependence of LCD_BUSWIDTH included
239 1.10.08 990928 RS a) Optimization for LCD_DrawHLine
240 b) Various compile warnings eliminated
C51 COMPILER V8.05a LCD13XX 04/11/2008 14:19:22 PAGE 5
241 c) LCD_Color2Color15 renamed LCD_Color2Index15
242 1.10.07 990927 RS a) Defaults for config switches added
243 b) LCD_SWAPXY --> LCD_SWAP_XY for compatibility
244 c) LCD_SetPalette eliminated
245 1.10.06 990924 JE/RS a) BYTESPERLINE changed to work for a normal
246 system (BMW might require Config change)
247 1.10.05 990831 RS a) Full support for transparent 16 color
248 bitmaps (bugfix)
249 1.10.04 Font support for true color
250 1.10.03
251 1.10.02 990713 RS LCD_MEMSIZE calculation changed
252 1.10.01 990713 RS Fix for Memsize in colormode
253 1.10 990711 RS Support for Segment/Com Lookup tables added
254 1.00 990118 RS First release.
255 ---------------------------LIST OF CONFIG SWITCHES--------------------
256 The following is a list of additional configuration switches for this
257 driver. These switches might not be listed in the manual, because
258 the manual mainly covers the general config switches which are
259 supported by all drivers.
260 ----------------------------------------------------------------------
261 define ----------------------Explanation------------------------------
262 LCD_SWAP_BYTE_ORDER Activate if high low bytes are swapped
263 Default: 0
264 LCD_WRITE_MEM32(Off,Data32) This macro accelerates display access
265 if defined by allowing the CPU to write
266 32 bits at a time to the controller.
267 (For 32 bits CPUs only and only if the
268 BUS interface unit can automatically
269 convert this to 2 16 bit accesses
270 LCD_OPTIMIZE Controls the use of optimized routines.
271 If 1, several (speed) optimizations are used.
272 Default: ON (1)
273 LCD_USE_BITBLT This switch controls the use of optimized routines
274 with SED1356 bitblt engine.
275 If 1, the optimized routines with bitblt access are used.
276 The default value depends of LCD_BITSPERPIXEL: (4 ) -> 0, (8,15) -> 1
277 LCD_ENABLE_REG_ACCESS()
278 LCD_ENABLE_MEM_ACCESS() In most systems (and with most LCD-controllers)
279 registers / memory can be accessed at
280 different addresses. However, in some
281 systems, it could be necessary to exec
282 code in order to be able to access the
283 registers or memory. This code should
284 then be placed in these macros (rather
285 than the actual access macros, which
286 would be slowed down)
287 LCD_DATAADR define adress if video memory can be treated
288 like regular memory
289 (will speed up driver)
290 ----------------------------------------------------------------------
291 Known problems or limitations with current version
292 ----------------------------------------------------------------------
293 none
294 ----------------------------------------------------------------------
295 Open issues
296 ----------------------------------------------------------------------
297 None
298 ---------------------------END-OF-HEADER------------------------------
299 */
300
301 #include <stddef.h> /* needed for definition of NULL */
302 #include "gui\Core\LCD_Private.h" /* private modul definitions & config */
C51 COMPILER V8.05a LCD13XX 04/11/2008 14:19:22 PAGE 6
303 #include "gui\Core\GUI_Private.h"
304 #include "gui\Core\GUIDebug.h"
305 #include "gui\LCDDriver\LCD_0.h" /* Defines for first display */
306
307
308 #if (LCD_CONTROLLER/100 == 13) && (LCD_CONTROLLER/10 != 133) \
309 && (!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
-ssible loss of data
#pragma warning(disable : 4761) // warning C4761: integral size mismatch in argument; conversion suppli
-ed
#endif
/*
*********************************************************
*
* Controller renumbering
*
*********************************************************
EPSON decided to rename all of their controllers. In order to
be able to work with old and new numbers, we simply map the old ones
to the new ones.
*/
#if LCD_CONTROLLER == 1386
#undef LCD_CONTROLLER
#define LCD_CONTROLLER 13806
#endif
/*
*********************************************************
* *
* Defaults for configuration *
* *
*********************************************************
*/
/* Switch for support of multiple pages.
Only available with certain LCD-controllers */
#ifndef LCD_SUPPORT_PAGING
#define LCD_SUPPORT_PAGING (0)
#endif
#ifndef LCD_SCHEDULE_CNT
#define LCD_SCHEDULE_CNT (0)
#endif
#ifndef LCD_NUM_CONTROLLERS
#define LCD_NUM_CONTROLLERS (1)
#endif
C51 COMPILER V8.05a LCD13XX 04/11/2008 14:19:22 PAGE 7
#ifndef LCD_BUSWIDTH
#define LCD_BUSWIDTH (16)
#endif
#ifndef LCD_OPTIMIZE
#define LCD_OPTIMIZE (1)
#endif
#if (LCD_CONTROLLER == 1356) || (LCD_CONTROLLER == 13806)
#ifndef LCD_USE_BITBLT
#if ((LCD_BITSPERPIXEL == 16) || (LCD_BITSPERPIXEL == 8 )) && (LCD_MIRROR_Y == 0) && (LCD_SWAP_XY ==
-0)
#define LCD_USE_BITBLT (1)
#else
#define LCD_USE_BITBLT (0)
#endif
#else
#if (LCD_MIRROR_Y)
#error BITBLT engine does not support LCD_MIRROR_Y = 1!
#endif
#if (LCD_SWAP_XY)
#error BITBLT engine does not support LCD_SWAP_XY = 1!
#endif
#endif
#else
#define LCD_USE_BITBLT (0)
#endif
#ifndef LCD_ENABLE_REG_ACCESS
#define LCD_ENABLE_REG_ACCESS()
#endif
#ifndef LCD_ENABLE_MEM_ACCESS
#define LCD_ENABLE_MEM_ACCESS()
#endif
#ifndef STATIC
#define STATIC static
#endif
/*
*********************************************************
* *
* Defines for configuration simulation *
* *
*********************************************************
*/
#if defined(WIN32) && !defined(USE_PC_HARDWARE)
void SIM_WriteMem8(unsigned int Off, int Data);
void SIM_WriteReg8(unsigned int Off, int Data);
int SIM_ReadMem8(unsigned int Off);
int SIM_ReadReg8(unsigned int Off);
void SIM_WriteMem16(unsigned int Off, int Data);
void SIM_WriteReg16(unsigned int Off, int Data);
int SIM_ReadMem16(unsigned int Off);
int SIM_ReadReg16(unsigned int Off);
#undef LCD_READ_MEM
#undef LCD_READ_REG
C51 COMPILER V8.05a LCD13XX 04/11/2008 14:19:22 PAGE 8
#undef LCD_WRITE_MEM
#undef LCD_WRITE_REG
#if LCD_BUSWIDTH==8
#define LCD_READ_MEM(Off) SIM_ReadMem8(Off)
#define LCD_WRITE_MEM(Off,Data) SIM_WriteMem8(Off, Data)
#define LCD_READ_REG(Off) SIM_ReadReg8(Off)
#define LCD_WRITE_REG(Off,Data) SIM_WriteReg8(Off, Data)
#elif LCD_BUSWIDTH==16
#define LCD_READ_MEM(Off) SIM_ReadMem16(Off)
#define LCD_WRITE_MEM(Off,Data) SIM_WriteMem16(Off, Data)
#define LCD_READ_REG(Off) SIM_ReadReg16(Off)
#define LCD_WRITE_REG(Off,Data) SIM_WriteReg16(Off, Data)
#endif
#elif defined(WIN32) && defined(USE_PC_HARDWARE)
void PC_WriteMem8(unsigned int Off, int Data);
void PC_WriteReg8(unsigned int Off, int Data);
int PC_ReadMem8(unsigned int Off);
int PC_ReadReg8(unsigned int Off);
void PC_WriteMem16(unsigned int Off, int Data);
void PC_WriteReg16(unsigned int Off, int Data);
int PC_ReadMem16(unsigned int Off);
int PC_ReadReg16(unsigned int Off);
#undef LCD_READ_MEM
#undef LCD_READ_REG
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -