This is Petit FAT File System Module for mbed NXP LPC1768. The ported library from http://elm-chan.org/fsw/ff/00index_p.html made by Mr. ChaN. The connection is same as SDCard library here http://mbed.org/projects/cookbook/wiki/SDCard . If you need change a pin, You can find the definition at libpff/connect.h :)
Diff: libpff/diskio.h
- Revision:
- 0:b5453be5ad07
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libpff/diskio.h Tue Jun 01 12:23:29 2010 +0000 @@ -0,0 +1,38 @@ +/*----------------------------------------------------------------------- +/ PFF - Low level disk interface modlue include file (C)ChaN, 2009 +/-----------------------------------------------------------------------*/ + +#ifndef _DISKIO + +#include "integer.h" + +/* Status of Disk Functions */ +typedef BYTE DSTATUS; + +/* Results of Disk Functions */ +typedef enum { + RES_OK = 0, /* 0: Function succeeded */ + RES_ERROR, /* 1: Disk error */ + RES_NOTRDY, /* 2: Not ready */ + RES_PARERR /* 3: Invalid parameter */ +} DRESULT; + +/*---------------------------------------*/ +/* Prototypes for disk control functions */ + +DSTATUS disk_initialize (void); +DRESULT disk_readp (BYTE*, DWORD, WORD, WORD); +DRESULT disk_writep (const BYTE*, DWORD); + +#define STA_NOINIT 0x01 /* Drive not initialized */ +#define STA_NODISK 0x02 /* No medium in the drive */ + +/* Card type flags (CardType) */ +#define CT_MMC 0x01 /* MMC ver 3 */ +#define CT_SD1 0x02 /* SD ver 1 */ +#define CT_SD2 0x04 /* SD ver 2 */ +#define CT_SDC (CT_SD1|CT_SD2) /* SD */ +#define CT_BLOCK 0x08 /* Block addressing */ + +#define _DISKIO +#endif