⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 达盛科技公司S3C2410基础实验源码
💻 C
字号:
/*
;************************************************************************************************************
;*									  北京精仪达盛科技有限公司
;*                                     	    研    发    部
;*
;*                                 	    http://www.unistrong.com
;*
;*--------------------------------------------- 文件信息 ----------------------------------------------------                                      
;*
;* 文件名称 : MAIN.c	
;* 文件功能 : 所有应用程序的头文件均加在此文件中
;* 补充说明 : 
;*-------------------------------------------- 最新版本信息 -------------------------------------------------
;* 修改作者 : ARM7开发小组
;* 修改日期 : 2004/04/25
;* 版本声明 : V1.0.1
;*-------------------------------------------- 历史版本信息 -------------------------------------------------
;* 文件作者 : ARM7开发小组
;* 创建日期 : 2004/04/20
;* 版本声明 : v1.0.0
;*-----------------------------------------------------------------------------------------------------------
;*-----------------------------------------------------------------------------------------------------------
;************************************************************************************************************
;*/
#include "..\..\Gui\Init\GUI_Init.h"
#include "LCDDriver.h"
#include "target.h"
#include "2410LIB.h"
#include "2410addr.h"

extern GUI_FONT GUI_Font8x16;
extern GUI_FONT CHINESE_FONT12;
extern GUI_FONT CHINESE_FONT16;

/*
*************************************************************************************************************
- 函数名称 : Main(void)
- 函数说明 : 系统的主程序入口
- 输入参数 : 无
- 输出参数 : 无
*************************************************************************************************************
*/

void Main(void){
    int Count = 10000;

 	Target_Init();
 	GUI_Init();
 	Delay(0);
 	Set_Color(GUI_GREEN);
  	Fill_Rect(0,0,319,239);
  	Delay(Count);
  	
  	Set_Color(GUI_WHITE);
  	Fill_Rect(0,0,319,239);
  	Delay(Count);
  	
  	Set_Color(GUI_BLACK);
  	Fill_Rect(0,0,319,239);
 	Delay(Count);
  	
  	Set_Color(GUI_YELLOW);
  	Fill_Rect(0,0,319,239);
  	Delay(Count);
  	
  	Set_Color(GUI_BLUE);
  	Fill_Rect(0,0,319,239);
  	Delay(Count);
  	
  	Set_Color(GUI_RED);
  	Draw_Circle(100,100,50);
  	Delay(Count);
  	
  	Draw_Point  (100, 200); 										//绘制点API
  	Delay(Count);
  	
	Draw_HLine  (100, 3, 319); 										//绘制水平线API
	Delay(Count);
	
	Draw_VLine  (0, 150, 239); 										//绘制竖直线API
	Delay(Count);
	
	Draw_Line   (0,0,319,239);	
	Delay(Count);
	
	Draw_Line   (319,0,0,239);	
	Delay(Count);
	
    Fill_Circle (80, 180, 40);
    Delay(Count);
    
	Fill_Rect   (280, 200, 300, 220); 								  //填充区域API
   	Delay(Count);
   												  
	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); 
	Delay(Count);
	
	Set_Color(GUI_YELLOW);
    while(1){	
        if (Uart_Getch() == ' '){
            Set_Color(GUI_BLUE);
  	        Fill_Rect(0,0,319,239);
  	        Set_Color(GUI_YELLOW);
  	    	Delay(100);
  	        Uart_Printf("--------------Clear Screen!-----------------\n");
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -