高中生
最后登录1970-1-1
在线时间 小时
注册时间2013-8-7
|
DRESULT disk_read (
BYTE drv, /* Physical drive nmuber (0..) */
BYTE *buff, /* Data buffer to store read data */
DWORD sector, /* Sector address (LBA) */
BYTE count /* Number of sectors to read (1..255) */
)
{
if (count > 1)
{
SD_ReadMultiBlocks(buff, sector*BLOCK_SIZE, BLOCK_SIZE, count); //???????
/* Check if the Transfer is finished */
SD_WaitReadOperation(); //循环查询dma传输是否结束
/* Wait until end of DMA transfer */
while(SD_GetStatus() != SD_TRANSFER_OK);
}
else
{
SD_ReadBlock(buff, sector*BLOCK_SIZE, BLOCK_SIZE);
/* Check if the Transfer is finished */
SD_WaitReadOperation(); //循环查询dma传输是否结束
/* Wait until end of DMA transfer */
while(SD_GetStatus() != SD_TRANSFER_OK);
}
return RES_OK;
}
其中 sector*BLOCK_SIZE 地址乘块大小是什么意思?
|
|