1 /*-----------------------------------------------------------------------*/
2 /* Low level disk I/O module skeleton for Petit FatFs (C)ChaN, 2009 */
3 /*-----------------------------------------------------------------------*/
8 #include "../DataflashManager.h"
10 /*-----------------------------------------------------------------------*/
11 /* Initialize Disk Drive */
12 /*-----------------------------------------------------------------------*/
14 DSTATUS
disk_initialize (void)
25 /*-----------------------------------------------------------------------*/
26 /* Read Partial Sector */
27 /*-----------------------------------------------------------------------*/
30 void* dest
, /* Pointer to the destination object */
31 DWORD sector
, /* Sector number (LBA) */
32 WORD sofs
, /* Offset in the sector */
33 WORD count
/* Byte count (bit15:destination) */
38 uint8_t BlockTemp
[512];
39 DataflashManager_ReadBlocks_RAM(sector
, 1, BlockTemp
);
40 memcpy(dest
, &BlockTemp
[sofs
], count
);