?? main.c
字號:
/****************************************************************************
【文 件 名 稱】main.c
【功 能 描 述】三星S3C44B0X板demo程序代碼
【程 序 版 本】4.0
【創建人及創建日期】龔俊//2002年11月19日19:26
【修改人及修改日期】龔俊//2004-12-8 17:25
****************************************************************************/
//***************************************************************************
#include "def.h"
#include "44b.h"
#include "44blib.h"
#include "eth.h"
#include "arp.h"
extern void tftp_main(U32 addr, U32 give_ip) ;
U32 download_len ;
U32 download_addr ;
//***************************************************************************
/****************************************************************************
【功能說明】系統主函數
****************************************************************************/
void Main(void)
{
rNCACHBE0 = ((Non_Cache_End>>12)<<16)|(Non_Cache_Start>>12);
//在上面的數據區域不使用高速緩存
Port_Init(); //IO口初始化
Uart_Select( 0 ) ; //選擇串口0
Uart_Init( 0, 115200 ) ;
//串口初始化,波特率為115200(系統主頻為32MHz)
Uart_Printf( "\n\n\tS3C44B0X tftp TEST !\n\n" ) ;
#define DOWNLOAD_ADDR 0xc008000
#define IP_ADDRESS ((192U<<24)|(168<<16)|(3<<8)|100)
//默認IP為192.168.3.100
Uart_Printf("Now download file from net to 0x%x...\n", DOWNLOAD_ADDR);
tftp_main( DOWNLOAD_ADDR, IP_ADDRESS ) ;
if ( download_len == -1 )
Uart_Printf("Tftp Download Aborted!\n");
else
Uart_Printf("\nReceived %x bytes success\n", download_len);
while( 1 ) ;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -