changing circuitry to disable RTC, update initialization to match
[fw/openalt] / fatfs / diskio.h
1 /*-----------------------------------------------------------------------
2 /  Low level disk interface modlue include file  R0.04a   (C)ChaN, 2007
3 /-----------------------------------------------------------------------*/
4
5 #ifndef _DISKIO_H_
6 #define _DISKIO_H_
7
8 //
9 //  Status of Disk Functions 
10 //
11 typedef U8 DSTATUS;
12
13 //
14 //  Results of Disk Functions 
15 //
16 typedef enum 
17 {
18         RES_OK = 0,             /* 0: Successful */
19         RES_ERROR,              /* 1: R/W Error */
20         RES_WRPRT,              /* 2: Write Protected */
21         RES_NOTRDY,             /* 3: Not Ready */
22         RES_PARERR              /* 4: Invalid Parameter */
23
24 DRESULT;
25
26 //
27 //  Disk Status Bits (DSTATUS)
28 //
29 #define STA_NOINIT              0x01    /* Drive not initialized */
30 #define STA_NODISK              0x02    /* No medium in the drive */
31 #define STA_PROTECT             0x04    /* Write protected */
32
33 //
34 //  Command code for disk_ioctl() 
35 //
36 #define GET_SECTOR_COUNT        1
37 #define GET_SECTOR_SIZE         2
38 #define CTRL_SYNC                           3
39 #define CTRL_POWER                        4
40 #define CTRL_LOCK                           5
41 #define CTRL_EJECT                        6
42 #define MMC_GET_CSD                      10
43 #define MMC_GET_CID                      11
44 #define MMC_GET_OCR                      12
45 #define ATA_GET_REV                      20
46 #define ATA_GET_MODEL            21
47 #define ATA_GET_SN                       22
48
49 //
50 //
51 //
52 DSTATUS diskInitialize (U8);
53 DSTATUS diskShutdown (void);
54 DSTATUS diskStatus (U8);
55 DRESULT diskRead (U8, U8 *, U32, U8);
56 #if _FS_READONLY == 0
57 DRESULT diskWrite (U8, const U8 *, U32, U8);
58 #endif
59 DRESULT diskIoctl (U8, U8, void *);
60
61 #endif