?? iap.c
字號:
#include "iap.h"
U32 IAP_FCCLK;
U32 command[5]; // IAP入口參數緩沖區
U32 result[2]; // IAP出口參數緩沖區
U32 IAP_SelectSector(U8 sectorStart, U8 sectorEnd) {
command[0] = IAP_CMD_SELECTSECTOR;
command[1] = sectorStart;
command[2] = sectorEnd;
IAP_Entry(command, result);
return result[0];
}
U32 IAP_RamToFlash(U32 dst, U32 src, U32 num) {
command[0] = IAP_CMD_RAMTOFLASH;
command[1] = dst;
command[2] = src;
command[3] = num;
command[4] = (IAP_FCCLK ? IAP_FCCLK : IAP_FCCLK_Default);
IAP_Entry(command, result);
return result[0];
}
U32 IAP_EraseSector(U8 sectorStart, U8 sectorEnd) {
command[0] = IAP_CMD_ERASESECTOR;
command[1] = sectorStart;
command[2] = sectorEnd;
command[3] = (IAP_FCCLK ? IAP_FCCLK : IAP_FCCLK_Default);
IAP_Entry(command, result);
return result[0];
}
U32 IAP_BlankCheck(U8 sectorStart, U8 sectorEnd) {
command[0] = IAP_CMD_BLANKCHECK;
command[1] = sectorStart;
command[2] = sectorEnd;
IAP_Entry(command, result);
return result[0];
}
U32 IAP_ReadBootID(void) {
command[0] = IAP_CMD_READBOOTID;
IAP_Entry(command, result);
return result[1];
}
U32 IAP_ReadPartID(void) {
command[0] = IAP_CMD_READPARTID;
IAP_Entry(command, result);
return result[1];
}
U32 IAP_Compare(U32 dst, U32 src, U32 num) {
command[0] = IAP_CMD_COMPARE;
command[1] = dst;
command[2] = src;
command[3] = num;
IAP_Entry(command, result);
return result[0];
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -