-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiskio.h
More file actions
42 lines (31 loc) · 1021 Bytes
/
diskio.h
File metadata and controls
42 lines (31 loc) · 1021 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*-----------------------------------------------------------------------
/ PFF - Low level disk interface modlue include file (C)ChaN, 2010
/-----------------------------------------------------------------------*/
#ifndef _DISKIO
#define _DISKIO
#include "integer.h"
#include "pff.h"
#ifdef DEBUG
unsigned short testSDCard(void);
#endif
/* Status of Disk Functions */
typedef BYTE DSTATUS;
#define STA_NOINIT 0x01 /* Drive not initialized */
#define STA_NODISK 0x02 /* No medium in the drive */
/* Results of Disk Functions */
typedef enum {
RES_OK = 0, /* 0: Function succeeded */
RES_ERROR, /* 1: Disk error */
RES_NOTRDY, /* 2: Not ready */
RES_PARERR /* 3: Invalid parameter */
} DRESULT;
/*---------------------------------------*/
/* Prototypes for disk control functions */
DSTATUS disk_initialize (void);
#if _USE_READ
DRESULT disk_readp (BYTE*, DWORD, WORD, WORD);
#endif
#if _USE_WRITE
DRESULT disk_writep (const BYTE*, DWORD);
#endif
#endif