再问个问题,文件系统章节的

[复制链接]
523|0
 楼主| 河童 发表于 2018-7-4 14:20 | 显示全部楼层 |阅读模式
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 地址乘块大小是什么意思?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

452

主题

452

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部