[mw_shl_code=c,true]//mian.c
#include "delay.h"
#include "sys.h"
#include "gui.h"
#include "lcduser.h"
#include "usart.h"
int main(void)
{
delay_init();
NVIC_Configuration();
uart_init(9600);
GUI_Init();
GUI_SetFont(&GUI_Font24B_ASCII);
GUI_SetBkColor(GUI_BLUE);
GUI_SetColor(GUI_YELLOW);
GUI_Clear();
GUI_DispStringAt("ABCDefg",100,100);
GUI_DispStringAt("aabbbbbb",200,200);
while(1) ;
}
//LCDconf.h
#ifndef LCDCONF_H
#define LCDCONF_H
#define LCD_XSIZE (320) /* 320 -> 400 */
#define LCD_YSIZE (480) /* 240 */
#define LCD_CONTROLLER (-1) /* 9320 -> 5420 */
#define LCD_BITSPERPIXEL (16)
#define LCD_FIXEDPALETTE (565)
#define LCD_SWAP_RB (1)
//#define LCD_SWAP_XY (1)
//LCD_MIRROR_X
#define LCD_INIT_CONTROLLER() LCDUSER_Init()
#endif /* LCDCONF_H */
//guiconf.h
#ifndef GUICONF_H
#define GUICONF_H
#define GUI_OS (0) /* Compile with multitasking support */
#define GUI_SUPPORT_TOUCH (0) /* Support a touch screen (req. win-manager) */
#define GUI_SUPPORT_UNICODE (0) /* Support mixed ASCII/UNICODE strings */
#define GUI_DEFAULT_FONT &GUI_Font6x8
#define GUI_ALLOC_SIZE 1024*10 /* Size of dynamic memory ... For WM and memory devices*/
/*********************************************************************
*
* Configuration of available packages
*/
#define GUI_WINSUPPORT 0 /* Window manager package available */
#define GUI_SUPPORT_MEMDEV 0 /* Memory devices available */
#define GUI_SUPPORT_AA 0 /* Anti aliasing available */
#endif /* Avoid multiple inclusion */
//LCDNull.c
void LCD_L0_DrawHLine(int x0, int y, int x1)
{
LCD_DrawLine(x0, y, x1, y);
}
void LCD_L0_DrawVLine(int x, int y0, int y1)
{
LCD_DrawLine(x, y0, x, y0);
}
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
}
int LCD_L0_Init(void)
{
LCDUSER_Init();
return 0;
}
void LCD_L0_SetPixelIndex(int x, int y, int PixelIndex)
{
LCD_SetPoint(x,y,PixelIndex);
}
unsigned int LCD_L0_GetPixelIndex(int x, int y) //??????????
{
return LCD_ReadPoint(x,y);
}
[/mw_shl_code]
|