📄 lcd6642x.lst
字号:
C51 COMPILER V8.05a LCD6642X 04/11/2008 14:19:24 PAGE 1
C51 COMPILER V8.05a, COMPILATION OF MODULE LCD6642X
OBJECT MODULE PLACED IN LCD6642X.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\LCDDriver\LCD6642X.c LARGE BROWSE MDU_F120 DEBUG OBJECTEX
-TEND PRINT(.\LCD6642X.lst) OBJECT(LCD6642X.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 :
16 Purpose :
17 ----------------------------------------------------------------------
18 Version-Date---Author-Explanation
19 ----------------------------------------------------------------------
20 1.04f 020204 JE a) Hardwareinterface routines renamed:
21 ...REG01 -> ...A1, ...REG00 -> ...A0
22 1.04e 010706 JE a) Bugfixes in DrawBitLine1BPP_Swap
23 1.04d 010627 JE a) Bugfix in DrawBitLine1BPP_Swap
24 1.04c 010420 JE a) Defaults for config switches added
25 1.04b 010418 JE a) Accelerations of DrawVLine changed
26 for using with cache
27 b) LCD_L0_DrawBitmap changed
28 1.04a 010417 RS a) DrawVLine for "Philips mode" accelerated
29 1.04 010411 JE a) 2bpp bitmaps accelerated
30 b) 1bpp bitmaps accelerated
31 1.02 010406 JE a) Use of cache completed
32 b) DrawVLine optimized
33 1.00 010401 RS a) Major work ...
34 0.02 010314 JE a) REORG0 changed
35 b) _GetPixel0 & _GetPixel0 changed
36 c) Superfluous macro definitions SETPIXEL, ... deleted
37 d) PHYS_... new to handle rotation
38 0.01 010313 JE a) Initialisation changed
39 0.00 001019 RS Start of development
40 ---------------------------LIST OF CONFIG SWITCHES--------------------
41 The following is a list of additional configuration switches for this
42 driver. These switches might not be listed in the manual, because
43 the manual mainly covers the general config switches which are
44 supported by all drivers.
45 ----------------------------------------------------------------------
46 define ----------------------Explanation------------------------------
47 LCD_OPTIMIZE Controls the use of optimized routines.
48 LCD_CACHE If active cache is used
49 ----------------------------------------------------------------------
50 Known problems or limitations with current version
51 ----------------------------------------------------------------------
52 none
53 ---------------------------END-OF-HEADER------------------------------
54 */
C51 COMPILER V8.05a LCD6642X 04/11/2008 14:19:24 PAGE 2
55
56 #include <string.h> /* for memset */
57 #include <stddef.h> /* needed for definition of NULL */
58 #include "gui\Core\LCD_Private.h" /* private modul definitions & config */
59 #include "gui\Core\GUI_Private.h"
60 #include "gui\Core\GUIDebug.h"
61 #include "gui\LCDDriver\LCD_0.h" /* Defines for first display */
62
63 #if ((LCD_CONTROLLER == 66420) | (LCD_CONTROLLER == 66421)) \
64 && (!defined(WIN32) | defined(LCD_SIMCONTROLLER))
/*
********************************************************************
*
* ID translation table
*
********************************************************************
This table contains 0, 1, 2, ... and serves as translation table for DDBs
*/
#define INTS(Base) Base+0,Base+1,Base+2,Base+3,Base+4,Base+5, \
Base+6,Base+7,Base+8,Base+9,Base+10,Base+11, \
Base+12,Base+13,Base+14,Base+15
static const LCD_PIXELINDEX aID[] = {
INTS(0),
#if LCD_MAX_LOG_COLORS > 0x10
INTS(0x10),
#endif
#if LCD_MAX_LOG_COLORS > 0x20
INTS(0x20),
INTS(0x30),
#endif
#if LCD_MAX_LOG_COLORS > 0x40
INTS(0x40),
INTS(0x50),
INTS(0x60),
INTS(0x70),
#endif
#if LCD_MAX_LOG_COLORS > 0x80
INTS(0x80),
INTS(0x90),
INTS(0xa0),
INTS(0xb0),
INTS(0xc0),
INTS(0xd0),
INTS(0xe0),
INTS(0xf0)
#endif
};
/*
*********************************************************
* *
* Defaults for configuration *
* *
*********************************************************
*/
C51 COMPILER V8.05a LCD6642X 04/11/2008 14:19:24 PAGE 3
#ifndef LCD_XORG0
#define LCD_XORG0 (0) /* leftmost position covered by this controller */
#endif
#ifndef LCD_YORG0
#define LCD_YORG0 (0) /* topmost position covered by this controller */
#endif
#ifndef LCD_STATIC
#define LCD_STATIC static
#endif
#ifndef LCD_CACHE
#define LCD_CACHE (0)
#endif
#ifndef LCD_FIRSTSEG0
#define LCD_FIRSTSEG0 (0) /* Contr.0: first segment line used */
#endif
#ifndef LCD_LASTSEG0
#define LCD_LASTSEG0 (LCD_XSIZE_PHYS-1) /* Contr.0: last segment line used */
#endif
#ifndef LCD_FIRSTCOM0
#define LCD_FIRSTCOM0 (0) /* Contr.0: first com line used */
#endif
#ifndef LCD_LASTCOM0
#define LCD_LASTCOM0 (LCD_YSIZE_PHYS-1) /* Contr.0: last com line used */
#endif
#ifndef LCD_NUM_CONTROLLERS
#define LCD_NUM_CONTROLLERS (1)
#endif
#ifndef LCD_SUPPORT_CHECKINIT
#define LCD_SUPPORT_CHECKINIT (0)
#endif
#ifndef LCD_OPTIMIZE
#define LCD_OPTIMIZE (1)
#endif
/* *********************************************************
* *
* Controller dependend values *
* *
*********************************************************
*/
#define MAX_REGS 18
#if (LCD_CONTROLLER == 66420)
#define MAX_SEGS 160
#define MAX_COMS 80
#elif (LCD_CONTROLLER == 66421)
#define MAX_SEGS 160
#define MAX_COMS 100
#endif
/*
C51 COMPILER V8.05a LCD6642X 04/11/2008 14:19:24 PAGE 4
*********************************************************
* *
* Compiler specific settings *
* *
*********************************************************
*/
#ifdef WIN32 /* Avoid warnings in MS-compiler */
#pragma warning(disable : 4761) // warning C4761: integral size mismatch in argument; conversion suppli
-ed
#endif
/*
*********************************************************
*
* Defines for simulation
*
*********************************************************
*/
#ifdef WIN32
U8 SIM_Read00(void);
U8 SIM_Read01(void);
U8 SIM_Read10(void);
U8 SIM_Read11(void);
void SIM_Write00(U8 Data);
void SIM_Write01(U8 Data);
void SIM_Write10(U8 Data);
void SIM_Write11(U8 Data);
/* Write data */
#undef LCD_WRITE_A0
#define LCD_WRITE_A0(Data) SIM_Write00(Data)
#undef LCD_WRITE_A1
#define LCD_WRITE_A1(Data) SIM_Write01(Data)
#if LCD_NUM_CONTROLLERS > 1
#undef LCD_WRITE_A0C1
#define LCD_WRITE_A0C1(Data) SIM_Write10(Data)
#undef LCD_WRITE_A1C1
#define LCD_WRITE_A1C1(Data) SIM_Write11(Data)
#endif /* LCD_NUM_CONTROLLERS > 1 */
/* Read data */
#undef LCD_READ_A0
#define LCD_READ_A0(Data) Data = SIM_Read00()
#undef LCD_READ_A1
#define LCD_READ_A1(Data) Data = SIM_Read01()
#if LCD_NUM_CONTROLLERS > 1
#undef LCD_READ_A0C0
#define LCD_READ_A0C0(Data) Data = SIM_Read10()
#undef LCD_READ_A1C0
#define LCD_READ_A1C0(Data) Data = SIM_Read11()
#endif /* LCD_NUM_CONTROLLERS > 1 */
#endif
/*
*********************************************************
*
* Remap ...A0, ...A1 -> ...CMD, ...DATA
*
*********************************************************
*/
#define LCD_WRITE_REG00 LCD_WRITE_A0
C51 COMPILER V8.05a LCD6642X 04/11/2008 14:19:24 PAGE 5
#define LCD_WRITE_REG01 LCD_WRITE_A1
#define LCD_READ_REG00 LCD_READ_A0
#define LCD_READ_REG01 LCD_READ_A1
#if LCD_NUM_CONTROLLERS > 1
#define LCD_WRITE_REG10 LCD_WRITE_A0C1
#define LCD_WRITE_REG11 LCD_WRITE_A1C1
#define LCD_READ_REG10 LCD_READ_A0C1
#define LCD_READ_REG11 LCD_READ_A1C1
#endif
/*
*********************************************************
* *
* Internal types *
* *
*********************************************************
*/
#define PIXELCOLOR U8
#define BKCOLOR LCD_BKCOLORINDEX
#define COLOR LCD_COLORINDEX
/*
*********************************************************
* *
* Support for Segment/COMLUTs *
* *
*********************************************************
*/
/* For compatibility with older configs, define defaults */
#ifndef LCD_SUPPORT_COMTRANS
#define LCD_SUPPORT_COMTRANS 0
#endif
#ifndef LCD_SUPPORT_SEGTRANS
#define LCD_SUPPORT_SEGTRANS 0
#endif
#if LCD_SUPPORT_COMTRANS
extern LCD_TYPE_COMTRANS LCD__aLine2Com0[LCD_LASTCOM0-LCD_FIRSTCOM0+1];
#endif
#if LCD_SUPPORT_SEGTRANS
extern LCD_TYPE_SEGTRANS LCD__aRow2Seg0[LCD_LASTSEG0-LCD_FIRSTSEG0+1];
#endif
/*
*********************************************************
* *
* Macro calculations *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -