📄 flash.c
字号:
#include <string.h>
#include "..\include\option.h"
#include "..\include\def.h"
#include "..\include\k401.h"
#include "..\include\k401lib.h"
#include "..\include\am29lv800.h"
void *flashType[][2]=
{
(void *)ProgramAM29LV800, "AM29LV800BB ",
0,0
};
void ProgramFlash(void)
{
int i=0, temp0, temp1;
temp0='q'-'a';
temp1='Q'-'a';
Uart_Printf("*** NOR Flash Memory writer ver 0.0 ***\n");
rSYSCFG=rSYSCFG & (~WRBUF_ON); //write buffer has to be off for proper timing.
while(1)
{
Uart_Printf("=========================================================================\n");
while(1)
{
Uart_Printf("%c: %s",'a'+i,flashType[i][1]);
i++;
if((int)(flashType[i][0])==0){Uart_Printf("\nq: Return to Main Menu\n");break;}
if((i%4)==0)Uart_Printf("\n");
}
Uart_Printf("=========================================================================\n");
Uart_Printf("Select the function to test?");
i=Uart_Getch()-'a';
if(i==temp0 || i==temp1) break;
else
{
Uart_Printf("\n");
if(i>=0 && (i<(sizeof(flashType)/8)) )
( (void (*)(void)) (flashType[i][0]) )();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -