void display(unsigned int y); //显示
/*------------MOVE PROGRAM FROM FLASH TO RAM------------*/
void move(void(*p)(),int size)
{
int *w;
int b=0;
w=(int *)0x0150;
for(b=0;b
*(w+b)=*((int*)(p)+b);
}
/*------------------------------------------------------*/
/*---------MOVE DoEraseFlash form FLASH to RAM-----------*/
void EraseFlash(void)
{
void(*a)();
move(DoEarseFlash,0x75);
a=(int *)0x0150;
(*a)();
}
/*-------------------------------------------------------*/
/*---------MOVE DoWriteFlash form FLASH to RAM-----------*/
void WriteFlash(void)
{
void(*t)();
move(DoWriteFlash,0xc9); //原来a0;
t=(int *)0x0150;
(*t)();
}
/*-------------------------------------------------------*/