?? main.c
字號:
/****************************************************************************
【文 件 名 稱】main.c
【功 能 描 述】三星S3C2410A板demo程序代碼
【程 序 版 本】4.0
【創建人及創建日期】icesoar//2002年11月19日19:26
【修改人及修改日期】icesoar//2004-12-8 17:25
****************************************************************************/
#include "def.h"
#include "2410addr.h"
#include "config.h"
#include "board.h"
#include "utils.h"
/*************************************************************/
void Main(void)
{
int data;
BoardInitStart();
SystemClockInit();
TimerInit(TIMER_FREQ);
MemCfgInit();
PortInit();
SerialSwitch(0);
SerialChgBaud(115200);
printf("please Enter any key to run test\n");
getch();
while(1)
{
while((rUTRSTAT0 & 0x1)==0x0); /* 等待數據 */
data = rURXH0; /* 讀取數據 */
if(data=='\r') /*如果是換行字符,補充一個回車 */
{
while(!(rUTRSTAT0 & 0x2)); /* 等待發送緩沖空.*/
rUTXH0 = data; /* 將數據寫到數據端口 */
while(!(rUTRSTAT0 & 0x2)); /* 等待發送緩沖空.*/
rUTXH0 = '\n'; /* 將數據寫到數據端口 */
}
else
{
while(!(rUTRSTAT0 & 0x2)); /* 等待發送緩沖空.*/
rUTXH0 = data; /* 將數據寫到數據端口 */
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -