📄 lcd_demo.c
字号:
/************************************************************
lcd_demo.c
在屏幕的中间以像素坐标(29,32)为顶点画一个100*66的矩形
在矩形中以正反显交替显示英文
draw the rectangle of 68×36 with the top of the pixels
coordinate(29,32) in the centre of the screen , and show
the character in the rectangleand with positive and
negative apparent alternately
Copyright (c) 2005 by Thinta Co.LTD
All rights reserved
************************************************************/
#include "..\inc\Bio_Func.h"
#define CHINESEMODE 1
#define ENGLISHMODE 0
#define NORMALCOLOR 1
#define REVERSECOLOR 0
#define BLACKPIXEL 1
#define WHITEPIXEL 0
typedef struct {
U8 x;
U8 y;
}LCD_POS;
void _PutString( U8 x,U8 y,U8 *str,U8 color )
{
_setdispcolor(color);
_gotoxy(x,y);
_putstr(str);
}
void main( void )
{
LCD_POS rec_start={29,32},rec_end={130,97};
U8 buff1[]="My Zhenzhong",buff2[]="我的振中";
U8 charcolor=NORMALCOLOR;
_sysinit();
_setscreenmode(CHINESEMODE);
_cls();
_drawrect(rec_start.x,rec_start.y,rec_end.x,rec_end.y,BLACKPIXEL);
for(;;)
{
_PutString(4,3,buff1,charcolor);
_PutString(6,4,buff2,charcolor);
charcolor=!charcolor;
if(_key_time(500)!=0)
break;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -