最近在移植fatfs,void main()
{
int i;
unsigned char buffer[512];:'(
CLKCONCMD = 0x80; while (CLKCONSTA != 0x80); // 32MHz
SD_Delay(0xffff);
while(SD_Init())
{
retry1++;
if(retry1>20)
{
//printstr("ERROR: SD card initialize fail!\r\n");
while(1);
}
}
res = f_mount(0, &fs);
res = f_open( &file , "0:/Demo.TXT" , FA_CREATE_NEW | FA_WRITE);
if(res!=FR_OK)
{
while(1);
}
}
我的主函数运行返回都是res_ok ,但是用读卡器打开sd卡看之后,sd卡里面什么都没有?我就无语了,如果有做过的伙伴帮忙指点一下,谢谢啦:'(
|