LCD_Private.h
上传用户:zbk8730
上传日期:2017-08-10
资源大小:12168k
文件大小:3k
源码类别:

uCOS

开发平台:

C/C++

  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        : LCD_Private.H
  16. Purpose     : Internals of the LCD level
  17. ----------------------------------------------------------------------
  18. */
  19. #ifndef LCD_Private_H
  20. #define LCD_Private_H
  21. #include "LCD_ConfDefaults.h"            /* Configuration header file */
  22. #include "LCD_Protected.h"
  23. typedef void tLCDDEV_DrawBitmap   (int x0, int y0, int xsize, int ysize,
  24.                        int BitsPerPixel, int BytesPerLine,
  25.                        const U8* pData, int Diff,
  26.                        const LCD_PIXELINDEX* pTrans);
  27. struct tLCDDEV_APIList_struct {
  28.   tLCDDEV_Color2Index*        pfColor2Index;
  29.   tLCDDEV_DrawBitmap*         pfDrawBitmap;
  30.   tLCDDEV_DrawHLine*          pfDrawHLine;
  31.   tLCDDEV_DrawVLine*          pfDrawVLine;
  32.   tLCDDEV_FillRect*           pfFillRect;
  33.   tLCDDEV_GetPixelIndex*      pfGetPixelIndex;
  34.   tLCDDEV_GetRect*            pfGetRect;
  35.   tLCDDEV_Index2Color*        pfIndex2Color;
  36.   tLCDDEV_SetPixelIndex*      pfSetPixelIndex;
  37.   tLCDDEV_XorPixel*           pfXorPixel;
  38.   tLCDDEV_FillPolygon*        pfFillPolygon;
  39.   tLCDDEV_FillPolygonAA*      pfFillPolygonAA;
  40. };
  41. #if LCD_BITSPERPIXEL <=8
  42.   #define LCD_BKCOLORINDEX GUI_Context.LCD.aColorIndex8[0]
  43.   #define LCD_COLORINDEX   GUI_Context.LCD.aColorIndex8[1]
  44.   #define LCD_ACOLORINDEX  GUI_Context.LCD.aColorIndex8
  45. #else
  46.   #define LCD_BKCOLORINDEX GUI_Context.LCD.aColorIndex16[0]
  47.   #define LCD_COLORINDEX   GUI_Context.LCD.aColorIndex16[1]
  48.   #define LCD_ACOLORINDEX  GUI_Context.LCD.aColorIndex16
  49. #endif
  50. #if !defined (__C51__) /* To bypass Keil-compiler bug */
  51.   extern const struct tLCDDEV_APIList_struct LCD_L0_APIList, LCD_L0_1_APIList;
  52. #endif
  53. /*********************************************************************
  54. *
  55. *          Support for Segment/COMLUTs
  56. *
  57. **********************************************************************
  58. */
  59. #define LCD_TYPE_SEGTRANS U16
  60. #define LCD_TYPE_COMTRANS U16
  61. #ifdef LCD_LUT_COM
  62.   #ifdef LCDCOLOR_C
  63.     LCD_TYPE_COMTRANS LCD__aLine2Com0[LCD_YSIZE] = { LCD_LUT_COM };
  64.   #else
  65.     extern LCD_TYPE_COMTRANS LCD__aLine2Com0[LCD_YSIZE];
  66.   #endif
  67. #endif
  68. #ifdef LCD_LUT_SEG
  69.   #ifdef LCDCOLOR_C
  70.     LCD_TYPE_SEGTRANS LCD__aCol2Seg0[LCD_XSIZE] = { LCD_LUT_SEG };
  71.   #else
  72.     extern LCD_TYPE_COMTRANS LCD__aCol2Seg0[LCD_XSIZE];
  73.   #endif
  74. #endif
  75. #endif /* Avoid multiple inclusion */