[size=13.63636302947998px]#include <glib_use.h>
[size=13.63636302947998px]u16 gb_LCD_X_Size,gb_LCD_Y_Size;
[size=13.63636302947998px]void DebugDisp_AChar(void);
[size=13.63636302947998px]void DebugDisp_CharAt(void);
[size=13.63636302947998px]void DebugDisp_Chars(void);
[size=13.63636302947998px]void DebugDisp_NextLine(void);
[size=13.63636302947998px]void DebugDisp_String(void);
[size=13.63636302947998px]void DebugDisp_StringAt(void);
[size=13.63636302947998px]void DebugDisp_StringAtCEOL(void);
[size=13.63636302947998px]void DebugDisp_StringHCenterAt(void);
[size=13.63636302947998px]void DebugDisp_StringInRect(void);
[size=13.63636302947998px]void DebugDisp_StringInRectEx(void);
[size=13.63636302947998px]void DebugDisp_InRectWarp(void);
[size=13.63636302947998px]void DebugDisp_StringLen(void);
[size=13.63636302947998px]void DebugDisp_WrapGetNumLines(void);
[size=13.63636302947998px]void DebugDisp_GetTextMode(void);
[size=13.63636302947998px]void DebugDisp_SetTextMode(void);
[size=13.63636302947998px]void DebugDisp_SetTextStyle(void);
[size=13.63636302947998px]void DebugDisp_GetTextAlign(void);
[size=13.63636302947998px]void DebugDisp_SetLBorder(void);
[size=13.63636302947998px]void DebugDisp_SetTextAlign(void);
[size=13.63636302947998px]void DebugDisp_GotoX(void);
[size=13.63636302947998px]void DebugDisp_GotoY(void);
[size=13.63636302947998px]void DebugDisp_GotoXY(void);
[size=13.63636302947998px]void DebugDisp_GetPosX(void);
[size=13.63636302947998px]void DebugDisp_GetPosY(void);
[size=13.63636302947998px]void DebugDisp_Clear(void);
[size=13.63636302947998px]void DebugDisp_CEOL(void);
[size=13.63636302947998px]void (*pDebugHandler[])(void)=
[size=13.63636302947998px]{
[size=13.63636302947998px] DebugDisp_AChar,
[size=13.63636302947998px] DebugDisp_CharAt,
[size=13.63636302947998px] DebugDisp_Chars,
[size=13.63636302947998px] DebugDisp_NextLine,
[size=13.63636302947998px] DebugDisp_String,
[size=13.63636302947998px] DebugDisp_StringAt,
[size=13.63636302947998px] DebugDisp_StringAtCEOL,
[size=13.63636302947998px] DebugDisp_StringHCenterAt,
[size=13.63636302947998px] DebugDisp_StringInRect,
[size=13.63636302947998px] DebugDisp_StringInRectEx,
[size=13.63636302947998px] DebugDisp_InRectWarp,
[size=13.63636302947998px] DebugDisp_StringLen,
[size=13.63636302947998px] DebugDisp_WrapGetNumLines,
[size=13.63636302947998px] DebugDisp_GetTextMode,
[size=13.63636302947998px] DebugDisp_SetTextMode,
[size=13.63636302947998px] DebugDisp_SetTextStyle,
[size=13.63636302947998px]};
[size=13.63636302947998px]void Sys_emWIN_Init(void)
[size=13.63636302947998px]{
[size=13.63636302947998px] gb_LCD_X_Size = LCD_GetXSize();
[size=13.63636302947998px] gb_LCD_X_Size = LCD_GetYSize();
[size=13.63636302947998px] GUI_SetBkColor(GUI_BLUE);
[size=13.63636302947998px] GUI_Clear();
[size=13.63636302947998px] GUI_SetColor(GUI_RED);
[size=13.63636302947998px] GUI_SetFont(&GUI_Font24_ASCII);
[size=13.63636302947998px]}
[size=13.63636302947998px]void MainTask(void)
[size=13.63636302947998px]{
[size=13.63636302947998px] int gb_DebugNum;
[size=13.63636302947998px] GUI_Init();
[size=13.63636302947998px] Sys_emWIN_Init();
[size=13.63636302947998px] gb_DebugNum = 0;
[size=13.63636302947998px] (*pDebugHandler[gb_DebugNum])();
[size=13.63636302947998px] while(1);
[size=13.63636302947998px]}
[size=13.63636302947998px]/***************
[size=13.63636302947998px]DebugDisp_AChar
[size=13.63636302947998px]在当前位置显示一个字符
[size=13.63636302947998px]****************/
[size=13.63636302947998px]void DebugDisp_AChar(void)
[size=13.63636302947998px]{
[size=13.63636302947998px] GUI_DispChar(0x32);
[size=13.63636302947998px]}
[size=13.63636302947998px]/***************
[size=13.63636302947998px]DebugDisp_CharAt
[size=13.63636302947998px]在指定的位置显示一个字符
[size=13.63636302947998px]****************/
[size=13.63636302947998px]void DebugDisp_CharAt(void)
[size=13.63636302947998px]{
[size=13.63636302947998px] U16 tw_X,tw_Y;
[size=13.63636302947998px] tw_X = gb_LCD_X_Size / 2;
[size=13.63636302947998px] tw_Y = gb_LCD_Y_Size / 2;
[size=13.63636302947998px] GUI_DispCharAt('a',tw_X,tw_Y);
[size=13.63636302947998px]}
[size=13.63636302947998px]/***************
[size=13.63636302947998px]DebugDisp_Chars
[size=13.63636302947998px]在当前位置连续显示某个字符
[size=13.63636302947998px]****************/
[size=13.63636302947998px]void DebugDisp_Chars(void)
[size=13.63636302947998px]{
[size=13.63636302947998px] GUI_DispChars('a',5);
[size=13.63636302947998px]}
[size=13.63636302947998px]/***************
[size=13.63636302947998px]DebugDisp_NextLine
[size=13.63636302947998px]****************/
[size=13.63636302947998px]void DebugDisp_NextLine(void)
[size=13.63636302947998px]{
[size=13.63636302947998px] GUI_DispChar(0x32);
[size=13.63636302947998px] GUI_DispNextLine();
[size=13.63636302947998px] GUI_DispCEOL();
[size=13.63636302947998px] GUI_DispChar(0X33);
[size=13.63636302947998px]}
[size=13.63636302947998px]/***************
[size=13.63636302947998px]DebugDisp_String
[size=13.63636302947998px]****************/
[size=13.63636302947998px]void DebugDisp_String(void)
[size=13.63636302947998px]{
[size=13.63636302947998px] GUI_GotoXY(100,100);
[size=13.63636302947998px] GUI_DispString("FUCK YOU!");
[size=13.63636302947998px]}
[size=13.63636302947998px]/***************
[size=13.63636302947998px]DebugDisp_StringAt
[size=13.63636302947998px]****************/
[size=13.63636302947998px]void DebugDisp_StringAt(void)
[size=13.63636302947998px]{
[size=13.63636302947998px] GUI_DispStringAt("Fuck you",100,100);
[size=13.63636302947998px]}
[size=13.63636302947998px]/***************
[size=13.63636302947998px]DebugDisp_StringAtCEOL
[size=13.63636302947998px]****************/
[size=13.63636302947998px]void DebugDisp_StringAtCEOL(void)
[size=13.63636302947998px]{
[size=13.63636302947998px] GUI_DispStringAtCEOL("Fuck you",100,100);
[size=13.63636302947998px]}
[size=13.63636302947998px]/***************
[size=13.63636302947998px]DebugDisp_StringHCenterAt
[size=13.63636302947998px]****************/
[size=13.63636302947998px]void DebugDisp_StringHCenterAt(void)
[size=13.63636302947998px]{
[size=13.63636302947998px] GUI_DispStringHCenterAt("cao nima ",100,100);
[size=13.63636302947998px]}
[size=13.63636302947998px]/***************
[size=13.63636302947998px]DebugDisp_StringInRect
[size=13.63636302947998px]****************/
[size=13.63636302947998px]void DebugDisp_StringInRect(void)
[size=13.63636302947998px]{
[size=13.63636302947998px]#if 1
[size=13.63636302947998px] LCD_RECT tw_Rect;
[size=13.63636302947998px] tw_Rect.x0 = 0;
[size=13.63636302947998px] tw_Rect.y0 = 0;
[size=13.63636302947998px] tw_Rect.x1 = 100;
[size=13.63636302947998px] tw_Rect.y1 = 100;
[size=13.63636302947998px] GUI_GetClientRect(&tw_Rect);
[size=13.63636302947998px] GUI_DispStringInRect("fuck you mama ",&tw_Rect,GUI_TA_TOP | GUI_TA_LEFT);
[size=13.63636302947998px]#else
[size=13.63636302947998px] GUI_RECT rClient;
[size=13.63636302947998px] GUI_GetClientRect(&rClient);
[size=13.63636302947998px] GUI_DispStringInRect("fuck you mama ",&rClient,GUI_TA_TOP | GUI_TA_LEFT);
[size=13.63636302947998px]#endif
[size=13.63636302947998px]}
[size=13.63636302947998px]/***************
[size=13.63636302947998px]DebugDisp_StringInRectEx
[size=13.63636302947998px]****************/
[size=13.63636302947998px]void DebugDisp_StringInRectEx(void)
[size=13.63636302947998px]{
[size=13.63636302947998px]}
[size=13.63636302947998px]/***************
[size=13.63636302947998px]DebugDisp_InRectWarp
[size=13.63636302947998px]****************/
[size=13.63636302947998px]void DebugDisp_InRectWarp(void)
[size=13.63636302947998px]{
[size=13.63636302947998px]}
[size=13.63636302947998px]/***************
[size=13.63636302947998px]DebugDisp_StringLen
[size=13.63636302947998px]****************/
[size=13.63636302947998px]void DebugDisp_StringLen(void)
[size=13.63636302947998px]{
[size=13.63636302947998px]}
[size=13.63636302947998px]/***************
[size=13.63636302947998px]DebugDisp_WrapGetNumLines
[size=13.63636302947998px]****************/
[size=13.63636302947998px]void DebugDisp_WrapGetNumLines(void)
[size=13.63636302947998px]{
[size=13.63636302947998px]}
[size=13.63636302947998px]/***************
[size=13.63636302947998px]DebugDisp_GetTextMode
[size=13.63636302947998px]****************/
[size=13.63636302947998px]void DebugDisp_GetTextMode(void)
[size=13.63636302947998px]{
[size=13.63636302947998px]}
[size=13.63636302947998px]/***************
[size=13.63636302947998px]DebugDisp_SetTextMode
[size=13.63636302947998px]****************/
[size=13.63636302947998px]void DebugDisp_SetTextMode(void)
[size=13.63636302947998px]{
[size=13.63636302947998px]}
[size=13.63636302947998px]/***************
[size=13.63636302947998px]DebugDisp_SetTextStyle
[size=13.63636302947998px]****************/
[size=13.63636302947998px]void DebugDisp_SetTextStyle(void)
[size=13.63636302947998px]{
[size=13.63636302947998px]}
|