📄 lcdmemc.lst
字号:
C51 COMPILER V8.05a LCDMEMC 04/11/2008 14:19:25 PAGE 1
C51 COMPILER V8.05a, COMPILATION OF MODULE LCDMEMC
OBJECT MODULE PLACED IN LCDMemC.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\LCDDriver\LCDMemC.c LARGE BROWSE MDU_F120 DEBUG OBJECTEXT
-END PRINT(.\LCDMemC.lst) OBJECT(LCDMemC.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 : LCDMem.C
16 Purpose : Driver for LCDs using internal memory
17 ----------------------------------------------------------------------
18 Version-Date---Author-Explanation
19 ----------------------------------------------------------------------
20 2.01a 010927 JE a) Reworked to work with LCD_MIRROR_...
21 and LCD_SWAP_XY
22 2.01 010814 JE a) Support for 6bpp added,
23 HLine & 1bpp optimized
24 2.00 010402 RS a) LCD_GetDevCaps removed from driver
25 (now LCD.c)
26 0.92 000122 RS _GetPixel functionality written
27 0.91 000121 RS Default for LCD_VRAMTYPE defined
28 0.90 991205 RS Driver accelerated
29 0.00 990118 RS First release.
30 ----------------------------------------------------------------------
31 Known problems or limitations with current version
32 ----------------------------------------------------------------------
33 None.
34 ---------------------------LIST OF CONFIG SWITCHES--------------------
35 The following is a list of additional configuration switches for this
36 driver. These switches might not be listed in the manual, because
37 the manual mainly covers the general config switches which are
38 supported by all drivers.
39 ----------------------------------------------------------------------
40 define ----------------------Explanation------------------------------
41 LCD_LSB_SHIFT Support for both big and little endian
42 systems.
43 0 for little endian (default),
44 8 for big endian.
45 LCD_OPTIMIZE Controls the use of optimized routines.
46 If 1, several (speed) optimizations are used.
47 Default: ON (1)
48 LCD_VRAMTYPE Controls storage area of VRAM
49 ---------------------------END-OF-HEADER------------------------------
50 */
51
52 #define LCDMEMC_C
53
54 #include <string.h> /* for memset */
C51 COMPILER V8.05a LCDMEMC 04/11/2008 14:19:25 PAGE 2
55 #include <stddef.h> /* needed for definition of NULL */
56 #include "gui\Core\LCD_Private.h" /* private modul definitions & config */
57 #include "gui\Core\GUI_Private.h"
58 #include "gui\Core\GUIDebug.h"
59 #include "gui\LCDDriver\LCD_0.h" /* Defines for first display */
60
61 #ifndef LCD_VRAMTYPE
62 #define LCD_VRAMTYPE
63 #endif
64
65
66
67 #if (LCD_CONTROLLER == 0) && ((LCD_FIXEDPALETTE == 111) || (LCD_FIXEDPALETTE == 222)) \
68 && (!defined(WIN32) | defined(LCD_SIMCONTROLLER))
/* Generate code only if selected ! */
#define LCD_BYTESPERLINE (3*(((LCD_VXSIZE_PHYS)+7)/8))
#ifndef WIN32
#if (LCD_BITSPERPIXEL == 3)
LCD_VRAMTYPE U8 LCD_VRam[LCD_BITSPERPIXEL/3][LCD_VYSIZE_PHYS * LCD_BYTESPERLINE];
#elif (LCD_BITSPERPIXEL == 6)
LCD_VRAMTYPE U8 LCD_VRam_0[LCD_VYSIZE_PHYS * LCD_BYTESPERLINE];
LCD_VRAMTYPE U8 LCD_VRam_1[LCD_VYSIZE_PHYS * LCD_BYTESPERLINE];
#endif
#else
U8* GetpVRam(int);
#if (LCD_BITSPERPIXEL == 3)
U8* pVRam;
#elif (LCD_BITSPERPIXEL == 6)
U8* pVRam_0;
U8* pVRam_1;
#endif
#endif
/*
********************************************************************
* *
* Defaults for configuration *
* *
********************************************************************
Please be aware that not all configuration errors can be captured !
*/
#ifndef LCD_VERIFY
#define LCD_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
/* Switch for support of run-time inversion of display. */
#ifndef LCD_SUPPORT_REVERSEMODE
C51 COMPILER V8.05a LCDMEMC 04/11/2008 14:19:25 PAGE 3
#define LCD_SUPPORT_REVERSEMODE (0)
#endif
/* Switch support for the LCD_SetOrg function of the driver */
#ifndef LCD_SUPPORT_SETORG
#define LCD_SUPPORT_SETORG (1)
#endif
#ifndef LCD_SUPPORT_PALETTE
#define LCD_SUPPORT_PALETTE (1)
#endif
#ifndef LCD_SCHEDULE_CNT
#define LCD_SCHEDULE_CNT (0)
#endif
#ifndef LCD_ISRDATA
#define LCD_ISRDATA
#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
/*
********************************************************************
* *
* 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 U8 LCD__aLine2Com0[LCD_LASTCOM0-LCD_FIRSTCOM0+1];
#endif
#if LCD_SUPPORT_SEGTRANS
extern U8 LCD__aRow2Seg0[LCD_LASTSEG0-LCD_FIRSTSEG0+1];
#endif
/*
********************************************************************
* *
* Macro calculations *
* *
********************************************************************
*/
C51 COMPILER V8.05a LCDMEMC 04/11/2008 14:19:25 PAGE 4
/* Define number of used coms/segments per controller */
#define LCD_NUM_SEGS0 (LCD_LASTSEG0-LCD_FIRSTSEG0+1)
#define LCD_NUM_COMS0 (LCD_LASTCOM0-LCD_FIRSTCOM0+1)
/* Define total number of used coms/segments */
#define LCD_NUM_SEGS LCD_NUM_SEGS0
#define LCD_NUM_COMS LCD_NUM_COMS0
#define BKCOLOR LCD_BKCOLORINDEX
#define COLOR LCD_COLORINDEX
/*
********************************************************************
* *
* Configuration switch checking *
* *
********************************************************************
Please be aware that not all configuration errors can be captured !
*/
#if (LCD_BITSPERPIXEL != 3) && (LCD_BITSPERPIXEL != 6)
#error this value for LCD_BITSPERPIXEL not yet supported
#endif
/* Check if number of segments / coms equals resolution */
#if (LCD_NUM_SEGS < LCD_XSIZE_PHYS)
/* #error Please check segment setup of controller 0 and X/YSIZE !!!*/
#endif
#if (LCD_NUM_COMS < LCD_YSIZE_PHYS)
/* #error Please check com setup of controller 0 and X/YSIZE !!!*/
#endif
/*
********************************************************************
* *
* EXPORTs for ISR *
* *
********************************************************************
*/
#ifndef LCD_TIMERINIT1
#define LCD_TIMERINIT1 1599
#endif
#ifndef LCD_TIMERINIT0
#define LCD_TIMERINIT0 1065
#endif
LCD_ISRDATA U16 LCD__BitsPerPixel = LCD_BITSPERPIXEL/3;
LCD_ISRDATA U8 LCD_VRAMTYPE* LCD__apVRam[LCD_BITSPERPIXEL/3];
LCD_ISRDATA U16 LCD__aTimerReload[LCD_BITSPERPIXEL/3] = {
LCD_TIMERINIT0
#if LCD_BITSPERPIXEL/3 >1
,LCD_TIMERINIT1
#endif
};
/*
********************************************************************
*
* ID translation table
C51 COMPILER V8.05a LCDMEMC 04/11/2008 14:19:25 PAGE 5
*
********************************************************************
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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -