Go to the documentation of this file.00001
00002
00003
00004
00005 #ifndef _DISKIO
00006
00007 #define _READONLY 0
00008 #define _USE_IOCTL 1
00009
00010 #include "integer.h"
00011
00012 #define CT_MMC 0x01
00013 #define CT_SD1 0x02
00014 #define CT_SD2 0x04
00015 #define CT_SDC (CT_SD1|CT_SD2)
00016 #define CT_BLOCK 0x08
00017
00018
00019
00020
00021 typedef BYTE DSTATUS;
00022
00023
00024 typedef enum {
00025 RES_OK = 0,
00026 RES_ERROR,
00027 RES_WRPRT,
00028 RES_NOTRDY,
00029 RES_PARERR
00030 } DRESULT;
00031
00032
00033
00034
00035
00036 BOOL assign_drives (int argc, char *argv[]);
00037 DSTATUS disk_initialize (BYTE);
00038 DSTATUS disk_status (BYTE);
00039 DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE);
00040 #if _READONLY == 0
00041 DRESULT disk_write (BYTE, const BYTE*, DWORD, BYTE);
00042 #endif
00043 DRESULT disk_ioctl (BYTE, BYTE, void*);
00044
00045
00046
00047
00048
00049 #define STA_NOINIT 0x01
00050 #define STA_NODISK 0x02
00051 #define STA_PROTECT 0x04
00052
00053
00054
00055
00056
00057 #define CTRL_SYNC 0
00058 #define GET_SECTOR_COUNT 1
00059 #define GET_SECTOR_SIZE 2
00060 #define GET_BLOCK_SIZE 3
00061 #define CTRL_POWER 4
00062 #define CTRL_LOCK 5
00063 #define CTRL_EJECT 6
00064
00065 #define MMC_GET_TYPE 10
00066 #define MMC_GET_CSD 11
00067 #define MMC_GET_CID 12
00068 #define MMC_GET_OCR 13
00069 #define MMC_GET_SDSTAT 14
00070
00071 #define ATA_GET_REV 20
00072 #define ATA_GET_MODEL 21
00073 #define ATA_GET_SN 22
00074
00075
00076 #define _DISKIO
00077 #endif