📄 main.c
字号:
/*
;************************************************************************************************************
;* 北京精仪达盛科技有限公司
;* 研 发 部
;*
;* http://www.unistrong.com
;*
;*--------------------------------------------- 文件信息 ----------------------------------------------------
;*
;* 文件名称 : MAIN.c
;* 文件功能 : 所有应用程序的头文件均加在此文件中
;* 补充说明 :
;*-------------------------------------------- 最新版本信息 -------------------------------------------------
;* 修改作者 : ARM7开发小组
;* 修改日期 : 2004/04/25
;* 版本声明 : V1.0.1
;*-------------------------------------------- 历史版本信息 -------------------------------------------------
;* 文件作者 : ARM7开发小组
;* 创建日期 : 2004/04/20
;* 版本声明 : v1.0.0
;*-----------------------------------------------------------------------------------------------------------
;*-----------------------------------------------------------------------------------------------------------
;************************************************************************************************************
;*/
#include "..\inc\config.h"
extern GUI_FONT GUI_Font8x16;
extern GUI_FONT CHINESE_FONT12;
extern GUI_FONT CHINESE_FONT16;
/*
*************************************************************************************************************
- 函数名称 : Main(void)
- 函数说明 : 系统的主程序入口
- 输入参数 : 无
- 输出参数 : 无
*************************************************************************************************************
*/
void Main(void)
{
Target_Init();
GUI_Init();
Set_Color(GUI_GREEN);
Fill_Rect(0,0,319,239);
Delay(1000);
Set_Color(GUI_WHITE);
Delay(1000);
Fill_Rect(0,0,319,239);
Set_Color(GUI_BLACK);
Delay(1000);
Fill_Rect(0,0,319,239);
Delay(1000);
Set_Color(GUI_YELLOW);
Fill_Rect(0,0,319,239);
Delay(1000);
Set_Color(GUI_BLUE);
Fill_Rect(0,0,319,239);
Delay(1000);
Set_Color(GUI_RED);
Draw_Circle(100,100,50);
Delay(1000);
Draw_Point (100, 200); //绘制点API
Delay(1000);
Draw_HLine (100, 3, 319); //绘制水平线API
Delay(1000);
Draw_VLine (0, 150, 239); //绘制竖直线API
Delay(1000);
Draw_Line (0,0,319,239);
Delay(1000);
Draw_Line (319,0,0,239);
Delay(1000);
Fill_Circle (80, 180, 40);
Delay(1000);
Fill_Rect (280, 200, 300, 220); //填充区域API
Delay(1000);
Set_Font (&GUI_Font8x16); //设定字体类型API
Set_Color(GUI_WHITE);
Set_BkColor (GUI_BLUE); //设定背景颜色API
Fill_Rect(0,0,319,3);
Fill_Rect(0,0,3,239);
Fill_Rect(316,0,319,239);
Fill_Rect(0,236,319,239);
Disp_String ("this is a demo",130,70);
Set_Font (&CHINESE_FONT12);
Disp_String (CN_start"这是一个例程"CN_end,130,90);
Set_Font (&CHINESE_FONT16);
Disp_String (CN_start"这是一个例程"CN_end,130,110);
while(1);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -