?? main.c
字號:
#include <string.h>
#include <stdio.h>
#include "Target\44blib.h"
#include "Target\44b.h"
#include "timertest\timer.h"
void * function[][2]=
{
(void *)Test_Timer, "Test PWM Timer. ",
(void *)Test_TimerInt, "Test Timer Int. ",
0,0
};
void Isr_Init(void)
{
rINTCON=0x5; //Non-vectored,IRQ enable,FIQ disable //
rINTMOD=0x0; //All=IRQ mode//
rINTMSK=~(BIT_EINT0 | BIT_GLOBAL);
}
void Main(void)
{
char aa;
int i;
Port_Init();
Uart_Init(0,115200);
Isr_Init();
Led_Display(0xf);
Delay(0);
Beep(0x1);
Uart_Select(0); //Select UART0//
Uart_Printf("\n*************************************************************************");
Beep(0x0);
Uart_Printf("\n* 立宇泰電子 *");
Uart_Printf("\n* -S3C44B0X功能部件:定時器測試- *");
Uart_Printf("\n* Version 1.21 *");
Uart_Printf("\n* Email:Support@hzlitai.com.cn *");
Uart_Printf("\n* UART Config--COM:115.2kbps,8Bit,NP,UART0 *");
Uart_Printf("\n*------------------Begin to Start IIC test,OK? (Y/N)--------------------*");
Led_Display(0x0);
aa= Uart_Getch();
if((aa=='Y')||(aa=='y'))
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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -