Dependencies:   mbed

Committer:
simon
Date:
Thu Jan 12 12:59:33 2012 +0000
Revision:
1:208803a150b2
Parent:
0:560a6744936c
fix on line 61 of diskio, sector -> s

Who changed what in which revision?

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