Fix TemperatureDataLogger - sample tick timer wasn't being initialized in the correct...
[pub/USBasp.git] / Projects / TemperatureDataLogger / Lib / FATFs / diskio.h
1 /*-----------------------------------------------------------------------
2 / Low level disk interface modlue include file R0.07 (C)ChaN, 2009
3 /-----------------------------------------------------------------------*/
4
5 #ifndef _DISKIO
6
7 #define _READONLY 0 /* 1: Read-only mode */
8 #define _USE_IOCTL 1
9
10 #include "integer.h"
11
12 #include "../DataflashManager.h"
13
14
15 /* Status of Disk Functions */
16 typedef BYTE DSTATUS;
17
18 /* Results of Disk Functions */
19 typedef enum {
20 RES_OK = 0, /* 0: Successful */
21 RES_ERROR, /* 1: R/W Error */
22 RES_WRPRT, /* 2: Write Protected */
23 RES_NOTRDY, /* 3: Not Ready */
24 RES_PARERR /* 4: Invalid Parameter */
25 } DRESULT;
26
27
28 /*---------------------------------------*/
29 /* Prototypes for disk control functions */
30
31 BOOL assign_drives (int argc, char *argv[]);
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 /* Command code for disk_ioctrl() */
49
50 /* Generic command */
51 #define CTRL_SYNC 0 /* Mandatory for write functions */
52 #define GET_SECTOR_COUNT 1 /* Mandatory for only f_mkfs() */
53 #define GET_SECTOR_SIZE 2 /* Mandatory for multiple sector size cfg */
54 #define GET_BLOCK_SIZE 3 /* Mandatory for only f_mkfs() */
55 #define CTRL_POWER 4
56 #define CTRL_LOCK 5
57 #define CTRL_EJECT 6
58 /* MMC/SDC command */
59 #define MMC_GET_TYPE 10
60 #define MMC_GET_CSD 11
61 #define MMC_GET_CID 12
62 #define MMC_GET_OCR 13
63 #define MMC_GET_SDSTAT 14
64 /* ATA/CF command */
65 #define ATA_GET_REV 20
66 #define ATA_GET_MODEL 21
67 #define ATA_GET_SN 22
68
69
70 #define _DISKIO
71 #endif