Lightweight SD card FAT file system. Originaled by chan http://elm-chan.org/fsw/ff/00index_p.html
Embed:
(wiki syntax)
Show/hide line numbers
diskio.h
00001 /*----------------------------------------------------------------------- 00002 / PFF - Low level disk interface modlue include file (C)ChaN, 2009 00003 /-----------------------------------------------------------------------*/ 00004 00005 #ifndef _DISKIO 00006 00007 #include "integer.h" 00008 00009 00010 /* Status of Disk Functions */ 00011 typedef BYTE DSTATUS; 00012 00013 00014 /* Results of Disk Functions */ 00015 typedef enum { 00016 RES_OK = 0, /* 0: Function succeeded */ 00017 RES_ERROR, /* 1: Disk error */ 00018 RES_NOTRDY, /* 2: Not ready */ 00019 RES_PARERR /* 3: Invalid parameter */ 00020 } DRESULT; 00021 00022 00023 /*---------------------------------------*/ 00024 /* Prototypes for disk control functions */ 00025 00026 DSTATUS disk_initialize (void); 00027 DRESULT disk_readp (BYTE*, DWORD, WORD, WORD); 00028 DRESULT disk_writep (const BYTE*, DWORD); 00029 00030 #define STA_NOINIT 0x01 /* Drive not initialized */ 00031 #define STA_NODISK 0x02 /* No medium in the drive */ 00032 00033 /* Card type flags (CardType) */ 00034 #define CT_MMC 0x01 /* MMC ver 3 */ 00035 #define CT_SD1 0x02 /* SD ver 1 */ 00036 #define CT_SD2 0x04 /* SD ver 2 */ 00037 #define CT_SDC (CT_SD1|CT_SD2) /* SD */ 00038 #define CT_BLOCK 0x08 /* Block addressing */ 00039 00040 #define _DISKIO 00041 #endif
Generated on Wed Jul 13 2022 23:03:59 by 1.7.2