完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>
将实验29的uCGUI程序移植到3.5寸(480*320)液晶上,调用修改后的屏的驱动LCD_Clear(u16 Color)可全屏显示,但是调用GUI_Clear()显示大小仍为320*240,请问屏和GUI的接口程序ili9320_ucgui.c如何修改?
#include "LCD_Private.h" /* private modul defini tions & config */ #include "GUI_Private.h" #include "GUIDebug.h" #include "lcd.h" #include "ili93xx.h" #define BKCOLOR LCD_BKCOLORINDEX #define COLOR LCD_COLORINDEX #if (LCD_CONTROLLER == 9320) int LCD_L0_Init(void) { ili9320_Initializtion(); return 0; } void LCD_L0_SetPixelIndex(int x, int y, int PixelIndex) { ili9320_SetPoint(x,y,PixelIndex); } unsigned int LCD_L0_GetPixelIndex(int x, int y) { return ili9320_GetPoint(x,y); } void LCD_L0_SetOrg(int x,int y) { } void LCD_L0_XorPixel(int x, int y) { LCD_PIXELINDEX Index = ili9320_GetPoint(x,y); ili9320_SetPoint(x,y,LCD_NUM_COLORS-1-Index); } void LCD_L0_DrawHLine (int x0, int y, int x1) { GUI_Line(x0,y,x1,y,LCD_COLORINDEX); } void LCD_L0_DrawVLine (int x, int y0, int y1) { GUI_Line(x,y0,x,y1,LCD_COLORINDEX); } void LCD_L0_FillRect(int x0, int y0, int x1, int y1) { #if !LCD_SWAP_XY for (; y0 <= y1; y0++) { LCD_L0_DrawHLine(x0,y0, x1); } #else for (; x0 <= x1; x0++) { LCD_L0_DrawVLine(x0,y0, y1); } #endif } void DrawBitLine1BPP(int x, int y, U8 const*p, int Diff, int xsize, const LCD_PIXELINDEX*pTrans) { LCD_PIXELINDEX pixels; LCD_PIXELINDEX Index0 = *(pTrans+0); LCD_PIXELINDEX Index1 = *(pTrans+1); /* // Jump to right entry point */ pixels = *p; switch (GUI_Context.DrawMode & (LCD_DRAWMODE_TRANS|LCD_DRAWMODE_XOR)) { case 0: #if defined (SETNEXTPIXEL) /* Optimization ! */ x+=Diff; ili9320_SetCursor(x,y); #endif switch (Diff&7) { case 0: goto WriteBit0; case 1: goto WriteBit1; case 2: goto WriteBit2; case 3: goto WriteBit3; case 4: goto WriteBit4; case 5: goto WriteBit5; case 6: goto WriteBit6; case 7: goto WriteBit7; } break; case LCD_DRAWMODE_TRANS: switch (Diff&7) { case 0: goto WriteTBit0; case 1: goto WriteTBit1; case 2: goto WriteTBit2; case 3: goto WriteTBit3; case 4: goto WriteTBit4; case 5: goto WriteTBit5; case 6: goto WriteTBit6; case 7: goto WriteTBit7; } break; case LCD_DRAWMODE_XOR: switch (Diff&7) { case 0: goto WriteXBit0; case 1: goto WriteXBit1; case 2: goto WriteXBit2; case 3: goto WriteXBit3; case 4: goto WriteXBit4; case 5: goto WriteXBit5; case 6: goto WriteXBit6; case 7: goto WriteXBit7; } } /* Write with transparency */ WriteTBit0: if (pixels&(1<<7)) ili9320_SetPoint(x+0, y, Index1); if (!--xsize) return; WriteTBit1: if (pixels&(1<<6)) ili9320_SetPoint(x+1, y, Index1); if (!--xsize) return; WriteTBit2: if (pixels&(1<<5)) ili9320_SetPoint(x+2, y, Index1); if (!--xsize) return; WriteTBit3: if (pixels&(1<<4)) ili9320_SetPoint(x+3, y, Index1); if (!--xsize) return; WriteTBit4: if (pixels&(1<<3)) ili9320_SetPoint(x+4, y, Index1); if (!--xsize) return; WriteTBit5: if (pixels&(1<<2)) ili9320_SetPoint(x+5, y, Index1); if (!--xsize) return; WriteTBit6: if (pixels&(1<<1)) ili9320_SetPoint(x+6, y, Index1); if (!--xsize) return; WriteTBit7: if (pixels&(1<<0)) ili9320_SetPoint(x+7, y, Index1); if (!--xsize) return; x+=8; pixels = *(++p); goto WriteTBit0; /* Write without transparency */ WriteBit0: ili9320_SetPoint(x+0, y, (pixels&(1<<7)) ? Index1 : Index0); if (!--xsize) return; WriteBit1: ili9320_SetPoint(x+1, y, (pixels&(1<<6)) ? Index1 : Index0); if (!--xsize) return; WriteBit2: ili9320_SetPoint(x+2, y, (pixels&(1<<5)) ? Index1 : Index0); if (!--xsize) return; WriteBit3: ili9320_SetPoint(x+3, y, (pixels&(1<<4)) ? Index1 : Index0); if (!--xsize) return; WriteBit4: ili9320_SetPoint(x+4, y, (pixels&(1<<3)) ? Index1 : Index0); if (!--xsize) return; WriteBit5: ili9320_SetPoint(x+5, y, (pixels&(1<<2)) ? Index1 : Index0); if (!--xsize) return; WriteBit6: ili9320_SetPoint(x+6, y, (pixels&(1<<1)) ? Index1 : Index0); if (!--xsize) return; WriteBit7: ili9320_SetPoint(x+7, y, (pixels&(1<<0)) ? Index1 : Index0); if (!--xsize) return; x+=8; pixels = *(++p); goto WriteBit0; /* Write XOR mode */ WriteXBit0: if (pixels&(1<<7)) LCD_L0_XorPixel(x+0, y); if (!--xsize) return; WriteXBit1: if (pixels&(1<<6)) LCD_L0_XorPixel(x+1, y); if (!--xsize) return; WriteXBit2: if (pixels&(1<<5)) LCD_L0_XorPixel(x+2, y); if (!--xsize) return; WriteXBit3: if (pixels&(1<<4)) LCD_L0_XorPixel(x+3, y); if (!--xsize) return; WriteXBit4: if (pixels&(1<<3)) LCD_L0_XorPixel(x+4, y); if (!--xsize) return; WriteXBit5: if (pixels&(1<<2)) LCD_L0_XorPixel(x+5, y); if (!--xsize) return; WriteXBit6: if (pixels&(1<<1)) LCD_L0_XorPixel(x+6, y); if (!--xsize) return; WriteXBit7: if (pixels&(1<<0)) LCD_L0_XorPixel(x+7, y); if (!--xsize) return; x+=8; pixels = *(++p); goto WriteXBit0; } static void DrawBitLine2BPP(int x, int y, U8 const*p, int Diff, int xsize, const LCD_PIXELINDEX*pTrans) { LCD_PIXELINDEX pixels; /* // Jump to right entry point */ pixels = *p; if (pTrans) { /* with palette */ if (GUI_Context.DrawMode & LCD_DRAWMODE_TRANS) switch (Diff&3) { case 0: goto WriteTBit0; case 1: goto WriteTBit1; case 2: goto WriteTBit2; default: goto WriteTBit3; } else switch (Diff&3) { case 0: goto WriteBit0; case 1: goto WriteBit1; case 2: goto WriteBit2; default: goto WriteBit3; } /* Write without transparency */ WriteBit0: ili9320_SetPoint(x+0, y, *(pTrans+(pixels>>6))); if (!--xsize) return; WriteBit1: ili9320_SetPoint(x+1, y, *(pTrans+(3&(pixels>>4)))); if (!--xsize) return; WriteBit2: ili9320_SetPoint(x+2, y, *(pTrans+(3&(pixels>>2)))); if (!--xsize) return; WriteBit3: ili9320_SetPoint(x+3, y, *(pTrans+(3&(pixels)))); if (!--xsize) return; pixels = *(++p); x+=4; goto WriteBit0; /* Write with transparency */ WriteTBit0: if (pixels&(3<<6)) ili9320_SetPoint(x+0, y, *(pTrans+(pixels>>6))); if (!--xsize) return; WriteTBit1: if (pixels&(3<<4)) ili9320_SetPoint(x+1, y, *(pTrans+(3&(pixels>>4)))); if (!--xsize) return; WriteTBit2: if (pixels&(3<<2)) ili9320_SetPoint(x+2, y, *(pTrans+(3&(pixels>>2)))); if (!--xsize) return; WriteTBit3: if (pixels&(3<<0)) ili9320_SetPoint(x+3, y, *(pTrans+(3&(pixels)))); if (!--xsize) return; pixels = *(++p); x+=4; goto WriteTBit0; } else { /* without palette */ if (GUI_Context.DrawMode & LCD_DRAWMODE_TRANS) switch (Diff&3) { case 0: goto WriteDDPTBit0; case 1: goto WriteDDPTBit1; case 2: goto WriteDDPTBit2; default: goto WriteDDPTBit3; } else switch (Diff&3) { case 0: goto WriteDDPBit0; case 1: goto WriteDDPBit1; case 2: goto WriteDDPBit2; default: goto WriteDDPBit3; } /* Write without transparency */ WriteDDPBit0: ili9320_SetPoint(x+0, y, (pixels>>6)); if (!--xsize) return; WriteDDPBit1: ili9320_SetPoint(x+1, y, (3&(pixels>>4))); if (!--xsize) return; WriteDDPBit2: ili9320_SetPoint(x+2, y, (3&(pixels>>2))); if (!--xsize) return; WriteDDPBit3: ili9320_SetPoint(x+3, y, (3&(pixels))); if (!--xsize) return; pixels = *(++p); x+=4; goto WriteDDPBit0; /* Write with transparency */ WriteDDPTBit0: if (pixels&(3<<6)) ili9320_SetPoint(x+0, y, (pixels>>6)); if (!--xsize) return; WriteDDPTBit1: if (pixels&(3<<4)) ili9320_SetPoint(x+1, y, (3&(pixels>>4))); if (!--xsize) return; WriteDDPTBit2: if (pixels&(3<<2)) ili9320_SetPoint(x+2, y, (3&(pixels>>2))); if (!--xsize) return; WriteDDPTBit3: if (pixels&(3<<0)) ili9320_SetPoint(x+3, y, (3&(pixels))); if (!--xsize) return; pixels = *(++p); x+=4; goto WriteDDPTBit0; } } static void DrawBitLine4BPP(int x, int y, U8 const*p, int Diff, int xsize, const LCD_PIXELINDEX*pTrans) { LCD_PIXELINDEX pixels; pixels = *p; if (pTrans) { if (GUI_Context.DrawMode & LCD_DRAWMODE_TRANS) { if ((Diff&1) ==0) goto WriteTBit0; goto WriteTBit1; } else { if ((Diff&1) ==0) goto WriteBit0; goto WriteBit1; } WriteBit0: ili9320_SetPoint(x+0, y, *(pTrans+(pixels>>4))); if (!--xsize) return; WriteBit1: ili9320_SetPoint(x+1, y, *(pTrans+(pixels&0xf))); if (!--xsize) return; x+=2; pixels = *(++p); goto WriteBit0; /* Write with transparency */ WriteTBit0: if (pixels>>4) ili9320_SetPoint(x+0, y, *(pTrans+(pixels>>4))); if (!--xsize) return; WriteTBit1: if (pixels&0xf) ili9320_SetPoint(x+1, y, *(pTrans+(pixels&0xf))); if (!--xsize) return; x+=2; pixels = *(++p); goto WriteTBit0; } else { /* without palette */ if (GUI_Context.DrawMode & LCD_DRAWMODE_TRANS) { if ((Diff&1) ==0) goto WriteDDPTBit0; goto WriteDDPTBit1; } else { if ((Diff&1) ==0) goto WriteDDPBit0; goto WriteDDPBit1; } /* Write without transparency */ WriteDDPBit0: ili9320_SetPoint(x+0, y, (pixels>>4)); if (!--xsize) return; WriteDDPBit1: ili9320_SetPoint(x+1, y, (pixels&0xf)); if (!--xsize) return; x+=2; pixels = *(++p); goto WriteDDPBit0; /* Write with transparency */ WriteDDPTBit0: if (pixels>>4) ili9320_SetPoint(x+0, y, (pixels>>4)); if (!--xsize) return; WriteDDPTBit1: if (pixels&0xf) ili9320_SetPoint(x+1, y, (pixels&0xf)); if (!--xsize) return; x+=2; pixels = *(++p); goto WriteDDPTBit0; } } void DrawBitLine8BPP(int x, int y, U8 const*p, int xsize, const LCD_PIXELINDEX*pTrans) { LCD_PIXELINDEX pixel; if ((GUI_Context.DrawMode & LCD_DRAWMODE_TRANS)==0) { if (pTrans) { for (;xsize > 0; xsize--,x++,p++) { pixel = *p; ili9320_SetPoint(x, y, *(pTrans+pixel)); } } else { for (;xsize > 0; xsize--,x++,p++) { ili9320_SetPoint(x, y, *p); } } } else { /* Handle transparent bitmap */ if (pTrans) { for (; xsize > 0; xsize--, x++, p++) { pixel = *p; if (pixel) { ili9320_SetPoint(x+0, y, *(pTrans+pixel)); } } } else { for (; xsize > 0; xsize--, x++, p++) { pixel = *p; if (pixel) { ili9320_SetPoint(x+0, y, pixel); } } } } } void DrawBitLine16BPP(int x, int y, U16 const*p, int xsize) { LCD_PIXELINDEX Index; if ((GUI_Context.DrawMode & LCD_DRAWMODE_TRANS)==0) { for (;xsize > 0; xsize--,x++,p++) { ili9320_SetPoint(x, y, *p); } } else { /* Handle transparent bitmap */ for (; xsize > 0; xsize--, x++, p++) { Index = *p; if (Index) { ili9320_SetPoint(x+0, y, Index); } } } } void LCD_L0_DrawBitmap (int x0, int y0, int xsize, int ysize, int BitsPerPixel, int BytesPerLine, const U8* pData, int Diff, const LCD_PIXELINDEX* pTrans) { int i; switch (BitsPerPixel) { case 1: for (i=0; i DrawBitLine1BPP(x0, i+y0, pData, Diff, xsize, pTrans); pData += BytesPerLine; } break; case 2: for (i=0; i DrawBitLine2BPP(x0, i+y0, pData, Diff, xsize, pTrans); pData += BytesPerLine; } break; case 4: for (i=0; i DrawBitLine4BPP(x0, i+y0, pData, Diff, xsize, pTrans); pData += BytesPerLine; } break; case 8: for (i=0; i DrawBitLine8BPP(x0, i+y0, pData, xsize, pTrans); pData += BytesPerLine; } break; case 16: for (i=0; i DrawBitLine16BPP(x0, i+y0, (U16*)pData, xsize); pData += BytesPerLine; } break; } } void LCD_L0_SetLUTEntry(U8 Pos, LCD_COLOR color){} void LCD_L0_On(void){} #endif /* (LCD_CONTROLLER == 9320) */ ili9320_ucgui.c(13.14 KB ) |
|
相关推荐
5个回答
|
|
而且只要调用GUI的相关函数,显示效果是在一个坐标上反的,像照镜子的效果。
|
|
|
|
1,尺寸问题,应该是修改配置文件.
2,反的可以修改画点函数,把Y***了. |
|
|
|
把画点函数改了之后正反显示正常了,谢谢原子哥指点!~~还需请教配置文件如何修改呢?我只修改了LCDConf.h中的两项,试验了显示尺寸还是320*240大小,其它项用修改吗,如何修改?
#ifndef LCDCONF_H #define LCDCONF_H #define LCD_XSIZE (480)------>自己修改 #define LCD_YSIZE (320)------>自己修改 #define LCD_CONTROLLER (9320) #define LCD_BITSPERPIXEL (16) #define LCD_FIXEDPALETTE (565) #define LCD_SWAP_RB (1) //#define LCD_SWAP_XY (1) #define LCD_INIT_CONTROLLER() ili9320_Initializtion(); #endif /* LCDCONF_H */ 还有GUIConf.h需要修改吗?怎么修改呢? ---------------------------------------------------------------------- File : GUIConf.h Purpose : Configures abilities, fonts etc. ---------------------------------------------------------------------- */ #ifndef GUICONF_H #define GUICONF_H #define GUI_OS (1) /* Compile with multitasking support */ #define GUI_SUPPORT_TOUCH (0) /* Support a touch screen (req. win-manager) */ #define GUI_SUPPORT_UNICODE (1) /* Support mixed ASCII/UNICODE strings */ #define GUI_DEFAULT_FONT &GUI_Font6x8 #define GUI_ALLOC_SIZE 5000 /* Size of dynamic memory ... For WM and memory devices*/ /********************************************************************* * * Configuration of available packages */ #define GUI_WINSUPPORT 1 /* Window manager package available */ #define GUI_SUPPORT_MEMDEV 1 /* Memory devices available */ #define GUI_SUPPORT_AA 1 /* Anti aliasing available */ #endif /* Avoid multiple inclusion */ |
|
|
|
还有两个配置文件一并发上来,劳烦原子哥帮忙分析下,需要怎么修改?谢谢啦~~~
GUI_ConfDefaults.h文件 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* ********************************************************************************************************* * uC/GUI * Universal graphic software for embedded applications * * (c) Copyright 2002, Micrium Inc., Weston, FL * (c) Copyright 2002, SEGGER Microcontroller Systeme GmbH * * 礐/GUI 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 redistributed * in any way. We appreciate your understanding and fairness. * ---------------------------------------------------------------------- File : GUI_ConfDefaults.h Purpose : Defaults for GUI config switches. ---------------------------END-OF-HEADER------------------------------ Attention: Do not modify this file ! If you do, you will not be able do update to a later GUI version ! */ #ifndef GUI_CONFDEFAULTS_H #define GUI_CONFDEFAULTS_H #include "GUIConf.h" /********************************************************************** * * Defaults for config switches * *********************************************************************** */ /* Define "universal pointer". Normally, this is not needed (define will expand to nothing) However, on some systems (AVR - IAR compiler) it can be necessary ( -> __generic), since a default pointer can access RAM only, not the built-in Flash */ #ifndef GUI_UNI_PTR #define GUI_UNI_PTR #define GUI_UNI_PTR_USED 0 #else #define GUI_UNI_PTR_USED 1 #endif /* Define const storage. Normally, this is not needed (define will expand to const) However, on some systems (AVR - IAR compiler) it can be necessary ( -> __flash const), since otherwise constants are copied into RAM */ #ifndef GUI_ALLOC_SIZE #define GUI_ALLOC_SIZE 1000 #endif #ifndef GUI_CONST_STORAGE #define GUI_CONST_STORAGE const #endif #ifndef GUI_SUPPORT_TOUCH #define GUI_SUPPORT_TOUCH 0 #endif #ifndef GUI_SUPPORT_MOUSE #define GUI_SUPPORT_MOUSE 0 #endif #ifndef GUI_SUPPORT_MEMDEV #define GUI_SUPPORT_MEMDEV 0 #endif #ifndef GUI_SUPPORT_AA #define GUI_SUPPORT_AA 0 #endif #ifndef GUI_OS #define GUI_OS 0 #endif #ifndef GUI_SUPPORT_LARGE_BITMAPS #if GUI_ALLOC_SIZE > 65535 #define GUI_SUPPORT_LARGE_BITMAPS 1 #else #define GUI_SUPPORT_LARGE_BITMAPS 0 #endif #endif #ifndef GUI_COMPATIBLE_MODE #define GUI_COMPATIBLE_MODE 1 #endif #ifndef GUI_NUM_LAYERS #define GUI_NUM_LAYERS 1 #endif #ifndef GUI_SUPPORT_CURSOR #define GUI_SUPPORT_CURSOR (GUI_SUPPORT_MOUSE | GUI_SUPPORT_TOUCH) #endif #ifndef GUI_SUPPORT_DEVICES #ifdef __C51__ /* Keil C51 limitation ... Indirect function calls are limited */ #define GUI_SUPPORT_DEVICES 0 #else #define GUI_SUPPORT_DEVICES (GUI_SUPPORT_MEMDEV | (GUI_NUM_LAYERS > 1)) #endif #endif /* Some compilers for very simple chips can not generate code for function pointers with parameters. In this case, we do not use function pointers, but limit the functionality slightly */ #ifndef GUI_COMPILER_SUPPORTS_FP #ifdef __C51__ #define GUI_COMPILER_SUPPORTS_FP 0 #else #define GUI_COMPILER_SUPPORTS_FP 1 #endif #endif #ifndef GUI_SUPPORT_ROTATION #if GUI_COMPILER_SUPPORTS_FP #define GUI_SUPPORT_ROTATION 1 #else #define GUI_SUPPORT_ROTATION 0 #endif #endif /* In order to avoid warnings for undefined parameters */ #ifndef GUI_USE_PARA #if defined (__BORLANDC__) || defined(NC30) || defined(NC308) #define GUI_USE_PARA(para) #else #define GUI_USE_PARA(para) para=para; #endif #endif /* Default for types */ #ifndef GUI_TIMER_TIME #define GUI_TIMER_TIME int /* default is to use 16 bits for 16 bit CPUs, 32 bits on 32 bit CPUs for timing */ #endif /* Types used for memory allocation */ #if GUI_ALLOC_SIZE <32767 #define GUI_ALLOC_DATATYPE I16 #define GUI_ALLOC_DATATYPE_U U16 #else #define GUI_ALLOC_DATATYPE I32 #define GUI_ALLOC_DATATYPE_U U32 #endif #ifndef GUI_MEMSET #define GUI_MEMSET GUI__memset #endif #endif /* ifdef GUI_CONFDEFAULTS_H */ /*************************** End of file ****************************/ LCD_ConfDefaults.h文件 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* ********************************************************************************************************* * uC/GUI * Universal graphic software for embedded applications * * (c) Copyright 2002, Micrium Inc., Weston, FL * (c) Copyright 2002, SEGGER Microcontroller Systeme GmbH * * 礐/GUI 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 redistributed * in any way. We appreciate your understanding and fairness. * ---------------------------------------------------------------------- File : LCD_ConfDefaults.h Purpose : Valid LCD configuration and defaults ---------------------------------------------------------------------- */ #ifndef LCD_CONFIG_DEFAULTS_H #define LCD_CONFIG_DEFAULTS_H #include "LCDConf.h" /* Configuration header file */ #include "GUI_ConfDefaults.h" /* Needed for GUI_NUM_LAYERS */ /********************************************************************* * * Map the defines for this controller * * #define LCD_ * ********************************************************************** */ #ifdef LCD_CONTROLLER_0 #define LCD_CONTROLLER LCD_CONTROLLER_0 #endif #ifdef LCD_XSIZE_0 #define LCD_XSIZE LCD_XSIZE_0 #endif #ifdef LCD_YSIZE_0 #define LCD_YSIZE LCD_YSIZE_0 #endif #ifdef LCD_BITSPERPIXEL_0 #define LCD_BITSPERPIXEL LCD_BITSPERPIXEL_0 #endif #ifdef LCD_VYSIZE_0 #define LCD_VYSIZE LCD_VYSIZE_0 #endif #ifdef LCD_MIRROR_X_0 #define LCD_MIRROR_X LCD_MIRROR_X_0 #endif #ifdef LCD_MIRROR_Y_0 #define LCD_MIRROR_Y LCD_MIRROR_Y_0 #endif #ifdef LCD_SWAP_XY_0 #define LCD_SWAP_XY LCD_SWAP_XY_0 #endif #ifdef LCD_CACHE_CONTROL_0 #define LCD_CACHE_CONTROL LCD_CACHE_CONTROL_0 #endif #ifdef LCD_FIRSTSEG0_0 #define LCD_FIRSTSEG0 LCD_FIRSTSEG0_0 #endif #ifdef LCD_LASTSEG0_0 #define LCD_LASTSEG0 LCD_LASTSEG0_0 #endif #ifdef LCD_FIRSTCOM0_0 #define LCD_FIRSTCOM0 LCD_FIRSTCOM0_0 #endif #ifdef LCD_LASTCOM0_0 #define LCD_LASTCOM0 LCD_LASTCOM0_0 #endif #ifdef LCD_BITSPERPIXEL_L0_0 #define LCD_BITSPERPIXEL_L0 LCD_BITSPERPIXEL_0 #endif #ifdef LCD_DELTA_MODE_0 #define LCD_DELTA_MODE LCD_DELTA_MODE_0 #endif #ifdef LCD_XORG0_0 #define LCD_XORG0 LCD_XORG0_0 #endif #ifdef LCD_YORG0_0 #define LCD_YORG0 LCD_YORG0_0 #endif #ifdef LCD_FIXEDPALETTE_0 #define LCD_FIXEDPALETTE LCD_FIXEDPALETTE_0 #endif #ifdef LCD_CACHE_0 #ifdef LCD_CACHE #undef LCD_CACHE #endif #define LCD_CACHE LCD_CACHE_0 #endif #ifdef LCD_CHECKBUSY_0 #ifdef LCD_CHECKBUSY #undef LCD_CHECKBUSY #endif #define LCD_CHECKBUSY LCD_CHECKBUSY_0 #endif #ifdef LCD_SWAP_BYTE_ORDER_0 #define LCD_SWAP_BYTE_ORDER LCD_SWAP_BYTE_ORDER_0 #endif #ifdef LCD_SWAP_RB_0 #define LCD_SWAP_RB LCD_SWAP_RB_0 #endif #ifdef LCD_PHYSCOLORS_0 #define LCD_PHYSCOLORS LCD_PHYSCOLORS_0 #endif #ifndef LCD_ALLOW_NON_OPTIMIZED_MODE #define LCD_ALLOW_NON_OPTIMIZED_MODE 0 #endif /********************************************************************* * * Some error checking * ********************************************************************** */ #ifndef LCD_CONTROLLER #error LCD_CONTROLLER not defined ! #endif /******************************************************************* * * Defaults for config switches * ******************************************************************** */ #ifndef LCD_NUM_CONTROLLERS #define LCD_NUM_CONTROLLERS (1) #endif #ifndef LCD_NUM_COLORS #define LCD_NUM_COLORS (1L< /********************************************************************* * * Map the defines for controller 0 to general defines * ********************************************************************** */ /* Allow use of multiple physical lines for one logical line ... Used for delta-type LCDs, where value should be 2 */ #ifndef LCD_YMAG #define LCD_YMAG 1 #endif #ifndef LCD_XMAG #define LCD_XMAG 1 #endif #ifndef LCD_VXSIZE #define LCD_VXSIZE (LCD_XSIZE*LCD_XMAG) /* virtual x-size */ #endif #ifndef LCD_VYSIZE #define LCD_VYSIZE (LCD_YSIZE*LCD_YMAG) /* virtual y-size */ #endif #ifndef LCD_SWAP_BYTE_ORDER #define LCD_SWAP_BYTE_ORDER (0) /* only for 16 bit bus, default is not swapped */ #endif #ifndef LCD_MAX_LOG_COLORS #define LCD_MAX_LOG_COLORS (256) #endif /* Optionally swap red and blue components */ #ifndef LCD_SWAP_RB #define LCD_SWAP_RB 0 #endif #if !defined (LCD_CONTROLLER) && defined (LCD_CONTROLLER_0) #define LCD_CONTROLLER LCD_CONTROLLER_0 #endif #if !defined (LCD_XSIZE) && defined (LCD_XSIZE_0) #define LCD_XSIZE LCD_XSIZE_0 #endif #if !defined (LCD_YSIZE) && defined (LCD_YSIZE_0) #define LCD_YSIZE LCD_YSIZE_0 #endif #if !defined (LCD_BITSPERPIXEL) && defined (LCD_BITSPERPIXEL_0) #define LCD_BITSPERPIXEL LCD_BITSPERPIXEL_0 #endif #if !defined (LCD_VYSIZE) && defined (LCD_VYSIZE_0) #define LCD_VYSIZE LCD_VYSIZE_0 #endif /********************************************************************* * * Defaults for Display 0 (first display) * ********************************************************************** */ #ifndef LCD_MIRROR_X #define LCD_MIRROR_X (0) /* If active: X -> -X */ #endif #ifndef LCD_MIRROR_Y #define LCD_MIRROR_Y (0) /* If active: Y -> -Y */ #endif #ifndef LCD_SWAP_XY #define LCD_SWAP_XY (0) /* If active: X <-> Y */ #endif #ifndef LCD_BITSPERPIXEL_L0 #define LCD_BITSPERPIXEL_L0 LCD_BITSPERPIXEL #endif #ifndef LCD_DELTA_MODE #define LCD_DELTA_MODE 0 /**/ #endif /* osition data for controller 0 */ #ifndef LCD_XORG0 #define LCD_XORG0 (0) /* leftmost position covered by this controller */ #endif #ifndef LCD_YORG0 #define LCD_YORG0 (0) /* topmost position covered by this controller */ #endif #ifndef LCD_XSIZE0 #define LCD_XSIZE0 (LCD_XSIZE) /* horizontal size covered by this controller */ #endif #ifndef LCD_YSIZE0 #define LCD_YSIZE0 (LCD_YSIZE) /* vertical size covered by this controller */ #endif #ifndef LCD_FIRSTSEG0 #define LCD_FIRSTSEG0 (0) /* first segment used by this controller */ #endif #ifndef LCD_LASTSEG0 #define LCD_LASTSEG0 (LCD_XSIZE-1) /* Contr.0: last segment line used */ #endif #ifndef LCD_FIRSTCOM0 #define LCD_FIRSTCOM0 (0) /* first com used by this controller */ #endif #ifndef LCD_LASTCOM0 #define LCD_LASTCOM0 (LCD_YSIZE-1) /* Contr.0: last com line used */ #endif #if (!LCD_SWAP_XY) #define LCD_XSIZE_PHYS LCD_XSIZE #define LCD_YSIZE_PHYS LCD_YSIZE #define LCD_VXSIZE_PHYS LCD_VXSIZE #define LCD_VYSIZE_PHYS LCD_VYSIZE #else #define LCD_XSIZE_PHYS LCD_YSIZE #define LCD_YSIZE_PHYS LCD_XSIZE #define LCD_VXSIZE_PHYS LCD_VYSIZE #define LCD_VYSIZE_PHYS LCD_VXSIZE #endif /********************************************************** * * Color settings */ #ifndef LCD_REVERSE #define LCD_REVERSE 0 #endif #ifndef LCD_REVERSE_LUT #define LCD_REVERSE_LUT 0 #endif #ifndef LCD_PHYSCOLORS_IN_RAM #define LCD_PHYSCOLORS_IN_RAM 0 #endif #if !defined (LCD_PHYSCOLORS) #if (LCD_BITSPERPIXEL == 1) | (LCD_BITSPERPIXEL == 2) | (LCD_BITSPERPIXEL == 4) #ifndef LCD_FIXEDPALETTE #define LCD_FIXEDPALETTE LCD_BITSPERPIXEL #endif #endif #endif /* defined (LCD_PHYSCOLORS) */ #if !defined (LCD_FIXEDPALETTE) #if !defined (LCD_PHYSCOLORS) #if LCD_BITSPERPIXEL == 8 #define LCD_FIXEDPALETTE 8666 #elif LCD_BITSPERPIXEL == 12 #define LCD_FIXEDPALETTE 44412 #elif LCD_BITSPERPIXEL == 15 #define LCD_FIXEDPALETTE 555 #elif LCD_BITSPERPIXEL == 16 #define LCD_FIXEDPALETTE 565 #else #define LCD_FIXEDPALETTE 0 #endif #else #define LCD_FIXEDPALETTE 0 #endif #endif #if (LCD_BITSPERPIXEL > 8) && defined (LCD_PHYSCOLORS) #error List of physical colors not permitted if more than 8 bpp are used ! #endif #if (LCD_FIXEDPALETTE==0) #if !defined(LCD_PHYSCOLORS) #error You have to define a fixed palette (LCD_FIXEDPALETTE) or #error the list of physical colors (LCD_PHYSCOLORS) in LCDConf.h ! #endif #endif /* In order to avoid warnings for undefined parameters */ #ifndef LCD_USE_PARA #define LCD_USE_PARA(para) para=para; #endif /********************************************************************* * * Defaults for Display 1 (second display) * ********************************************************************** */ #if GUI_NUM_LAYERS > 1 #ifndef LCD_MIRROR_X_1 #define LCD_MIRROR_X_1 (0) /* If active: X -> -X */ #endif #ifndef LCD_MIRROR_Y_1 #define LCD_MIRROR_Y_1 (0) /* If active: Y -> -Y */ #endif #ifndef LCD_SWAP_XY_1 #define LCD_SWAP_XY_1 (0) /* If active: X <-> Y */ #endif #ifndef LCD_BITSPERPIXEL_L0_1 #define LCD_BITSPERPIXEL_L0_1 LCD_BITSPERPIXEL_1 #endif #ifndef LCD_DELTA_MODE_1 #define LCD_DELTA_MODE_1 0 /**/ #endif #ifndef LCD_YMAG_1 #define LCD_YMAG_1 1 #endif #ifndef LCD_XMAG_1 #define LCD_XMAG_1 1 #endif #ifndef LCD_VXSIZE_1 #define LCD_VXSIZE_1 (LCD_XSIZE_1 * LCD_XMAG_1) /* virtual x-size */ #endif #ifndef LCD_VYSIZE_1 #define LCD_VYSIZE_1 (LCD_YSIZE_1 * LCD_YMAG_1) /* virtual y-size */ #endif #ifndef LCD_NUM_COLORS_1 #define LCD_NUM_COLORS_1 (1L< /* Optionally swap red and blue components */ #ifndef LCD_SWAP_RB_1 #define LCD_SWAP_RB_1 0 #endif /********************************************************** * * Color settings */ #ifndef LCD_REVERSE_1 #define LCD_REVERSE_1 0 #endif #ifndef LCD_REVERSE_LUT_1 #define LCD_REVERSE_LUT_1 0 #endif #if !defined (LCD_PHYSCOLORS_1) #if (LCD_BITSPERPIXEL_1 == 1) | (LCD_BITSPERPIXEL_1 == 2) | (LCD_BITSPERPIXEL_1 == 4) #ifndef LCD_FIXEDPALETTE_1 #define LCD_FIXEDPALETTE_1 LCD_BITSPERPIXEL_1 #endif #endif #endif /* defined (LCD_PHYSCOLORS) */ #if !defined (LCD_FIXEDPALETTE_1) #if !defined (LCD_PHYSCOLORS_1) #if LCD_BITSPERPIXEL_1 == 8 #define LCD_FIXEDPALETTE_1 8666 #elif LCD_BITSPERPIXEL_1 == 15 #define LCD_FIXEDPALETTE_1 555 #elif LCD_BITSPERPIXEL_1 == 16 #define LCD_FIXEDPALETTE_1 565 #else #define LCD_FIXEDPALETTE_1 0 #endif #else #define LCD_FIXEDPALETTE_1 0 #endif #endif #if (LCD_BITSPERPIXEL_1 > 8) && defined (LCD_PHYSCOLORS_1) #error List of physical colors not permitted if more than 8 bpp are used ! #endif #if (LCD_FIXEDPALETTE_1 == 0) #if !defined(LCD_PHYSCOLORS_1) #error You have to define a fixed palette (LCD_FIXEDPALETTE_1) or #error the list of physical colors (LCD_PHYSCOLORS_1) in LCDConf.h ! #endif #endif #endif /* GUI_NUM_LAYERS > 1 */ /********************************************************************* * * Defaults for Display 2 (third display) * ********************************************************************** */ #if GUI_NUM_LAYERS > 2 #ifndef LCD_MIRROR_X_2 #define LCD_MIRROR_X_2 (0) /* If active: X -> -X */ #endif #ifndef LCD_MIRROR_Y_2 #define LCD_MIRROR_Y_2 (0) /* If active: Y -> -Y */ #endif #ifndef LCD_SWAP_XY_2 #define LCD_SWAP_XY_2 (0) /* If active: X <-> Y */ #endif #ifndef LCD_BITSPERPIXEL_L0_2 #define LCD_BITSPERPIXEL_L0_2 LCD_BITSPERPIXEL_2 #endif #ifndef LCD_DELTA_MODE_2 #define LCD_DELTA_MODE_2 0 /**/ #endif #ifndef LCD_YMAG_2 #define LCD_YMAG_2 1 #endif #ifndef LCD_XMAG_2 #define LCD_XMAG_2 1 #endif #ifndef LCD_VXSIZE_2 #define LCD_VXSIZE_2 (LCD_XSIZE_2 * LCD_XMAG_2) /* virtual x-size */ #endif #ifndef LCD_VYSIZE_2 #define LCD_VYSIZE_2 (LCD_YSIZE_2 * LCD_YMAG_2) /* virtual y-size */ #endif #ifndef LCD_NUM_COLORS_2 #define LCD_NUM_COLORS_2 (1L< /* Optionally swap red and blue components */ #ifndef LCD_SWAP_RB_2 #define LCD_SWAP_RB_2 0 #endif /********************************************************** * * Color settings */ #ifndef LCD_REVERSE_2 #define LCD_REVERSE_2 0 #endif #ifndef LCD_REVERSE_LUT_2 #define LCD_REVERSE_LUT_2 0 #endif #if !defined (LCD_PHYSCOLORS_2) #if (LCD_BITSPERPIXEL_2 == 1) | (LCD_BITSPERPIXEL_2 == 2) | (LCD_BITSPERPIXEL_2 == 4) #ifndef LCD_FIXEDPALETTE_2 #define LCD_FIXEDPALETTE_2 LCD_BITSPERPIXEL_2 #endif #endif #endif /* defined (LCD_PHYSCOLORS) */ #if !defined (LCD_FIXEDPALETTE_2) #if !defined (LCD_PHYSCOLORS_2) #if LCD_BITSPERPIXEL_2 == 8 #define LCD_FIXEDPALETTE_2 8666 #elif LCD_BITSPERPIXEL_2 == 15 #define LCD_FIXEDPALETTE_2 555 #elif LCD_BITSPERPIXEL_2 == 16 #define LCD_FIXEDPALETTE_2 565 #else #define LCD_FIXEDPALETTE_2 0 #endif #else #define LCD_FIXEDPALETTE_2 0 #endif #endif #if (LCD_BITSPERPIXEL_2 > 8) && defined (LCD_PHYSCOLORS_2) #error List of physical colors not permitted if more than 8 bpp are used ! #endif #if (LCD_FIXEDPALETTE_2 == 0) #if !defined(LCD_PHYSCOLORS_2) #error You have to define a fixed palette (LCD_FIXEDPALETTE_2) or #error the list of physical colors (LCD_PHYSCOLORS_2) in LCDConf.h ! #endif #endif #endif /* GUI_NUM_LAYERS > 2 */ /********************************************************************* * * Defaults for Display 3 (fourth display) * ********************************************************************** */ #if GUI_NUM_LAYERS > 3 #ifndef LCD_MIRROR_X_3 #define LCD_MIRROR_X_3 (0) /* If active: X -> -X */ #endif #ifndef LCD_MIRROR_Y_3 #define LCD_MIRROR_Y_3 (0) /* If active: Y -> -Y */ #endif #ifndef LCD_SWAP_XY_3 #define LCD_SWAP_XY_3 (0) /* If active: X <-> Y */ #endif #ifndef LCD_BITSPERPIXEL_L0_3 #define LCD_BITSPERPIXEL_L0_3 LCD_BITSPERPIXEL_3 #endif #ifndef LCD_DELTA_MODE_3 #define LCD_DELTA_MODE_3 0 /**/ #endif #ifndef LCD_YMAG_3 #define LCD_YMAG_3 1 #endif #ifndef LCD_XMAG_3 #define LCD_XMAG_3 1 #endif #ifndef LCD_VXSIZE_3 #define LCD_VXSIZE_3 (LCD_XSIZE_3 * LCD_XMAG_3) /* virtual x-size */ #endif #ifndef LCD_VYSIZE_3 #define LCD_VYSIZE_3 (LCD_YSIZE_3 * LCD_YMAG_3) /* virtual y-size */ #endif #ifndef LCD_NUM_COLORS_3 #define LCD_NUM_COLORS_3 (1L< /* Optionally swap red and blue components */ #ifndef LCD_SWAP_RB_3 #define LCD_SWAP_RB_3 0 #endif /********************************************************** * * Color settings */ #ifndef LCD_REVERSE_3 #define LCD_REVERSE_3 0 #endif #ifndef LCD_REVERSE_LUT_3 #define LCD_REVERSE_LUT_3 0 #endif #if !defined (LCD_PHYSCOLORS_3) #if (LCD_BITSPERPIXEL_3 == 1) | (LCD_BITSPERPIXEL_3 == 2) | (LCD_BITSPERPIXEL_3 == 4) #ifndef LCD_FIXEDPALETTE_3 #define LCD_FIXEDPALETTE_3 LCD_BITSPERPIXEL_3 #endif #endif #endif /* defined (LCD_PHYSCOLORS) */ #if !defined (LCD_FIXEDPALETTE_3) #if !defined (LCD_PHYSCOLORS_3) #if LCD_BITSPERPIXEL_3 == 8 #define LCD_FIXEDPALETTE_3 8666 #elif LCD_BITSPERPIXEL_3 == 15 #define LCD_FIXEDPALETTE_3 555 #elif LCD_BITSPERPIXEL_3 == 16 #define LCD_FIXEDPALETTE_3 565 #else #define LCD_FIXEDPALETTE_3 0 #endif #else #define LCD_FIXEDPALETTE_3 0 #endif #endif #if (LCD_BITSPERPIXEL_3 > 8) && defined (LCD_PHYSCOLORS_3) #error List of physical colors not permitted if more than 8 bpp are used ! #endif #if (LCD_FIXEDPALETTE_3 == 0) #if !defined(LCD_PHYSCOLORS_3) #error You have to define a fixed palette (LCD_FIXEDPALETTE_3) or #error the list of physical colors (LCD_PHYSCOLORS_3) in LCDConf.h ! #endif #endif #endif /* GUI_NUM_LAYERS > 3 */ /********************************************************************* * * Defaults for Display 4 (fiveth display) * ********************************************************************** */ #if GUI_NUM_LAYERS > 4 #ifndef LCD_MIRROR_X_4 #define LCD_MIRROR_X_4 (0) /* If active: X -> -X */ #endif #ifndef LCD_MIRROR_Y_4 #define LCD_MIRROR_Y_4 (0) /* If active: Y -> -Y */ #endif #ifndef LCD_SWAP_XY_4 #define LCD_SWAP_XY_4 (0) /* If active: X <-> Y */ #endif #ifndef LCD_BITSPERPIXEL_L0_4 #define LCD_BITSPERPIXEL_L0_4 LCD_BITSPERPIXEL_4 #endif #ifndef LCD_DELTA_MODE_4 #define LCD_DELTA_MODE_4 0 /**/ #endif #ifndef LCD_YMAG_4 #define LCD_YMAG_4 1 #endif #ifndef LCD_XMAG_4 #define LCD_XMAG_4 1 #endif #ifndef LCD_VXSIZE_4 #define LCD_VXSIZE_4 (LCD_XSIZE_4 * LCD_XMAG_4) /* virtual x-size */ #endif #ifndef LCD_VYSIZE_4 #define LCD_VYSIZE_4 (LCD_YSIZE_4 * LCD_YMAG_4) /* virtual y-size */ #endif #ifndef LCD_NUM_COLORS_4 #define LCD_NUM_COLORS_4 (1L< /* Optionally swap red and blue components */ #ifndef LCD_SWAP_RB_4 #define LCD_SWAP_RB_4 0 #endif /********************************************************** * * Color settings */ #ifndef LCD_REVERSE_4 #define LCD_REVERSE_4 0 #endif #ifndef LCD_REVERSE_LUT_4 #define LCD_REVERSE_LUT_4 0 #endif #if !defined (LCD_PHYSCOLORS_4) #if (LCD_BITSPERPIXEL_4 == 1) | (LCD_BITSPERPIXEL_4 == 2) | (LCD_BITSPERPIXEL_4 == 4) #ifndef LCD_FIXEDPALETTE_4 #define LCD_FIXEDPALETTE_4 LCD_BITSPERPIXEL_4 #endif #endif #endif /* defined (LCD_PHYSCOLORS) */ #if !defined (LCD_FIXEDPALETTE_4) #if !defined (LCD_PHYSCOLORS_4) #if LCD_BITSPERPIXEL_4 == 8 #define LCD_FIXEDPALETTE_4 8666 #elif LCD_BITSPERPIXEL_4 == 15 #define LCD_FIXEDPALETTE_4 555 #elif LCD_BITSPERPIXEL_4 == 16 #define LCD_FIXEDPALETTE_4 565 #else #define LCD_FIXEDPALETTE_4 0 #endif #else #define LCD_FIXEDPALETTE_4 0 #endif #endif #if (LCD_BITSPERPIXEL_4 > 8) && defined (LCD_PHYSCOLORS_4) #error List of physical colors not permitted if more than 8 bpp are used ! #endif #if (LCD_FIXEDPALETTE_4 == 0) #if !defined(LCD_PHYSCOLORS_4) #error You have to define a fixed palette (LCD_FIXEDPALETTE_4) or #error the list of physical colors (LCD_PHYSCOLORS_4) in LCDConf.h ! #endif #endif #endif /* GUI_NUM_LAYERS > 4 */ /********************************************************************* * * Global defaults for all displays * ********************************************************************** */ #if (LCD_BITSPERPIXEL <= 8) && (GUI_NUM_LAYERS < 2) #define LCD_PIXELINDEX U8 #else #define LCD_PIXELINDEX U16 #endif #endif /* LCD_INTERN_H */ |
|
|
|
好的!我参考下试试~~谢谢
|
|
|
|
只有小组成员才能发言,加入小组>>
调试STM32H750的FMC总线读写PSRAM遇到的问题求解?
1125 浏览1 评论
X-NUCLEO-IHM08M1板文档中输出电流为15Arms,15Arms是怎么得出来的呢?
1149 浏览1 评论
581 浏览2 评论
STM32F030F4 HSI时钟温度测试过不去是怎么回事?
436 浏览2 评论
ST25R3916能否对ISO15693的标签芯片进行分区域写密码?
1041 浏览2 评论
1627浏览9评论
STM32仿真器是选择ST-LINK还是选择J-LINK?各有什么优势啊?
290浏览4评论
STM32F0_TIM2输出pwm2后OLED变暗或者系统重启是怎么回事?
297浏览3评论
290浏览3评论
stm32cubemx生成mdk-arm v4项目文件无法打开是什么原因导致的?
262浏览3评论
小黑屋|手机版|Archiver|德赢Vwin官网(湘ICP备2023018690号)
GMT+8, 2024-8-22 17:45, Processed in 0.745740 second(s), Total 54, Slave 48 queries .
Powered by德赢Vwin官网 网
© 2015bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号