Front SD ELF loader added
[svpe-wii.git] / sdelfloader / loader / source / diskio.h
blob73c8c4460b5754d2d60de29db2b33ac5107d61d1
1 /*-----------------------------------------------------------------------
2 / Low level disk interface modlue include file R0.04a (C)ChaN, 2007
3 /-----------------------------------------------------------------------*/
5 #ifndef _DISKIO
7 #define _READONLY 0 /* 1: Read-only mode */
9 #include "integer.h"
12 /* Status of Disk Functions */
13 typedef BYTE DSTATUS;
15 /* Results of Disk Functions */
16 typedef enum {
17 RES_OK = 0, /* 0: Successful */
18 RES_ERROR, /* 1: R/W Error */
19 RES_WRPRT, /* 2: Write Protected */
20 RES_NOTRDY, /* 3: Not Ready */
21 RES_PARERR /* 4: Invalid Parameter */
22 } DRESULT;
25 /*---------------------------------------*/
26 /* Prototypes for disk control functions */
28 DSTATUS disk_initialize (BYTE);
29 DSTATUS disk_status (BYTE);
30 DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE);
31 DRESULT disk_ioctl (BYTE, BYTE, void*);
32 void disk_timerproc (void);
37 /* Disk Status Bits (DSTATUS) */
39 #define STA_NOINIT 0x01 /* Drive not initialized */
40 #define STA_NODISK 0x02 /* No medium in the drive */
41 #define STA_PROTECT 0x04 /* Write protected */
44 /* Command code for disk_ioctrl() */
46 #define GET_SECTOR_COUNT 1
47 #define GET_SECTOR_SIZE 2
48 #define CTRL_SYNC 3
49 #define CTRL_POWER 4
50 #define CTRL_LOCK 5
51 #define CTRL_EJECT 6
52 #define MMC_GET_CSD 10
53 #define MMC_GET_CID 11
54 #define MMC_GET_OCR 12
55 #define ATA_GET_REV 20
56 #define ATA_GET_MODEL 21
57 #define ATA_GET_SN 22
59 #define _DISKIO
60 #endif