12 #ifndef _DISKIO_DEFINED
13 #define _DISKIO_DEFINED
41 #define STA_NOINIT 0x01
42 #define STA_NODISK 0x02
43 #define STA_PROTECT 0x04
50 #define GET_SECTOR_COUNT 1
51 #define GET_SECTOR_SIZE 2
52 #define GET_BLOCK_SIZE 3
53 #define CTRL_ERASE_SECTOR 4
61 #define MMC_GET_TYPE 10
63 #define MMC_GET_CSD 11
64 #define MMC_GET_CID 12
65 #define MMC_GET_OCR 13
66 #define MMC_GET_SDSTAT 14
68 #define ATA_GET_REV 20
70 #define ATA_GET_MODEL 21
3: Not Ready
Definition: diskio.h:36
DRESULT disk_write(BYTE pdrv, const BYTE *buff, DWORD sector, UINT count)
Write the value of buff on the sector.
Definition: diskio.c:229
1: R/W Error
Definition: diskio.h:34
4: Invalid Parameter
Definition: diskio.h:37
DSTATUS disk_status(BYTE pdrv)
Get Disk Status.
Definition: diskio.c:97
BYTE DSTATUS
Status of Disk Functions.
Definition: diskio.h:26
DRESULT
Results of Disk Functions.
Definition: diskio.h:31
DRESULT disk_read(BYTE pdrv, BYTE *buff, DWORD sector, UINT count)
Read a sector from the device and write to buff.
Definition: diskio.c:158
0: Successful
Definition: diskio.h:33
DSTATUS disk_initialize(BYTE pdrv)
Initialise the disk.
Definition: diskio.c:39
DRESULT disk_ioctl(BYTE pdrv, BYTE cmd, void *buff)
Miscellaneous Functions, function to get information from the device.
Definition: diskio.c:317
DWORD get_fattime(void)
The time to write the metadata of the files.
Definition: diskio.c:388
2: Write Protected
Definition: diskio.h:35