diff options
Diffstat (limited to '3rdparty/petitfs-0.03/src/diskio.c')
-rw-r--r-- | 3rdparty/petitfs-0.03/src/diskio.c | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/3rdparty/petitfs-0.03/src/diskio.c b/3rdparty/petitfs-0.03/src/diskio.c new file mode 100644 index 00000000..8328b44d --- /dev/null +++ b/3rdparty/petitfs-0.03/src/diskio.c @@ -0,0 +1,73 @@ +/*-----------------------------------------------------------------------*/ +/* Low level disk I/O module skeleton for Petit FatFs (C)ChaN, 2014 */ +/*-----------------------------------------------------------------------*/ + +#include "diskio.h" + + +/*-----------------------------------------------------------------------*/ +/* Initialize Disk Drive */ +/*-----------------------------------------------------------------------*/ + +DSTATUS disk_initialize (void) +{ + DSTATUS stat; + + // Put your code here + + return stat; +} + + + +/*-----------------------------------------------------------------------*/ +/* Read Partial Sector */ +/*-----------------------------------------------------------------------*/ + +DRESULT disk_readp ( + BYTE* buff, /* Pointer to the destination object */ + DWORD sector, /* Sector number (LBA) */ + UINT offset, /* Offset in the sector */ + UINT count /* Byte count (bit15:destination) */ +) +{ + DRESULT res; + + // Put your code here + + return res; +} + + + +/*-----------------------------------------------------------------------*/ +/* Write Partial Sector */ +/*-----------------------------------------------------------------------*/ + +DRESULT disk_writep ( + BYTE* buff, /* Pointer to the data to be written, NULL:Initiate/Finalize write operation */ + DWORD sc /* Sector number (LBA) or Number of bytes to send */ +) +{ + DRESULT res; + + + if (!buff) { + if (sc) { + + // Initiate write process + + } else { + + // Finalize write process + + } + } else { + + // Send data to the disk + + } + + return res; +} + |