中级会员
 
- 积分
- 427
- 金钱
- 427
- 注册时间
- 2015-3-11
- 在线时间
- 123 小时
|
1金钱
res = f_open(&fdst,"0:/Demo.TXT",FA_CREATE_NEW | FA_WRITE);
if ( res == FR_OK )
{
RUN=0;
//½«»o3åÇøμÄêy¾YD′μ½ÎļtÖD
res = f_write(&fdst, textFileBuffer, sizeof(textFileBuffer), &bw);
u2_printf( "\r\n Îļt′′½¨3é1| \n" );
delay_ms(200);
//1رÕÎļt
f_close(&fdst);
}
else if ( res == FR_EXIST )
{
u2_printf( "\r\n ÎļtòѾ-′æÔú \n" );
delay_ms(200);
u2_printf("\r\n %s ", textFileBuffer);
}
这是原子的代码,创建了一个Demo的文本档,我现在想读bin文件可以吗?利用res = f_open(&fdst,"0:/Demo.TXT",FA_CREATE_NEW | FA_WRITE);这个函数,可以把"0:/Demo.TXT"改成"0:/Demo.bin"吗?
|
|