1 #ifndef _DISKIO_DEFINED
2 #define _DISKIO_DEFINED
56 #define STA_NOINIT 0x01
57 #define STA_NODISK 0x02
58 #define STA_PROTECT 0x04
64 #define GET_SECTOR_COUNT 1
65 #define GET_SECTOR_SIZE 2
67 #define GET_BLOCK_SIZE 3
69 #define CTRL_ERASE_SECTOR 4
79 #define MMC_GET_TYPE 10
80 #define MMC_GET_CSD 11
81 #define MMC_GET_CID 12
82 #define MMC_GET_OCR 13
83 #define MMC_GET_SDSTAT 14
86 #define ATA_GET_REV 20
87 #define ATA_GET_MODEL 21
95 #define CT_SDC (CT_SD1|CT_SD2)
122 DRESULT disk_write(BYTE drv,
const BYTE *buff, DWORD sector, BYTE count);
125 DRESULT disk_ioctl (BYTE drv, BYTE cmd,
void* buff);
DRESULT disk_read(BYTE drv, BYTE *buff, DWORD sector, UINT count)
Read from the SD Card.
DRESULT
Results of Disk Functions.
BYTE DSTATUS
Status of Disk Functions.
DSTATUS disk_status(BYTE drv)
Return disk status.
DSTATUS disk_initialize(BYTE drv)
Initialize the SD Card Returns the disk status.