Lightweight SD card FAT file system. Originaled by chan http://elm-chan.org/fsw/ff/00index_p.html

Petit FAT File System for LPC1114

originaled by elm

If you want to use except LPC1114, you can change pin definitions at mmcPinConfig.h

more detail and original code at http://elm-chan.org/fsw/ff/00index_p.html

This library is NOT compatible with mbed official SDFileSystem

Committer:
hsgw
Date:
Fri May 09 19:41:49 2014 +0000
Revision:
0:845390b117a7
1st commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hsgw 0:845390b117a7 1 /*-----------------------------------------------------------------------
hsgw 0:845390b117a7 2 / PFF - Low level disk interface modlue include file (C)ChaN, 2009
hsgw 0:845390b117a7 3 /-----------------------------------------------------------------------*/
hsgw 0:845390b117a7 4
hsgw 0:845390b117a7 5 #ifndef _DISKIO
hsgw 0:845390b117a7 6
hsgw 0:845390b117a7 7 #include "integer.h"
hsgw 0:845390b117a7 8
hsgw 0:845390b117a7 9
hsgw 0:845390b117a7 10 /* Status of Disk Functions */
hsgw 0:845390b117a7 11 typedef BYTE DSTATUS;
hsgw 0:845390b117a7 12
hsgw 0:845390b117a7 13
hsgw 0:845390b117a7 14 /* Results of Disk Functions */
hsgw 0:845390b117a7 15 typedef enum {
hsgw 0:845390b117a7 16 RES_OK = 0, /* 0: Function succeeded */
hsgw 0:845390b117a7 17 RES_ERROR, /* 1: Disk error */
hsgw 0:845390b117a7 18 RES_NOTRDY, /* 2: Not ready */
hsgw 0:845390b117a7 19 RES_PARERR /* 3: Invalid parameter */
hsgw 0:845390b117a7 20 } DRESULT;
hsgw 0:845390b117a7 21
hsgw 0:845390b117a7 22
hsgw 0:845390b117a7 23 /*---------------------------------------*/
hsgw 0:845390b117a7 24 /* Prototypes for disk control functions */
hsgw 0:845390b117a7 25
hsgw 0:845390b117a7 26 DSTATUS disk_initialize (void);
hsgw 0:845390b117a7 27 DRESULT disk_readp (BYTE*, DWORD, WORD, WORD);
hsgw 0:845390b117a7 28 DRESULT disk_writep (const BYTE*, DWORD);
hsgw 0:845390b117a7 29
hsgw 0:845390b117a7 30 #define STA_NOINIT 0x01 /* Drive not initialized */
hsgw 0:845390b117a7 31 #define STA_NODISK 0x02 /* No medium in the drive */
hsgw 0:845390b117a7 32
hsgw 0:845390b117a7 33 /* Card type flags (CardType) */
hsgw 0:845390b117a7 34 #define CT_MMC 0x01 /* MMC ver 3 */
hsgw 0:845390b117a7 35 #define CT_SD1 0x02 /* SD ver 1 */
hsgw 0:845390b117a7 36 #define CT_SD2 0x04 /* SD ver 2 */
hsgw 0:845390b117a7 37 #define CT_SDC (CT_SD1|CT_SD2) /* SD */
hsgw 0:845390b117a7 38 #define CT_BLOCK 0x08 /* Block addressing */
hsgw 0:845390b117a7 39
hsgw 0:845390b117a7 40 #define _DISKIO
hsgw 0:845390b117a7 41 #endif