1 /*----------------------------------------------------------------------- 
   2 /  Low level disk interface module include file 
   3 /-----------------------------------------------------------------------*/ 
   5 #ifndef _DISKIO_DEFINED 
   6 #define _DISKIO_DEFINED 
  14 #include "../DataflashManager.h" 
  17 /* Status of Disk Functions */ 
  20 /* Results of Disk Functions */ 
  22         RES_OK 
= 0,             /* 0: Successful */ 
  23         RES_ERROR
,              /* 1: R/W Error */ 
  24         RES_WRPRT
,              /* 2: Write Protected */ 
  25         RES_NOTRDY
,             /* 3: Not Ready */ 
  26         RES_PARERR              
/* 4: Invalid Parameter */ 
  30 /*---------------------------------------*/ 
  31 /* Prototypes for disk control functions */ 
  33 DSTATUS 
disk_initialize (BYTE
); 
  34 DSTATUS 
disk_status (BYTE
); 
  35 DRESULT 
disk_read (BYTE
, BYTE
*, DWORD
, BYTE
); 
  37 DRESULT 
disk_write (BYTE
, const BYTE
*, DWORD
, BYTE
); 
  39 DRESULT 
disk_ioctl (BYTE
, BYTE
, void*); 
  42 /* Disk Status Bits (DSTATUS) */ 
  44 #define STA_NOINIT              0x01    /* Drive not initialized */ 
  45 #define STA_NODISK              0x02    /* No medium in the drive */ 
  46 #define STA_PROTECT             0x04    /* Write protected */ 
  49 #define CTRL_SYNC                       0       /* Mandatory for write functions */