MCPcopy Create free account
hub / github.com/ARMmbed/mbed-os / disk_read

Function disk_read

storage/filesystem/fat/source/FATFileSystem.cpp:202–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202extern "C" DRESULT disk_read(BYTE pdrv, BYTE *buff, LBA_t sector, UINT count)
203{
204 debug_if(FFS_DBG, "disk_read(sector %lu, count %u) on pdrv [%d]\n", sector, count, pdrv);
205 DWORD ssize = disk_get_sector_size(pdrv);
206 mbed::bd_addr_t addr = (mbed::bd_addr_t)sector * ssize;
207 mbed::bd_size_t size = (mbed::bd_size_t)count * ssize;
208 int err = _ffs[pdrv]->read(buff, addr, size);
209 return err ? RES_PARERR : RES_OK;
210}
211
212extern "C" DRESULT disk_write(BYTE pdrv, const BYTE *buff, LBA_t sector, UINT count)
213{

Callers 10

memoryVerifyMethod · 0.85
memoryReadMethod · 0.85
disk_readMethod · 0.85
move_windowFunction · 0.85
f_openFunction · 0.85
f_readFunction · 0.85
f_writeFunction · 0.85
f_lseekFunction · 0.85
f_forwardFunction · 0.85
f_mkfsFunction · 0.85

Calls 3

debug_ifFunction · 0.85
disk_get_sector_sizeFunction · 0.85
readMethod · 0.45

Tested by 1

disk_readMethod · 0.68