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

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_1.C
  16. Purpose     : Glue code for second display in a multi-controller
  17.               environment
  18. ---------------------------END-OF-HEADER------------------------------
  19. */
  20. #include <stddef.h>           /* needed for definition of NULL */
  21. #include "LCD_Private.H"      /* private modul definitions & config */
  22. #define LCD_1_C
  23. #if LCD_NUM_DISPLAYS >=2
  24. /*********************************************************************
  25. *
  26. *      Map the defines for this controller
  27. *
  28. *      #define LCD_<xxx> LCD_<xxx>_1
  29. *
  30. **********************************************************************
  31. */
  32. #undef  LCD_CONTROLLER
  33. #define LCD_CONTROLLER     LCD_CONTROLLER_1
  34. #undef  LCD_XSIZE
  35. #define LCD_XSIZE          LCD_XSIZE_1
  36. #undef  LCD_YSIZE
  37. #define LCD_YSIZE          LCD_YSIZE_1
  38. #undef  LCD_BITSPERPIXEL
  39. #define LCD_BITSPERPIXEL   LCD_BITSPERPIXEL_1
  40. #undef  LCD_VYSIZE
  41. #define LCD_VYSIZE          LCD_VYSIZE_1
  42. #undef  LCD_MIRROR_X
  43. #define LCD_MIRROR_X  LCD_MIRROR_X_1
  44. #undef  LCD_MIRROR_Y
  45. #define LCD_MIRROR_Y  LCD_MIRROR_Y_1
  46. #undef  LCD_SWAP_XY
  47. #define LCD_SWAP_XY   LCD_SWAP_XY_1
  48. #undef  LCD_BITSPERPIXEL
  49. #define LCD_BITSPERPIXEL LCD_BITSPERPIXEL_1
  50. /* Optional defines */
  51. #ifdef LCD_CACHE_CONTROL_1
  52.   #ifdef LCD_CACHE_CONTROL
  53.     #undef  LCD_CACHE_CONTROL
  54.   #endif
  55.   #define LCD_CACHE_CONTROL LCD_CACHE_CONTROL_1
  56. #endif
  57. #ifdef LCD_FIRSTSEG0_1
  58.   #undef  LCD_FIRSTSEG0
  59.   #define LCD_FIRSTSEG0   LCD_FIRSTSEG0_1
  60. #endif
  61. #ifdef LCD_LASTSEG0_1
  62.   #undef  LCD_LASTSEG0
  63.   #define LCD_LASTSEG0    LCD_LASTSEG0_1
  64. #endif
  65. #ifdef LCD_FIRSTCOM0_1
  66.   #undef  LCD_FIRSTCOM0
  67.   #define LCD_FIRSTCOM0   LCD_FIRSTCOM0_1
  68. #endif
  69. #ifdef LCD_LASTCOM0_1
  70.   #undef  LCD_LASTCOM0
  71.   #define LCD_LASTCOM0    LCD_LASTCOM0_1
  72. #endif
  73. #ifdef LCD_XORG0_1
  74.   #undef  LCD_XORG0
  75.   #define LCD_XORG0       LCD_XORG0_1
  76. #endif
  77. #ifdef LCD_YORG0_1
  78.   #undef  LCD_YORG0
  79.   #define LCD_YORG0       LCD_YORG0_1
  80. #endif
  81. #ifdef LCD_SWAP_RB_1
  82.   #undef  LCD_SWAP_RB
  83.   #define LCD_SWAP_RB LCD_SWAP_RB_1
  84. #endif
  85. /*********************************************************************
  86. *
  87. *      Some defaults
  88. *
  89. **********************************************************************
  90. */
  91. /* None in this version */
  92. /*********************************************************************
  93. *
  94. *      Some error checking
  95. *
  96. **********************************************************************
  97. */
  98. #ifndef LCD_CONTROLLER
  99.   #error LCD_CONTROLLER not defined !
  100. #endif
  101. /*********************************************************************
  102. *
  103. *      Rename identifiers
  104. *
  105. **********************************************************************
  106. */
  107. #define LCD_L0_Color2Index   LCD_L0_1_Color2Index
  108. #define LCD_L0_ControlCache  LCD_L0_1_ControlCache
  109. #define LCD_L0_DrawBitmap    LCD_L0_1_DrawBitmap
  110. #define LCD_L0_DrawHLine     LCD_L0_1_DrawHLine
  111. #define LCD_L0_DrawVLine     LCD_L0_1_DrawVLine
  112. #define LCD_L0_DrawPixel     LCD_L0_1_DrawPixel
  113. #define LCD_L0_FillRect      LCD_L0_1_FillRect
  114. #define LCD_L0_GetPixelIndex LCD_L0_1_GetPixelIndex
  115. #define LCD_L0_GetRect       LCD_L0_1_GetRect
  116. #define LCD_L0_Index2Color   LCD_L0_1_Index2Color
  117. #define LCD_L0_Init          LCD_L0_1_Init
  118. #define LCD_L0_Off           LCD_L0_1_Off
  119. #define LCD_L0_On            LCD_L0_1_On
  120. #define LCD_L0_ReInit        LCD_L0_1_ReInit
  121. #define LCD_L0_Refresh       LCD_L0_1_Refresh
  122. #define LCD_L0_SetLUTEntry   LCD_L0_1_SetLUTEntry
  123. #define LCD_L0_SetOrg        LCD_L0_1_SetOrg
  124. #define LCD_L0_SetPixelIndex LCD_L0_1_SetPixelIndex
  125. #define LCD_L0_XorPixel      LCD_L0_1_XorPixel
  126. #define LCD_L0_CheckInit     LCD_L0_1_CheckInit
  127. /*********************************************************************
  128. *
  129. *      Include the generic part of the driver
  130. *
  131. **********************************************************************
  132. */
  133. #define LCD_DISPLAY_INDEX 1
  134. #define LCD_L0_GENERIC_C
  135. #define LCD_COMPILE_DRIVER
  136. /*********************************************************************
  137. *
  138. *      Include the actual driver
  139. *
  140. **********************************************************************
  141. */
  142. #if   !defined(WIN32) | defined(LCD_SIMCONTROLLER)
  143.   #if   ((LCD_CONTROLLER == 711)|(LCD_CONTROLLER == 741))
  144.     #include "LCD07X1.c"
  145.   #elif (LCD_CONTROLLER/100 == 13) && (LCD_CONTROLLER/10 != 133)
  146.     #include "LCD13XX.c"
  147.   #elif (LCD_CONTROLLER == 0x159A)
  148.     #include "LCD159A.c"
  149.   #elif (LCD_CONTROLLER == 0x15E05)
  150.     #include "LCD15E05.c"
  151.   #elif ((LCD_CONTROLLER/100 == 15  ) || (LCD_CONTROLLER     == 0713))
  152.     #include "LCD15XX.c"
  153.   #elif ((LCD_CONTROLLER == 66420) | (LCD_CONTROLLER == 66421))
  154.     #include "LCD6642X.c"
  155.   #elif (LCD_CONTROLLER   == 0) //+kevin
  156.     #include "LCDMem.c"
  157.   #elif ((LCD_CONTROLLER   == 0) && (LCD_FIXEDPALETTE==0))
  158.     #include "LCDMem.c"
  159.   #elif (LCD_CONTROLLER   == 0) && ((LCD_FIXEDPALETTE == 111) || (LCD_FIXEDPALETTE == 222))
  160.     #include "LCDMemC.c"
  161.   #elif (LCD_CONTROLLER == 6963) || (LCD_CONTROLLER == 1330) || (LCD_CONTROLLER == 1335)
  162.     #include "LCDSLin.c"
  163.   #else
  164.     #include "LCDDummy.h" /* Empty driver, no output to LCD */
  165.   #endif
  166. #else
  167.   #include "LCDWin.c"
  168. #endif
  169. /*#include "LCD_L0_Generic.h"*/
  170. #else
  171.   void LCD_1(void) {} /* avoid empty object files */
  172. #endif