|
本帖最后由 libitao 于 2012-12-22 21:41 编辑
[size=2]struct {
void (*fun)(void);
char *tip;
}CmdTip[] = {
{ Temp_function, "Please input 1-14 to select test"},
{ Uart2_Test, "COM port ( UART2 ) test"},
{ UsbMain, "Download file from PC via USB port"},
//{ comdownload, "Download file from PC via COM port"},
{ BUZZER_PWM_Test, "Buzzer test"},
{ RTC_Display, "Real time clock display" },
{ Test_Adc, "ADC test" },
{ Key_Scan_Test, "8*2 key array test"},
{ Touch_Screen_Init, "Touchpanel test" },
{Test_Lcd_AT070TN83, "7.0# TFT LCD 800*480 test"},
{Test_Lcd_AT080TN52, "8.0# TFT LCD 800*600 test"},
{ Test_Lcd_WXCAT43, "4.3# TFT LCD 480*272 test"},
{Test_Lcd_CT35TF05, "3.5# TFT LCD 320*240 test"},
{ Test_IrDA_Tx, "IRDA test"},
{ Test_Iic, "IIC EEPROM test" },
{ PlayMusicTest, "UDA1341 play audio test"},
{ RecordTest, "UDA1341 record audio test"},
{ SDI_test, "SD Card write and read test"},
{Led_Test,"led test"},
{ 0, 0}
};
/************************************************************/
void KeyScanInit(void);
int Main()
{
int i;
#if 0 //bank0 modified to RO_START
MMU_Init(); //MMU should be reconfigured or turned off for the debugger,
//After downloading, MMU should be turned off for the MMU based program,such as WinCE.
#else
MMU_EnableICache();
#endif
SetClockDivider(1, 1);
SetSysFclk(DFT_FCLK_VAL);
Delay( 0 ) ;
Port_Init();
Isr_Init();
Uart_Select(0);
Uart_Init(0, UART_BAUD);
RequestBiosTimerEvent(10, Led1Flash); //when request, auto open bios timer
RequestBiosTimerEvent(20, Led2Flash);
RequestBiosTimerEvent(50, Led3Flash);
RequestBiosTimerEvent(100, Led4Flash);
//GPIO,UART0,PWM TIMER,NAND FLASH
EnableModuleClock(CLOCK_UART0|CLOCK_TIMER|CLOCK_GPIO|CLOCK_NAND|CLOCK_LCD);
Lcd_Port_Init();
Lcd_Init();
rLCDCON1 |= 1; // ENVID=ON
Lcd_ClearScr( (0x00<<11) | (0x00<<5) | (0x1f) ); //clear screen
Beep( 2000, 2000 ) ;
while(1)
{
U8 idx=0;
puts("\nPlease select function : \n");
for(i=0; CmdTip.fun!=0; i++)
printf("%2d : %s\n", i, CmdTip.tip);
idx = Uart_GetIntNum_GJ() ;
{
(*CmdTip[idx].fun)();
}
}
这个是某开发板的硬件测试 界面想请教一下红色字体部分的是什么意思 谢谢各位了 |
阿莫论坛20周年了!感谢大家的支持与爱护!!
曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……
|