?? main.c
字號:
#include <string.h>
#include ".\Target\option.h"
#include ".\Target\def.h"
#include ".\Target\44b.h"
#include ".\Target\44blib.h"
#include ".\usb\usbdrv.h"
#include ".\usb\Usb_reg.h"
#include <stdio.h>
/********************************************/
// ARMSYS實驗十四:USB接口應用實驗
// 描述:從USB接口接收自PC機發(fā)送的文本文件
/********************************************/
void (*runinram)(void)=(void (*)(void))RAM_ADDRESS;
extern byte USBN9604_init(void);
byte code_loaded=0;
int Main(void)
{
int i,j;
int time = 100000 * 60;
char aa;
rSYSCFG=CACHECFG; // Using 8KB Cache//
Port_Init();
Uart_Init(0,115200);
Beep(0x01);
Led_Display(0xf);
Delay(0);
Uart_Select(0); //Select UART0//
Uart_Printf("\n*************************************************************************");
Beep(0x00);
Uart_Printf("\n* 立泰電子 *");
Uart_Printf("\n* -USB Test Program- *");
Uart_Printf("\n* Version 1.11 *");
Uart_Printf("\n* Email:rao_dali@263.net *");
Uart_Printf("\n* UART Config--COM:115.2kbps,8Bit,NP,UART0 *");
Led_Display(0x0);
Uart_Printf("\n*----------------Begin test USB? (Y/N)----------------------------------*");
Led_Display(0x0);
aa= Uart_Getch();
if((aa=='Y')||(aa=='y'))
{
if(USBN9604_init())
{
Uart_Printf("\nThe USB chip is not stable or reset failed.");
return 1;
}
else
Uart_Printf("\nThe USB chip is now active!");
}
else
Uart_Printf("\nUSB is inactive!");
rINTCON=0x5;//fiq disable
while(1);
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -