📄 lcdslin.lst
字号:
C51 COMPILER V8.05a LCDSLIN 04/11/2008 14:19:26 PAGE 1
C51 COMPILER V8.05a, COMPILATION OF MODULE LCDSLIN
OBJECT MODULE PLACED IN LCDSLin.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\LCDDriver\LCDSLin.c LARGE BROWSE MDU_F120 DEBUG OBJECTEXT
-END PRINT(.\LCDSLin.lst) OBJECT(LCDSLin.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 : LCDSLin.C
16 Purpose : Driver for LCDs using simple bus interface
17
18 Currently supported controllers:
19
20 Toshiba T6963
21 Epson SED1330
22 Epson SED1335
23
24 ----------------------------------------------------------------------
25 Version-Date---Author-Explanation
26 ----------------------------------------------------------------------
27 2.00g 020319 JE a) Macro changed to fix NC30-error
28 2.00f 020204 JE a) Hardwareinterface routines renamed:
29 ...DATA -> ...A0, ...CMD -> ...A1
30 2.00e 011112 JE a) LCD_INIT_CONTROLLER added to be able to
31 execute LCD_X_Init during init
32 2.00d 010926 JE a) Support for LCD_SWAP_XY added
33 2.00c 010706 JE a) Bugfix in DrawBitLine1BPP
34 2.00b 010402 RS a) LCD_GetDevCaps removed from driver
35 (now LCD.c)
36 2.00a 008026 RS a) Simulation interface changed
37 2.00 000525 JE a) Interface changed
38 1.02c 000509 JE a) Simple bus interface changed for SED133x
39 b) Small changes in DrawBitLine1BPP
40 c) Cache initialisation to SED133x added
41 1.02b 000508 JE a) Simple bus interface changed for T6963
42 1.02a 000426 JE a) Transparent mode in DrawBitLine1BPP changed
43 b) Dummy LCD_L0_SetLUTEntry inserted
44 1.02 000426 RS a) Changes for new LCD-driver interface V1.30
45 1.00a 000410 JE a) LCD_GetDevCap changed
46 b) LCD_GetpCapFunc deleted
47 c) LCD_DrawBitMap changed
48 d) Definition for aColorIndex changed
49 1.00 000407 JE First release
50 ---------------------------LIST OF CONFIG SWITCHES--------------------
51 The following is a list of additional configuration switches for this
52 driver. These switches might not be listed in the manual, because
53 the manual mainly covers the general config switches which are
54 supported by all drivers.
C51 COMPILER V8.05a LCDSLIN 04/11/2008 14:19:26 PAGE 2
55 ----------------------------------------------------------------------
56 define ----------------------Explanation------------------------------
57 LCD_OPTIMIZE Controls the use of optimized routines.
58 ----------------------------------------------------------------------
59 Known problems or limitations with current version
60 ----------------------------------------------------------------------
61 none
62 ---------------------------END-OF-HEADER------------------------------
63 */
64
65 #include <string.h> /* for memset */
66 #include <stddef.h> /* needed for definition of NULL */
67 #include "gui\Core\LCD_Private.h" /* private modul definitions & config */
68 #include "gui\Core\GUI_Private.h"
69 #include "gui\Core\GUIDebug.h"
70 #include "gui\LCDDriver\LCD_0.h" /* Defines for first display */
71
72
73 #if (LCD_CONTROLLER == 6963) || (LCD_CONTROLLER == 1330) || (LCD_CONTROLLER == 1335) \
74 && (!defined(WIN32) | defined(LCD_SIMCONTROLLER))
/*
********************************************************************
* *
* Conversion table
* *
********************************************************************
*/
static const LCD_PIXELINDEX LCD_ConversionTable[2] = {0, 1};
/*
*********************************************************
* *
* Defaults for configuration *
* *
*********************************************************
*/
#ifndef LCD_OPTIMIZE
#define LCD_OPTIMIZE (1)
#endif
#ifndef LCD_CHECKBUSY
#define LCD_CHECKBUSY (1)
#endif
#ifndef LCD_INIT
#define LCD_INIT()
#endif
#ifndef LCD_WATCHDOG_TRIGGERCNT
#define LCD_WATCHDOG_TRIGGERCNT (0)
#endif
#ifndef LCD_KICK_WATCHDOG
#define LCD_KICK_WATCHDOG()
#endif
C51 COMPILER V8.05a LCDSLIN 04/11/2008 14:19:26 PAGE 3
#ifndef LCD_CACHE
#define LCD_CACHE (1)
#endif
#ifndef LCD_SUPPORT_REFRESH
#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 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
/* Switch support for the LCD_CopyRect function of the driver */
#ifndef LCD_SUPPORT_COPYRECT
#define LCD_SUPPORT_COPYRECT (1)
#endif
#ifndef LCD_INIT_CONTROLLER
#define LCD_INIT_CONTROLLER()
#endif
/*
*********************************************************
* *
* Internal types *
* *
*********************************************************
*/
#if LCD_BITSPERPIXEL == 1
#define PIXELCOLOR U8
#else
#error LCD_BITSPERPIXEL != 1 not supported
#endif
/*
*********************************************************
* *
C51 COMPILER V8.05a LCDSLIN 04/11/2008 14:19:26 PAGE 4
* Configuration switch checking *
* *
*********************************************************
Please be aware that not all configuration errors can be captured !
*/
/* Check number of controllers */
#if (LCD_NUM_CONTROLLERS != 1)
#error "Only 1 controller supported by this driver"
#endif
/*
*********************************************************
*
* Defines for simulation
*
*********************************************************
*/
#ifdef WIN32
#undef LCD_WRITE_A0
#undef LCD_WRITE_A1
#undef LCD_READ_A0
#undef LCD_READ_A1
void SIM_WriteA1C0(U8 Data);
void SIM_WriteA0C0(U8 cmd);
U8 SIM_ReadA1C0(void);
U8 SIM_ReadA0C0(void);
#define LCD_WRITE_A1(Data) SIM_WriteA1C0(Data)
#define LCD_WRITE_A0(cmd) SIM_WriteA0C0(cmd)
#define LCD_READ_A1() SIM_ReadA1C0()
#define LCD_READ_A0() SIM_ReadA0C0()
#endif
/*
*********************************************************
* *
* Standard variables for driver *
* *
*********************************************************
*/
static U8 Cache[((LCD_XSIZE_PHYS+7)>>3)*LCD_YSIZE_PHYS];
#if LCD_WATCHDOG_TRIGGERCNT
int WatchdogTriggerCnt;
#endif
#if LCD_SUPPORT_VERIFY
static int ErrCnt;
static int ErrStat;
#endif
/*
*********************************************************
* *
* Support for Segment/COMLUTs *
* *
C51 COMPILER V8.05a LCDSLIN 04/11/2008 14:19:26 PAGE 5
*********************************************************
*/
/* 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
/*
*********************************************************
* *
* Macros for internal use *
* *
*********************************************************
*/
#if (LCD_SUPPORT_COMTRANS)
#if (LCD_MIRROR_Y)
#error LCD_MIRROR_Y not supported with COMTrans !
#endif
#if (LCD_MIRROR_X)
#error LCD_MIRROR_X not supported with COMTrans !
#endif
#endif
#if (!LCD_SUPPORT_COMTRANS && !LCD_SUPPORT_SEGTRANS)
#if (!LCD_MIRROR_X && !LCD_MIRROR_Y && !LCD_SWAP_XY)
#define SETPIXEL(x, y, c) _SetPixel(x, y, c)
#define GETPIXEL(x, y) _GetPixel(x,y)
#define XORPIXEL(x, y) XorPixel(x,y)
#elif (!LCD_MIRROR_X && !LCD_MIRROR_Y && LCD_SWAP_XY)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -