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

📄 lcdp222.lst

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


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

  55          **********************************************************************
  56          */
  57          
  58          int LCD_Color2Index_M222(LCD_COLOR Color) {
  59   1        int r,g,b;
  60   1        r = ((Color&255)      +0x2a)/0x55;
  61   1        g = (((Color>>8)&255) +0x2a)/0x55;
  62   1        b = (((Color>>16)&255)+0x2a)/0x55;
  63   1        return b+(g<<2)+(r<<4);
  64   1      }
  65          
  66          LCD_COLOR LCD_Index2Color_M222(int Index) {
  67   1        U16P r,g,b;
  68   1        r = ((Index>>0)&3)*0x55;
  69   1        g = ((Index>>2)&3)*0x55;
  70   1        b = (Index>>4)    *0x55;
  71   1        return (((U32)r)<<16)|(g<<8)|b;
  72   1      }


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