Changeset 154 for uKadecot/trunk/pfatfs/diskio.h
- Timestamp:
- Feb 2, 2016, 9:54:35 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uKadecot/trunk/pfatfs/diskio.h
r108 r154 19 19 /* Results of Disk Functions */ 20 20 typedef enum { 21 RES_OK = 0, /* 0: Function succeeded */ 22 RES_ERROR, /* 1: Disk error */ 23 RES_NOTRDY, /* 2: Not ready */ 24 RES_PARERR /* 3: Invalid parameter */ 21 RES_OK = 0, /* 0: Successful */ 22 RES_ERROR, /* 1: R/W Error */ 23 RES_WRPRT, /* 2: Write Protected */ 24 RES_NOTRDY, /* 3: Not Ready */ 25 RES_PARERR /* 4: Invalid Parameter */ 25 26 } DRESULT; 26 27 … … 29 30 /* Prototypes for disk control functions */ 30 31 31 DSTATUS disk_initialize (void);32 DSTATUS disk_get_status (void);33 DRESULT disk_readp (BYTE* buff, DWORD sector, UINT offset, UINT count);34 DRESULT disk_writep (const BYTE* buff, DWORD sc);32 DSTATUS ramdisk_initialize (void); 33 DSTATUS ramdisk_get_status (void); 34 DRESULT ramdisk_readp (BYTE* buff, DWORD sector, UINT offset, UINT count); 35 DRESULT ramdisk_writep (const BYTE* buff, DWORD sc); 35 36 36 37 #define STA_NOINIT 0x01 /* Drive not initialized */ 37 38 #define STA_NODISK 0x02 /* No medium in the drive */ 39 #define STA_PROTECT 0x04 /* Write protected */ 38 40 41 /* Generic command (Used by FatFs) */ 42 #define CTRL_SYNC 0 /* Complete pending write process (needed at _FS_READONLY == 0) */ 43 #define GET_SECTOR_COUNT 1 /* Get media size (needed at _USE_MKFS == 1) */ 44 #define GET_SECTOR_SIZE 2 /* Get sector size (needed at _MAX_SS != _MIN_SS) */ 45 #define GET_BLOCK_SIZE 3 /* Get erase block size (needed at _USE_MKFS == 1) */ 46 #define CTRL_TRIM 4 /* Inform device that the data on the block of sectors is no longer used (needed at _USE_TRIM == 1) */ 47 48 /* MMC/SDC specific command (Not used by FatFs) */ 49 #define MMC_GET_TYPE 50 /* Get card type */ 50 #define MMC_GET_CSD 51 /* Get CSD */ 51 #define MMC_GET_CID 52 /* Get CID */ 52 #define MMC_GET_OCR 53 /* Get OCR */ 53 #define MMC_GET_SDSTAT 54 /* Get SD status */ 54 55 /* MMC card type flags (MMC_GET_TYPE) */ 56 #define CT_MMC 0x01 /* MMC ver 3 */ 57 #define CT_SD1 0x02 /* SD ver 1 */ 58 #define CT_SD2 0x04 /* SD ver 2 */ 59 #define CT_SDC (CT_SD1|CT_SD2) /* SD */ 60 #define CT_BLOCK 0x08 /* Block addressing */ 39 61 40 62 #ifdef __cplusplus
Note:
See TracChangeset
for help on using the changeset viewer.