+++ /dev/null
-/*-----------------------------------------------------------------------*/\r
-/* Low level disk I/O module skeleton for Petit FatFs (C)ChaN, 2009 */\r
-/*-----------------------------------------------------------------------*/\r
-\r
-#include "diskio.h"\r
-\r
-#include <string.h>\r
-#include "../DataflashManager.h"\r
-\r
-/*-----------------------------------------------------------------------*/\r
-/* Initialize Disk Drive */\r
-/*-----------------------------------------------------------------------*/\r
-\r
-DSTATUS disk_initialize (void)\r
-{\r
- DSTATUS stat;\r
-\r
- stat = RES_OK;\r
-\r
- return stat;\r
-}\r
-\r
-\r
-\r
-/*-----------------------------------------------------------------------*/\r
-/* Read Partial Sector */\r
-/*-----------------------------------------------------------------------*/\r
-\r
-DRESULT disk_readp (\r
- void* dest, /* Pointer to the destination object */\r
- DWORD sector, /* Sector number (LBA) */\r
- WORD sofs, /* Offset in the sector */\r
- WORD count /* Byte count (bit15:destination) */\r
-)\r
-{\r
- DRESULT res;\r
-\r
- uint8_t BlockTemp[512];\r
- DataflashManager_ReadBlocks_RAM(sector, 1, BlockTemp);\r
- memcpy(dest, &BlockTemp[sofs], count);\r
-\r
- res = RES_OK;\r
-\r
- return res;\r
-}\r
-\r