📄 downloader.c
字号:
//====================================================================
// File Name : DownLoader.c
// Function : Use UART to downloader
// Program : Terminator
// Date : July 6, 2008
// History
// 0.0 : Programming start (July 6, 2008) ->
//====================================================================
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include "def.h"
#include "option.h"
#include "2440addr.h"
#include "2440lib.h"
#include "2440slib.h"
#include "Nand.h"
void DownLoader(void)
{
U8 ch;
U32 number=0,Length,StPage;
unsigned char *srcPt=(unsigned char *)0x31100000;
Uart_Printf("\nAre you ready?I am ready now!\n");
Uart_Printf("Please input the length of the file which you want to send:");
Length=Uart_GetIntNum();
number=Length;
//Get A
ch=Uart_Getch();
Uart_Printf("Please Input the start *page* for flash:\n");
StPage=Uart_GetIntNum();
ch=Uart_Getch();
Uart_Printf("Start DownLoader!!!\n");
while(number--){
ch=Uart_Getch();
*srcPt++=ch;
}
//srcPt=(unsigned char *)0x31100000;
Write_Flash(StPage,Length);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -