📄 lcd07x1.lst
字号:
C51 COMPILER V8.05a LCD07X1 04/11/2008 14:19:22 PAGE 1
C51 COMPILER V8.05a, COMPILATION OF MODULE LCD07X1
OBJECT MODULE PLACED IN LCD07X1.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\LCDDriver\LCD07X1.c LARGE BROWSE MDU_F120 DEBUG OBJECTEXT
-END PRINT(.\LCD07X1.lst) OBJECT(LCD07X1.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 : LCD07X1.c
16 Purpose : Driver for LCDs using K70741 controllers or compatible.
17 ----------------------------------------------------------------------
18 Version-Date---Author-Explanation
19 ----------------------------------------------------------------------
20 2.00c 020708 JE a) Changed to work with 2bpp DDP bitmaps
21 2.00b 020204 JE a) Hardwareinterface routines renamed:
22 ...DATA -> ...A1, ...CMD -> ...A0
23 2.00a 010924 JE a) Bugfixes: LCD_MIRROR_X, LCD_MIRROR_Y
24 2.00 010402 RS a) LCD_GetDevCaps removed from driver
25 (now LCD.c)
26 1.04 000925 RS a) Support for 8bpp DDBs added
27 1.03 000505 JE a) XOR mode inserted
28 b) Renamed this file from LCD0711.C -> LCD07X1.C
29 1.02 000329 RS Clean up
30 1.01 000329 RS Cache flushing optimized
31 1.00 000329 RS First official release. Most routine are
32 optimized, cache control added.
33 0.00 990118 EZ/RS First release for Motorola Israel only,
34 not configuarable, not optimized.
35 ---------------------------LIST OF CONFIG SWITCHES--------------------
36 The following is a list of additional configuration switches for this
37 driver. These switches might not be listed in the manual, because
38 the manual mainly covers the general config switches which are
39 supported by all drivers.
40 ----------------------------------------------------------------------
41 define ----------------------Explanation------------------------------
42 LCD_OPTIMIZE Controls the use of optimized routines.
43 ----------------------------------------------------------------------
44 Known problems or limitations with current version
45 ----------------------------------------------------------------------
46 a) LCD_MIRROR_X,Y can not be used together with LCD_SWAP_XY
47 ---------------------------END-OF-HEADER------------------------------
48 */
49
50
51 #include <stddef.h> /* needed for definition of NULL */
52 #include <string.h> /* memset & memcpy is used in driver! */
53 #include "gui\Core\LCD_Private.h" /* private modul definitions & config */
54 #include "gui\Core\GUI_Private.h"
C51 COMPILER V8.05a LCD07X1 04/11/2008 14:19:22 PAGE 2
55 #include "gui\Core\GUIDebug.h"
56 #include "gui\LCDDriver\LCD_0.h" /* Defines for first display */
57
58 #if ((LCD_CONTROLLER == 711)|(LCD_CONTROLLER == 741)) \
59 && (!defined(WIN32) | defined(LCD_SIMCONTROLLER))
/*
*********************************************************
* *
* Defaults for configuration *
* *
*********************************************************
*/
#ifndef LCD_STATIC
#define LCD_STATIC static
#endif
#ifndef LCD_WATCHDOG_TRIGGERCNT
#define LCD_WATCHDOG_TRIGGERCNT 0
#endif
#ifndef LCD_KICK_WATCHDOG
#define LCD_KICK_WATCHDOG()
#endif
#ifndef LCD_NUM_EMPTY_LINES
#define LCD_NUM_EMPTY_LINES (0)
#endif
#ifndef LCD_FIRSTSEG0
#define LCD_FIRSTSEG0 (0) /* Contr.0: first segment line used */
#endif
#ifndef LCD_LASTSEG0
#if (!LCD_SWAP_XY)
#define LCD_LASTSEG0 (LCD_XSIZE-1) /* Contr.0: last segment line used */
#else
#define LCD_LASTSEG0 (LCD_YSIZE-1)
#endif
#endif
#ifndef LCD_FIRSTCOM0
#define LCD_FIRSTCOM0 (0) /* Contr.0: first com line used */
#endif
#ifndef LCD_LASTCOM0
#if (!LCD_SWAP_XY)
#define LCD_LASTCOM0 (LCD_YSIZE-1) /* Contr.0: last com line used */
#else
#define LCD_LASTCOM0 (LCD_XSIZE-1) /* Contr.0: last com line used */
#endif
#endif
#ifndef LCD_CACHE
#define LCD_CACHE (1)
#endif
#ifndef LCD_SUPPORT_REFRESH
C51 COMPILER V8.05a LCD07X1 04/11/2008 14:19:22 PAGE 3
#define LCD_SUPPORT_REFRESH LCD_CACHE
#endif
#ifndef LCD_REVERSEMODE_SUPPORT
#define LCD_REVERSEMODE_SUPPORT (0)
#endif
#ifndef LCD_SUPPORT_VERIFY
#define LCD_SUPPORT_VERIFY (0)
#endif
/* Switch for support of cache control (locking) */
#ifndef LCD_SUPPORT_CACHECONTROL
#define LCD_SUPPORT_CACHECONTROL LCD_CACHE
#endif
/* If disabled, selected drawmode is ignored.
==> XOR, REVERSE drawing not supported */
#ifndef LCD_SUPPORT_DRAWMODE
#define LCD_SUPPORT_DRAWMODE (1)
#endif
/* 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
#ifndef LCD_SUPPORT_CHECKINIT
#define LCD_SUPPORT_CHECKINIT (0)
#endif
#ifndef LCD_BUSWIDTH
#define LCD_BUSWIDTH (16)
#endif
/* Bit position of least sig. byte when accessing words */
#ifndef LCD_LSB_SHIFT
#define LCD_LSB_SHIFT (0)
#endif
#ifndef LCD_OPTIMIZE
#define LCD_OPTIMIZE (1)
#endif
/*
*********************************************************
* *
* Macros, standard *
* *
*********************************************************
These macros can be found in any LCD-driver as they serve purposes
C51 COMPILER V8.05a LCD07X1 04/11/2008 14:19:22 PAGE 4
that can be found in any class of LCD-driver (Like clipping).
*/
#define BKCOLOR LCD_BKCOLORINDEX
#define COLOR LCD_COLORINDEX
#define LCD_DrawMode GUI_Context.DrawMode
/*
*********************************************************
* *
* 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
#undef LCD_WRITE_A0
#undef LCD_WRITE_A1
#undef LCD_WRITEM_A1
#undef LCD_INIT_CONTROLLER
void SIM_WriteA1C0(U8 Data);
void SIM_WriteA0C0(U8 cmd);
void SIM_WriteMA1C0(U8*pData, int NumBytes);
#define LCD_WRITE_A0(cmd) SIM_WriteA0C0(cmd)
#define LCD_WRITE_A1(Data) SIM_WriteA1C0(Data)
#define LCD_WRITEM_A1(Data, NumBytes) SIM_WriteMA1C0(Data, NumBytes)
#define LCD_INIT_CONTROLLER()
#endif
/*********************************************************************
*
* Remap ...A0, ...A1 -> ...CMD, ...DATA
*
**********************************************************************
*/
#define LCD_WRITEDATA1 LCD_WRITE_A1
#define LCD_WRITEMDATA LCD_WRITEM_A1
#define LCD_WRITECMD LCD_WRITE_A0
/*
*********************************************************
* *
* Internal types *
* *
*********************************************************
*/
C51 COMPILER V8.05a LCD07X1 04/11/2008 14:19:22 PAGE 5
/* Define number of available segments of controller */
#if (LCD_CONTROLLER == 711)
#define LCD_SEGS_MAX 128
#define LCD_COMS_MAX 64
#elif (LCD_CONTROLLER == 741)
#define LCD_SEGS_MAX 128
#define LCD_COMS_MAX 128
#else
#error Please define a controller to use !
#endif
/*
*********************************************************
* *
* Internal types *
* *
*********************************************************
*/
#if LCD_BITSPERPIXEL <=8
#define PIXELCOLOR U8
#elif (LCD_BITSPERPIXEL >8) && (LCD_BITSPERPIXEL < 16)
#define PIXELCOLOR U16
#else
#error LCD_BITSPERPIXEL > 16 not supported
#endif
/*
*********************************************************
* *
* SCHEDULING *
* *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -