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

📄 main.c

📁 基于SmartARM2200的液晶显示程序。在屏幕上显示色条。附带一个matlab小程序
💻 C
字号:
/****************************************Copyright (c)**************************************************
**                               Guangzou ZLG-MCU Development Co.,LTD.
**                                      graduate school
**                                 http://www.zlgmcu.com
**
**--------------File Info-------------------------------------------------------------------------------
** File name:			main.c
** Last modified Date:  2004-09-16
** Last Version:		1.0
** Descriptions:		The main() function example template
**
**------------------------------------------------------------------------------------------------------
** Created by:			Chenmingji
** Created date:		2004-09-16
** Version:				1.0
** Descriptions:		The original version
**
**------------------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
** Version:
** Descriptions:
**
********************************************************************************************************/
#include "config.h"

extern uint8  gImage_pic1[];

extern void  DelaymS(uint32 no);

/*******************************************************
* 名称: DispRGB
* 功能: 显示RGB红色。第种纯色,各占80行。
* 入口参数: 无
* 出口参数: 无
*******************************************************/
void  DispRGB(void)
{  uint32  x,y;
 
   TftSetWindow(0,0, 239,319); 
   TftSetWrite(0, 0);
   
 
   // 菜单 填充白色
   for(y=0; y<50; y++)		
   {  for(x=0; x<240; x++)
      {  TftSendDat(0xFFFF); 
      }
   }
   
   // 填充红色
   for(y=50; y<95; y++)
   {  for(x=0; x<240; x++)
      {  TftSendDat(0x07E0); 
      }
   }
   
   // 填充橙色
   for(y=95; y<140; y++)
   {  for(x=0; x<240; x++)
      {  TftSendDat(0x001F); 
      }
   }
   
   // 填充黄色
   for(y=140; y<185; y++)
   {  for(x=0; x<240; x++)
      {  TftSendDat(0xF800); 
      }
   }
      
   // 填充绿色
   for(y=185; y<230; y++)
   {  for(x=0; x<240; x++)
      {  TftSendDat(0xF800); 
      }
   }
   
   // 填充蓝色
   for(y=230; y<275; y++)
   {  for(x=0; x<240; x++)
      {  TftSendDat(0xF800); 
      }
   }
   
   // 填充紫色
   for(y=275; y<320; y++)
   {  for(x=0; x<240; x++)
      {  TftSendDat(0xF800); 
      }
   }
   
   DelaymS(5*1000);			// 延时5S
}



/*******************************************************
* 名称: main
* 功能: 主函数。控制LCD显示。
*******************************************************/
int main (void)
{  // add user source code 
   PINSEL0 = 0x00000000;
   PINSEL1 = 0x00000000;
   
   GUI_Initialize();     
   
   while(1)
   {  // 屏幕填充RGB色
      DispRGB();      
           
   }

   return 0;
}
/*********************************************************************************************************
**                            End Of File
********************************************************************************************************/

⌨️ 快捷键说明

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