📄 guidev_copyfromlcd.lst
字号:
C51 COMPILER V8.05a GUIDEV_COPYFROMLCD 04/11/2008 14:19:29 PAGE 1
C51 COMPILER V8.05a, COMPILATION OF MODULE GUIDEV_COPYFROMLCD
OBJECT MODULE PLACED IN GUIDEV_CopyFromLCD.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\MemDev\GUIDEV_CopyFromLCD.c LARGE BROWSE MDU_F120 DEBUG O
-BJECTEXTEND PRINT(.\GUIDEV_CopyFromLCD.lst) OBJECT(GUIDEV_CopyFromLCD.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 : GUIDev_CopyFromLCD.C
16 Purpose : Implementation of memory devices
17 ----------------------------------------------------------------------
18 */
19
20
21 #include "gui\Core\GUI_Private.h"
22 #include "gui\Core\GUIDebug.h"
23
24 /* Memory device capabilities are compiled only if support for them is enabled. */
25 #if GUI_SUPPORT_MEMDEV
/*******************************************************************
*
* Function replacement macros
*
********************************************************************
*/
#define LCD_LIMIT(Var, Op, Limit) if (Var Op Limit) Var = Limit
/**********************************************************************
*
* GUI_MEMDEV_CopyFromLCD
*
***********************************************************************
*/
void GUI_MEMDEV_CopyFromLCD(GUI_MEMDEV_Handle hMem) {
/* Make sure memory handle is valid */
if (!hMem) {
hMem = GUI_Context.hDevData;
}
if (!hMem) {
return;
}
{
GUI_MEMDEV* pDevData = (GUI_MEMDEV*) GUI_ALLOC_LOCK(hMem); /* Convert to pointer */
LCD_RECT r;
int y;
int XMax;
C51 COMPILER V8.05a GUIDEV_COPYFROMLCD 04/11/2008 14:19:29 PAGE 2
GUI_USAGE* pUsage = 0;
GUI_MEMDEV_Handle hMemOld = GUI_Context.hDevData;
GUI_MEMDEV_Select(hMem);
if (pDevData->hUsage)
pUsage = GUI_USAGE_h2p(pDevData->hUsage);
/* Get bounding rectangle */
r.y0 = pDevData->y0;
r.x0 = pDevData->x0;
r.x1 = pDevData->x0 + pDevData->XSize-1;
r.y1 = pDevData->y0 + pDevData->YSize-1;
/* Make sure bounds are within LCD area so we can call driver directly */
LCD_LIMIT(r.x0, <, 0);
LCD_LIMIT(r.y0, <, 0);
LCD_LIMIT(r.x1, >, LCD_GET_XSIZE() -1);
LCD_LIMIT(r.y1, >, LCD_GET_YSIZE() -1);
XMax = r.x1;
for (y=r.y0; y<=r.y1; y++) {
int x=r.x0;
LCD_PIXELINDEX* pData = GUI_MEMDEV_XY2PTR(x,y);
if (pUsage)
GUI_USAGE_AddHLine(pUsage, x, y, r.x1 - r.x0 + 1);
for (; x<=XMax; x++) {
*pData++ = LCD_L0_GetPixelIndex(x,y);
}
}
GUI_MEMDEV_Select(hMemOld);
}
GUI_ALLOC_UNLOCK(hMem);
}
#endif /* GUI_MEMDEV_SUPPORT */
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = ---- ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -