diskio.h

00001 /*-----------------------------------------------------------------------
00002 /  Low level disk interface modlue include file  R0.04a   (C)ChaN, 2007
00003 /-----------------------------------------------------------------------*/
00004 
00005 #ifndef _DISKIO
00006 
00007 #define _READONLY       0       /* 1: Read-only mode */
00008 
00009 #include "integer.h"
00010 
00011 
00012 /* Status of Disk Functions */
00013 typedef BYTE    DSTATUS;
00014 
00015 /* Results of Disk Functions */
00016 typedef enum {
00017         RES_OK = 0,             /* 0: Successful */
00018         RES_ERROR,              /* 1: R/W Error */
00019         RES_WRPRT,              /* 2: Write Protected */
00020         RES_NOTRDY,             /* 3: Not Ready */
00021         RES_PARERR              /* 4: Invalid Parameter */
00022 } DRESULT;
00023 
00024 
00025 /*---------------------------------------*/
00026 /* Prototypes for disk control functions */
00027 
00028 DSTATUS disk_initialize (BYTE);
00029 DSTATUS disk_status (BYTE);
00030 DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE);
00031 #if     _READONLY == 0
00032 DRESULT disk_write (BYTE, const BYTE*, DWORD, BYTE);
00033 #endif
00034 DRESULT disk_ioctl (BYTE, BYTE, void*);
00035 void    disk_timerproc (void);
00036 
00037 
00038 
00039 
00040 /* Disk Status Bits (DSTATUS) */
00041 
00042 #define STA_NOINIT              0x01    /* Drive not initialized */
00043 #define STA_NODISK              0x02    /* No medium in the drive */
00044 #define STA_PROTECT             0x04    /* Write protected */
00045 
00046 
00047 /* Command code for disk_ioctrl() */
00048 
00049 #define GET_SECTOR_COUNT        1
00050 #define GET_SECTOR_SIZE         2
00051 #define CTRL_SYNC                       3
00052 #define CTRL_POWER                      4
00053 #define CTRL_LOCK                       5
00054 #define CTRL_EJECT                      6
00055 #define MMC_GET_CSD                     10
00056 #define MMC_GET_CID                     11
00057 #define MMC_GET_OCR                     12
00058 #define ATA_GET_REV                     20
00059 #define ATA_GET_MODEL           21
00060 #define ATA_GET_SN                      22
00061 
00062 
00063 #define _DISKIO
00064 #endif

Generated on Sun Dec 9 17:17:10 2007 for Sample MSP430-4619LCD Project by  doxygen 1.5.1