1 Star 1 Fork 0

武器大师/AntiAlias

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
LCD_L0_Generic.c 3.60 KB
一键复制 编辑 原始数据 按行查看 历史
武器大师 提交于 2020-08-08 15:21 . 加入RGB565字节序交换开关
/*********************************************************************
* 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 ****************************/
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/yihua-wang/AntiAlias.git
[email protected]:yihua-wang/AntiAlias.git
yihua-wang
AntiAlias
AntiAlias
master

搜索帮助