?? tftpput.c
字號:
#include "..\config.h"
#include "tftpput.h"
#include "utils.h"
#include "console.h"
#ifdef TFTP_SUPPORT
extern int DownLoadEnd;
extern unsigned long downloadFileSize;
extern unsigned long downloadAddress;
static unsigned char *buf;
static int data_len;
int tftp_put_begin(void)
{
puts("Starting the TFTP download...\n");
buf = (unsigned char *)downloadAddress;
data_len = 0;
return 0;
}
int tftp_put(unsigned char *data, int len)
{
static int count = 0;
count += len;
if (count > 32 * 1024) {
putch('.');
count = 0;
}
memcpy(buf + data_len, data, len);
/* {
int i;
if(len==0x200)
{
printf("\n%x:", data_len+0xf0);
for(i=0xf0; i<0xf4; i++)
printf("%x,",(buf+data_len)[i]);
}
}*/
data_len += len;
return 0;
}
int update_bios(unsigned char *bios, int size)
{
return 0;
}
int update_system_table(unsigned char *system_table, int size)
{
return 0;
}
int update_partition_table(unsigned char *partition_table, int size)
{
return 0;
}
int update_partition(int partition_num, unsigned char *partition_data, int size)
{
return 0;
}
int update_firmware(unsigned char *firmware, int size)
{
return 0;
}
int tftp_put_end(void)
{
DownLoadEnd = 1;
downloadFileSize = data_len;
return 0;
}
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -