diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-08-15 02:22:02 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-08-15 02:22:02 +1000 |
commit | 75e1e7a5e26491e942fb2b25f518d8e2e3112721 (patch) | |
tree | 970754edda05d38bce1f85492868eca717820b99 /3rdparty/petitfs-0.03/src/diskio.c | |
parent | 9b570be049bf656489bdce823f6f04beb80f053d (diff) | |
download | uGFX-75e1e7a5e26491e942fb2b25f518d8e2e3112721.tar.gz uGFX-75e1e7a5e26491e942fb2b25f518d8e2e3112721.tar.bz2 uGFX-75e1e7a5e26491e942fb2b25f518d8e2e3112721.zip |
Add GFILE support for PetitFS (a very tiny FAT implementation)
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; +} + |