📄 comload.c
字号:
#include "def.h"
#include "2440addr.h"
#include "2440lib.h"
#define puts Uart_Printf
#define printf Uart_Printf
#define getch Uart_Getch
#ifndef DEBUG_VERSION
#define USE_UART_INT
#endif
extern U32 downloadAddress, downloadFileSize;
static U8 *temp;
#ifdef USE_UART_INT
static void __irq Uart0RxInt(void)
{
ClearSubPending(BIT_SUB_RXD0); //rSUBSRCPND = BIT_SUB_RXD0; //Clear pending bit (Requested)
ClearPending(BIT_UART0);
*temp ++= RdURXH0();
}
#endif
void call_linux(U32 a0, U32 a1, U32 a2);
void comdownload(void)
{
U32 size;
U8 *buf;
U16 checksum;
puts("\nNow download file from uart0...\n");
downloadAddress = _NONCACHE_STARTADDRESS;
buf = (U8 *)downloadAddress;
temp = buf-4;
Uart_GetKey();
#ifdef USE_UART_INT
pISR_UART0 = (U32)Uart0RxInt; //﹃
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -