Update projects using FatFS and PetiteFatFS to the latest library versions.
[pub/USBasp.git] / Projects / Webserver / Lib / FATFs / diskio.h
1 /*-----------------------------------------------------------------------
2 / Low level disk interface module include file
3 /-----------------------------------------------------------------------*/
4
5 #ifndef _DISKIO
6
7 #define _READONLY 0 /* 1: Read-only mode */
8 #define _USE_IOCTL 0
9
10 #include "integer.h"
11 #include "ff.h"
12
13 #include "../DataflashManager.h"
14
15
16 /* Status of Disk Functions */
17 typedef BYTE DSTATUS;
18
19 /* Results of Disk Functions */
20 typedef enum {
21 RES_OK = 0, /* 0: Successful */
22 RES_ERROR, /* 1: R/W Error */
23 RES_WRPRT, /* 2: Write Protected */
24 RES_NOTRDY, /* 3: Not Ready */
25 RES_PARERR /* 4: Invalid Parameter */
26 } DRESULT;
27
28
29 /*---------------------------------------*/
30 /* Prototypes for disk control functions */
31
32 DSTATUS disk_initialize (BYTE);
33 DSTATUS disk_status (BYTE);
34 DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE);
35 #if _READONLY == 0
36 DRESULT disk_write (BYTE, const BYTE*, DWORD, BYTE);
37 #endif
38 DRESULT disk_ioctl (BYTE, BYTE, void*);
39
40
41 /* Disk Status Bits (DSTATUS) */
42
43 #define STA_NOINIT 0x01 /* Drive not initialized */
44 #define STA_NODISK 0x02 /* No medium in the drive */
45 #define STA_PROTECT 0x04 /* Write protected */
46
47
48 #define _DISKIO
49 #endif
50