⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 guicore.lst

📁 Keil C下通过的UCGUI,UCGUI的移植源代码
💻 LST
字号:
C51 COMPILER V8.05a   GUICORE                                                              04/11/2008 14:18:55 PAGE 1   


C51 COMPILER V8.05a, COMPILATION OF MODULE GUICORE
OBJECT MODULE PLACED IN GUICore.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\Core\GUICore.c LARGE BROWSE MDU_F120 DEBUG OBJECTEXTEND P
                    -RINT(.\GUICore.lst) OBJECT(GUICore.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        : GUICore.C
  16          Purpose     : Core file for emWin GSC
  17          ---------------------------END-OF-HEADER------------------------------
  18          */
  19          
  20          
  21          #include <stddef.h>           /* needed for definition of NULL */
  22          
  23          #define  GL_CORE_C
  24          #include "gui\Core\GUI_Private.h"
  25          
  26          #include "gui\Core\GUIDebug.h"
  27          
  28          
  29          
  30          /*********************************************************************
  31          *
  32          *            GUI_ClearRect
  33          *
  34          **********************************************************************
  35          */
  36          
  37          void GUI_ClearRect(int x0, int y0, int x1, int y1) {
  38   1        GUI_DRAWMODE PrevDraw;
  39   1        GUI_LOCK();
  40   1        PrevDraw = LCD_SetDrawMode(GUI_DRAWMODE_REV);
  41   1        #if GUI_WINSUPPORT
                  WM_ADDORG(x0,y0);
                  WM_ADDORG(x1,y1);
                  WM_ITERATE_START(NULL) {
                #endif
  46   1        LCD_FillRect(x0,y0,x1,y1);
  47   1        #if GUI_WINSUPPORT
                  } WM_ITERATE_END();
                #endif
  50   1        LCD_SetDrawMode(PrevDraw);
  51   1        GUI_UNLOCK();
  52   1      }
  53          
  54          
C51 COMPILER V8.05a   GUICORE                                                              04/11/2008 14:18:55 PAGE 2   

  55          
  56          /*********************************************************************
  57          *
  58          *            GUI_Clear
  59          *
  60          **********************************************************************
  61          */
  62          
  63          
  64          void GUI_Clear(void) {
  65   1        GUI_GotoXY(0,0);     /* Reset text cursor to upper left */
  66   1        GUI_ClearRect(GUI_XMIN, GUI_YMIN, GUI_XMAX, GUI_YMAX);
  67   1      }
  68          
  69          
  70          /*
  71                  ********************************************************
  72                  *                                                      *
  73                  *                 GUI_SelectLCD                        *
  74                  *                                                      *
  75                  ********************************************************
  76          */
  77          
  78          #if GUI_SUPPORT_MEMDEV
              void GUI_SelectLCD(void) {
                int hDevDataOld = GUI_Context.hDevData;
                GUI_Context.hDevData = 0;
                GUI_Context.pDeviceAPI   = &LCD_L0_APIList;
                GUI_Context.pClipRect_HL = &GUI_Context.ClipRect;
                LCD_SetClipRectMax();
                /* If we are switching batck, restore the former clip rect */
                if (hDevDataOld)
                  GUI_Context.ClipRect = GUI_Context.ClipRectPrev;
                #if GUI_WINSUPPORT
                  WM_Activate();
                #endif
              }
              #endif
  93          
  94          
  95          /*
  96                  ********************************************************
  97                  *                                                      *
  98                  *                 GUI_Init                             *
  99                  *                                                      *
 100                  *     Init of GUI internal data structures & variables *
 101                  *                                                      *
 102                  ********************************************************
 103          */
 104          
 105          const tLCD_HL_APIList LCD_HL_APIList = {
 106            LCD_DrawHLine,
 107            LCD_DrawPixel
 108          };
 109          
 110          static void _InitContext(GUI_CONTEXT* pContext) {
 111   1        #if GUI_SUPPORT_MEMDEV
                  GUI_SelectLCD();
                #else
 114   1          LCD_SetClipRectMax();
 115   1        #endif
 116   1        pContext->pLCD_HL      = &LCD_HL_APIList;
C51 COMPILER V8.05a   GUICORE                                                              04/11/2008 14:18:55 PAGE 3   

 117   1        pContext->pAFont       = GUI_DEFAULT_FONT;
 118   1        pContext->pClipRect_HL = &GUI_Context.ClipRect;
 119   1        pContext->PenSize      = 1;
 120   1        /* Variables in WM module */
 121   1        #if GUI_WINSUPPORT
                  pContext->hAWin    = WM_GetDesktopWindow();
                #endif
 124   1        /* Variables in GUI_AA module */
 125   1        pContext->AA_Factor = 3;
 126   1        LCD_SetBkColor(GUI_DEFAULT_BKCOLOR);
 127   1        LCD_SetColor(GUI_DEFAULT_COLOR);
 128   1      }
 129          
 130          
 131          
 132          
 133          int GUI_Init(void) {
 134   1        int r;
 135   1        GUI_DEBUG_LOG("\nGUI_Init()");
 136   1        /* Init system wide globals first */
 137   1        GUI_DecChar = '.';
 138   1        GUI_X_Init();
 139   1        /* Init context */
 140   1        _InitContext(&GUI_Context);
 141   1        GUITASK_INIT();
 142   1        r = LCD_Init();
 143   1        #if GUI_WINSUPPORT
                  WM_Init();
                #endif
 146   1        return r;
 147   1      }
 148          
 149          
 150          
 151          
 152          
 153          
 154          
 155          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    288    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =     55      13
   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 + -