|
如何编写函数uint32 EraseSector(uint32 sec1,uint32 sec2)的测试代码
#define IAP_ERASESECTOR 52
#define IAP_FCCLK 11059
uint32 paramin[8];
uint32 paramout[8];
void(*IAP_Entry)(uint32 param_tab[],uint32 result_tab[]);
uint32 EraseSector(uint32 sec1,uint32 sec2)
{
paramin[0]=IAP_ERASESECTOR;
paramin[1]=sec1;
paramin[2]=sec2;
paramin[3]=IAP_FCCLK;
(*IAP_Entry)(paramin,paramout);
return(paramout[0]);
}
EraseSector(7,7);
void wIAP(void)
{
uint32 dex;
uint8 SendData[512];
uint32 i;
IAP_Entry=(void(*)())IAP_ENTER_ADR;
{
}
int main (void)
{
wIAP();
} |
|