Igual que FATFileSystem

Fork of FatFileSystem by mbed unsupported

Committer:
escalona
Date:
Wed Apr 16 10:57:44 2014 +0000
Revision:
4:39c59f82f35e
Parent:
0:97df4125f18d
No hay cambios

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_unsupported 0:97df4125f18d 1 /*-----------------------------------------------------------------------
mbed_unsupported 0:97df4125f18d 2 / Low level disk interface modlue include file R0.06 (C)ChaN, 2007
mbed_unsupported 0:97df4125f18d 3 /-----------------------------------------------------------------------*/
mbed_unsupported 0:97df4125f18d 4
mbed_unsupported 0:97df4125f18d 5 #ifndef _DISKIO
mbed_unsupported 0:97df4125f18d 6
escalona 4:39c59f82f35e 7 #define _READONLY 0 /* 1: Read-only mode */
escalona 4:39c59f82f35e 8 #define _USE_IOCTL 1
mbed_unsupported 0:97df4125f18d 9
mbed_unsupported 0:97df4125f18d 10 #include "integer.h"
mbed_unsupported 0:97df4125f18d 11
mbed_unsupported 0:97df4125f18d 12 #ifdef __cplusplus
mbed_unsupported 0:97df4125f18d 13 extern "C" {
mbed_unsupported 0:97df4125f18d 14 #endif
mbed_unsupported 0:97df4125f18d 15
mbed_unsupported 0:97df4125f18d 16 /* Status of Disk Functions */
escalona 4:39c59f82f35e 17 typedef BYTE DSTATUS;
mbed_unsupported 0:97df4125f18d 18
mbed_unsupported 0:97df4125f18d 19 /* Results of Disk Functions */
mbed_unsupported 0:97df4125f18d 20 typedef enum {
escalona 4:39c59f82f35e 21 RES_OK = 0, /* 0: Successful */
escalona 4:39c59f82f35e 22 RES_ERROR, /* 1: R/W Error */
escalona 4:39c59f82f35e 23 RES_WRPRT, /* 2: Write Protected */
escalona 4:39c59f82f35e 24 RES_NOTRDY, /* 3: Not Ready */
escalona 4:39c59f82f35e 25 RES_PARERR /* 4: Invalid Parameter */
mbed_unsupported 0:97df4125f18d 26 } DRESULT;
mbed_unsupported 0:97df4125f18d 27
mbed_unsupported 0:97df4125f18d 28
mbed_unsupported 0:97df4125f18d 29 /*---------------------------------------*/
mbed_unsupported 0:97df4125f18d 30 /* Prototypes for disk control functions */
mbed_unsupported 0:97df4125f18d 31
mbed_unsupported 0:97df4125f18d 32 DSTATUS disk_initialize (BYTE);
mbed_unsupported 0:97df4125f18d 33 DSTATUS disk_status (BYTE);
mbed_unsupported 0:97df4125f18d 34 DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE);
escalona 4:39c59f82f35e 35 #if _READONLY == 0
mbed_unsupported 0:97df4125f18d 36 DRESULT disk_write (BYTE, const BYTE*, DWORD, BYTE);
mbed_unsupported 0:97df4125f18d 37 #endif
mbed_unsupported 0:97df4125f18d 38 DRESULT disk_ioctl (BYTE, BYTE, void*);
escalona 4:39c59f82f35e 39 void disk_timerproc (void);
mbed_unsupported 0:97df4125f18d 40
mbed_unsupported 0:97df4125f18d 41 #ifdef __cplusplus
mbed_unsupported 0:97df4125f18d 42 };
mbed_unsupported 0:97df4125f18d 43 #endif
mbed_unsupported 0:97df4125f18d 44
mbed_unsupported 0:97df4125f18d 45
mbed_unsupported 0:97df4125f18d 46 /* Disk Status Bits (DSTATUS) */
mbed_unsupported 0:97df4125f18d 47
escalona 4:39c59f82f35e 48 #define STA_NOINIT 0x01 /* Drive not initialized */
escalona 4:39c59f82f35e 49 #define STA_NODISK 0x02 /* No medium in the drive */
escalona 4:39c59f82f35e 50 #define STA_PROTECT 0x04 /* Write protected */
mbed_unsupported 0:97df4125f18d 51
mbed_unsupported 0:97df4125f18d 52
mbed_unsupported 0:97df4125f18d 53 /* Command code for disk_ioctrl() */
mbed_unsupported 0:97df4125f18d 54
mbed_unsupported 0:97df4125f18d 55 /* Generic command */
escalona 4:39c59f82f35e 56 #define CTRL_SYNC 0 /* Mandatory for read/write configuration */
escalona 4:39c59f82f35e 57 #define GET_SECTOR_COUNT 1 /* Mandatory for only f_mkfs() */
escalona 4:39c59f82f35e 58 #define GET_SECTOR_SIZE 2
escalona 4:39c59f82f35e 59 #define GET_BLOCK_SIZE 3 /* Mandatory for only f_mkfs() */
escalona 4:39c59f82f35e 60 #define CTRL_POWER 4
escalona 4:39c59f82f35e 61 #define CTRL_LOCK 5
escalona 4:39c59f82f35e 62 #define CTRL_EJECT 6
mbed_unsupported 0:97df4125f18d 63 /* MMC/SDC command */
escalona 4:39c59f82f35e 64 #define MMC_GET_TYPE 10
escalona 4:39c59f82f35e 65 #define MMC_GET_CSD 11
escalona 4:39c59f82f35e 66 #define MMC_GET_CID 12
escalona 4:39c59f82f35e 67 #define MMC_GET_OCR 13
escalona 4:39c59f82f35e 68 #define MMC_GET_SDSTAT 14
mbed_unsupported 0:97df4125f18d 69 /* ATA/CF command */
escalona 4:39c59f82f35e 70 #define ATA_GET_REV 20
escalona 4:39c59f82f35e 71 #define ATA_GET_MODEL 21
escalona 4:39c59f82f35e 72 #define ATA_GET_SN 22
mbed_unsupported 0:97df4125f18d 73
mbed_unsupported 0:97df4125f18d 74
mbed_unsupported 0:97df4125f18d 75 #define _DISKIO
mbed_unsupported 0:97df4125f18d 76 #endif