|
for(i=0;i<512;i++)
{
sendbuf[i]=i;
}
SD_WriteSingleBlock(8,sendbuf); //80扇区写入0——512
while(SD_WriteSingleBlock(8,sendbuf)==1) //如果没有写入
{
DisplayZifu(0,0,"write no"); //0
delay(500);
}
DisplayZifu(0,0,"send ok"); // 写入成功
delay(500);
SD_ReadSingleBlock(8,resivebuf);
while(SD_ReadSingleBlock(8,resivebuf)==1) //如果没有读出
{
DisplayZifu(0,1,"read no"); //0
delay(500);
}
DisplayZifu(0,1,"read ok"); // 读出成功
delay(500);
for(i=512;i>0;i--){
SCI_Write(resivebuf[i]);
}
哪位大婶给看看那里错了 ?5110上显示已经成功写入和读出数据了
可是resivebuf这个数组里面全是0呢,这是怎么回事呢?
|
|