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

📄 lcdp111.lst

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


C51 COMPILER V8.05a, COMPILATION OF MODULE LCDP111
OBJECT MODULE PLACED IN LCDP111.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\ConvertColor\LCDP111.c LARGE BROWSE MDU_F120 DEBUG OBJECT
                    -EXTEND PRINT(.\LCDP111.lst) OBJECT(LCDP111.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        : LCD111.C
  16          Purpose     : Color conversion routines for 111 color mode
  17          ---------------------------END-OF-HEADER------------------------------
  18          */
  19          
  20          #include <stddef.h>           /* needed for definition of NULL */
  21          #include "gui\Core\LCD_Protected.h"    /* inter modul definitions */
  22          
  23          /*********************************************************************
  24          *
  25          *       LCD_FIXEDPALETTE == 111
  26          *
  27          *         8 basic colors
  28          *
  29          **********************************************************************
  30          */
  31          int LCD_Color2Index_111(LCD_COLOR Color) {
  32   1        int r,g,b;
  33   1        r = (Color>>(0+7))  &1;
  34   1        g = (Color>>(8+7))  &1;
  35   1        b = (Color>>(16+7)) &1;
  36   1        return r+(g<<1)+(b<<2);
  37   1      }
  38          
  39          
  40          LCD_COLOR LCD_Index2Color_111(int Index) {
  41   1        U16 r,g,b;
  42   1        r = (((Index>>0)&1)*0xff);
  43   1        g = (((Index>>1)&1)*0xff);
  44   1        b =   (Index>>2)   *0xff;
  45   1        return r | (g<<8) | ((U32)b<<16);
  46   1      }
  47          
  48          /*********************************************************************
  49          *
  50          *       LCD_FIXEDPALETTE == 111, Red/Blue swapped
  51          *
  52          *         8 basic colors
  53          *
  54          **********************************************************************
C51 COMPILER V8.05a   LCDP111                                                              04/11/2008 14:18:19 PAGE 2   

  55          */
  56          int LCD_Color2Index_M111(LCD_COLOR Color) {
  57   1        int r,g,b;
  58   1        r = (Color>>(0+7))  &1;
  59   1        g = (Color>>(8+7))  &1;
  60   1        b = (Color>>(16+7)) &1;
  61   1        return b+(g<<1)+(r<<2); 
  62   1      }
  63          
  64          
  65          LCD_COLOR LCD_Index2Color_M111(int Index) {
  66   1        U16 r,g,b;
  67   1        r = (((Index>>0)&1)*0xff);
  68   1        g = (((Index>>1)&1)*0xff);
  69   1        b =   (Index>>2)   *0xff;
  70   1        return b | (g<<8) | ((U32)r<<16);
  71   1      }
  72          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    481    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----      22
   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 + -