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

📄 lcdp8666.lst

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


C51 COMPILER V8.05a, COMPILATION OF MODULE LCDP8666
OBJECT MODULE PLACED IN LCDP8666.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\ConvertColor\LCDP8666.c LARGE BROWSE MDU_F120 DEBUG OBJEC
                    -TEXTEND PRINT(.\LCDP8666.lst) OBJECT(LCDP8666.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        : LCD866.C
  16          Purpose     : Color conversion routines for 866 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          int LCD_Color2Index_8666(LCD_COLOR Color) {
  24   1        int r,g,b,Index;
  25   1        r = Color&255;
  26   1        g = (Color>>8)&255;
  27   1        b = Color>>16;
  28   1      /* Check if image is a gray scale ... */
  29   1              if ((r==g) && (g==b)) {
  30   2          return 120+ (r+8)/17;  /* Convert into colors from 120 - 135*/
  31   2              }
  32   1      /* Convert into the 6*6*6 colors ... */
  33   1        r = (r*5+127)/255;
  34   1        g = (g*5+127)/255;
  35   1        b = (b*5+127)/255;
  36   1        Index = r+6*g+36*b;
  37   1        return (Index<108) ? Index : Index+40;
  38   1      }
  39          
  40          LCD_COLOR LCD_Index2Color_8666(int Index) {
  41   1        unsigned int r,g;
  42   1        U32 b;
  43   1        /* 16 Gray scale range ? */
  44   1        if ((Index>=120) && (Index<136)) {
  45   2          return (U32)0x111111 * (U32)(Index-120);
  46   2              }
  47   1        if (Index>=108) {
  48   2          if (Index<148)
  49   2                              return 0;  /* Black for illegal indices */
  50   2                      Index -= 40;
  51   2              }
  52   1        r = (Index%6)*(255/5);
  53   1        g = ((Index/6)%6)*(255/5);
  54   1        b = (Index/36)*(255/5);
C51 COMPILER V8.05a   LCDP8666                                                             04/11/2008 14:18:21 PAGE 2   

  55   1        return r+(g<<8)+((U32)b<<16);
  56   1      }


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