main.c

来自「本程序为s3c44b0控制kcs057 320*240 的液晶 为sdt工程 该」· C语言 代码 · 共 55 行

C
55
字号
#include <string.h>
#include <stdio.h>

#include "..\INC\44blib.h"
#include "..\INC\44b.h"
#include "..\INC\lcd.h"

void * function[][2]=
{
	(void *)Test_LCD,		    "LCD Test   ",
	0,0
};

void Main(void)
{
	int i,j;
	int time = 100000 * 60;
    	char aa;
	Port_Init();
	Uart_Init(0,115200);
	Led_Display(0xf);
	Delay(0);
    	Beep(0x01);
	Uart_Select(0); 
	Uart_Printf("\nS3C44B0X Test Program Ver 2.0 rSYSCFG=0x%x MCLK=%dHz\n",rSYSCFG,MCLK);
	Led_Display(0x0);
	
	//aa= Uart_Getch();
	//if((aa=='Y')||(aa=='y'))
	Test_LCD();
	while(1)
	{
			i=0;
			Uart_Printf("\n");
			while(1)
			{   //display menu
				Uart_Printf("%2d:%s",i+1,function[i][1]);
				i++;
				if((int)(function[i][0])==0)
				{
					Uart_Printf("\n");
					break;
				}
				if((i%4)==0)
					Uart_Printf("\n");
			}
			Uart_Printf("\nSelect the function to test?");
			i=Uart_GetIntNum();
			i--;
			Uart_Printf("\n");
			if(i>=0 && (i<(sizeof(function)/8)) ) 
				( (void (*)(void)) (function[i][0]) )();
	}
}

⌨️ 快捷键说明

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