Radio Datalogger Project  Version 2.0
Macros | Typedefs | Enumerations | Functions
diskio.h File Reference
#include "integer.h"
#include "../DataflashManager.h"

Macros

#define _READONLY   0 /* 1: Read-only mode */
 
#define _USE_IOCTL   1
 
#define STA_NOINIT   0x01 /* Drive not initialized */
 
#define STA_NODISK   0x02 /* No medium in the drive */
 
#define STA_PROTECT   0x04 /* Write protected */
 
#define CTRL_SYNC   0 /* Mandatory for write functions */
 
#define GET_SECTOR_COUNT   1 /* Mandatory for only f_mkfs() */
 
#define GET_SECTOR_SIZE   2 /* Mandatory for multiple sector size cfg */
 
#define GET_BLOCK_SIZE   3 /* Mandatory for only f_mkfs() */
 
#define CTRL_POWER   4
 
#define CTRL_LOCK   5
 
#define CTRL_EJECT   6
 
#define MMC_GET_TYPE   10
 
#define MMC_GET_CSD   11
 
#define MMC_GET_CID   12
 
#define MMC_GET_OCR   13
 
#define MMC_GET_SDSTAT   14
 
#define ATA_GET_REV   20
 
#define ATA_GET_MODEL   21
 
#define ATA_GET_SN   22
 
#define _DISKIO
 

Typedefs

typedef BYTE DSTATUS
 

Enumerations

enum  DRESULT {
  RES_OK = 0,
  RES_ERROR,
  RES_WRPRT,
  RES_NOTRDY,
  RES_PARERR
}
 

Functions

BOOL assign_drives (int argc, char *argv[])
 
DSTATUS disk_initialize (BYTE)
 
DSTATUS disk_status (BYTE)
 
DRESULT disk_read (BYTE, BYTE *, DWORD, BYTE)
 
DRESULT disk_write (BYTE, const BYTE *, DWORD, BYTE)
 
DRESULT disk_ioctl (BYTE, BYTE, void *)
 

Macro Definition Documentation

#define _DISKIO
#define _READONLY   0 /* 1: Read-only mode */
#define _USE_IOCTL   1
#define ATA_GET_MODEL   21
#define ATA_GET_REV   20
#define ATA_GET_SN   22
#define CTRL_EJECT   6
#define CTRL_LOCK   5
#define CTRL_POWER   4
#define CTRL_SYNC   0 /* Mandatory for write functions */
#define GET_BLOCK_SIZE   3 /* Mandatory for only f_mkfs() */
#define GET_SECTOR_COUNT   1 /* Mandatory for only f_mkfs() */
#define GET_SECTOR_SIZE   2 /* Mandatory for multiple sector size cfg */
#define MMC_GET_CID   12
#define MMC_GET_CSD   11
#define MMC_GET_OCR   13
#define MMC_GET_SDSTAT   14
#define MMC_GET_TYPE   10
#define STA_NODISK   0x02 /* No medium in the drive */
#define STA_NOINIT   0x01 /* Drive not initialized */
#define STA_PROTECT   0x04 /* Write protected */

Typedef Documentation

typedef BYTE DSTATUS

Enumeration Type Documentation

enum DRESULT
Enumerator
RES_OK 
RES_ERROR 
RES_WRPRT 
RES_NOTRDY 
RES_PARERR 

Function Documentation

BOOL assign_drives ( int  argc,
char *  argv[] 
)
DSTATUS disk_initialize ( BYTE  )
DRESULT disk_ioctl ( BYTE  ,
BYTE  ,
void *   
)
DRESULT disk_read ( BYTE  ,
BYTE ,
DWORD  ,
BYTE   
)
DSTATUS disk_status ( BYTE  )
DRESULT disk_write ( BYTE  ,
const BYTE ,
DWORD  ,
BYTE   
)