代码拉取完成,页面将自动刷新
/*********************************************************************
* SEGGER MICROCONTROLLER SYSTEME GmbH *
* Solutions for real time microcontroller applications *
**********************************************************************
* *
* (c) 1996 - 2004 SEGGER Microcontroller Systeme GmbH *
* *
* Internet: www.segger.com Support: [email protected] *
* *
**********************************************************************
***** emWin - Graphical user interface for embedded applications *****
emWin is protected by international copyright laws. Knowledge of the
source code may not be used to write a similar product. This file may
only be used in accordance with a license and should not be re-
distributed in any way. We appreciate your understanding and fairness.
----------------------------------------------------------------------
File : LCD_L0_Generic.c
Purpose : Color conversion routines for LCD-drivers
This file may not be compiled by itself, but needs
to be included in every LCD driver
---------------------------END-OF-HEADER------------------------------
*/
#include <stddef.h> /* needed for definition of NULL */
#include "GUI_Protected.h"
/*********************************************************************
*
* Defines
*
**********************************************************************
*/
#if (LCD_FIXEDPALETTE == 565) && (LCD_SWAP_RB==0)
#define COLOR2INDEX(Color) LCD_Color2Index_565(Color)
#define INDEX2COLOR_FUNC LCD_Index2Color_565
#define GETINDEXMASK() LCD_GetIndexMask_565()
#elif (LCD_FIXEDPALETTE == 565) && (LCD_SWAP_RB)
#define COLOR2INDEX(Color) LCD_Color2Index_M565(Color)
#define INDEX2COLOR_FUNC LCD_Index2Color_M565
#define GETINDEXMASK() LCD_GetIndexMask_M565()
#else
#error Unsupported color mode
#endif
#ifndef INDEX2COLOR
#define INDEX2COLOR(Index) INDEX2COLOR_FUNC(Index)
#endif
/*********************************************************************
*
* Public code
*
**********************************************************************
*/
/*********************************************************************
*
* LCD_L0_GetpfIndex2Color
*/
tLCDDEV_Index2Color * LCD_L0_GetpfIndex2Color(void) {
tLCDDEV_Index2Color * Result = INDEX2COLOR_FUNC;
return Result;
}
/*********************************************************************
*
* LCD_L0_Color2Index
*/
unsigned int LCD_L0_Color2Index(LCD_COLOR Color) {
unsigned int Index;
Index = COLOR2INDEX(Color);
return Index;
}
/*********************************************************************
*
* LCD_L0_Index2Color
*/
LCD_COLOR LCD_L0_Index2Color(int Index) {
return INDEX2COLOR(Index);
}
/*********************************************************************
*
* LCD_L0_GetIndexMask
*/
unsigned int LCD_L0_GetIndexMask(void) {
return GETINDEXMASK();
}
/*********************************************************************
*
* LCD_L0_GetRect
*/
void LCD_L0_GetRect(LCD_RECT *pRect) {
pRect->x0 = 0;
pRect->y0 = 0;
pRect->x1 = LCD_VXSIZE - 1;
pRect->y1 = LCD_VYSIZE - 1;
}
/*************************** End of file ****************************/
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。