关于fatfs pf_read (0)
http://elm-chan.org/fsw/ff/pf/read.htmlpf_read
The pf_read function reads data from the file.
FRESULT pf_read (
void* Buffer, /* Pointer to the read buffer */
WORD ByteToRead, /* Number of bytes to read */
WORD* BytesRead /* Pointer to the variable to return number of bytes read */
);
Parameters
Buffer
Pointer to the buffer to store the read data. A NULL specifies the destination is an outgoing stream.
ByteToRead
Number of bytes to read.
BytesRead
Pointer to the WORD variable to return number of bytes read.
请问大家
A NULL specifies the destination is an outgoing stream.
是什么意思,谢谢 本帖最后由 SCREA 于 2013-10-9 10:27 编辑
http://www.amobbs.com/forum.php?mod=viewthread&tid=4911004&highlight=pf%5C_read
不过请问这个打开一个文件后,比如花心.mp3。if(pf_mount(&Fatfs)==FR_OK)
{
if((pf_opendir(&dir,"Music"))==FR_OK)
{
// put_string("??");
if(pf_open(ss)==FR_OK)
{
put_string("??");
VS1003B_XCS_H();
while(1)
{
VS1003B_XDCS_L(); //数据片选
if( pf_read(SD_buf,512,&read_word_num)==FR_OK)
{
for(k=0;k<512;k++)
{
VS1003B_WriteDAT(SD_buf);
}
}
VS1003B_XDCS_H();
}
}//else put_string(str6);
}
}这就算读当前花心.mp3歌曲的数据?
页:
[1]