Go to the source code of this file.
◆ _USE_WRITE
#define _USE_WRITE 1 /* 1: Enable disk_write function */ |
◆ _USE_IOCTL
#define _USE_IOCTL 1 /* 1: Enable disk_ioctl function */ |
◆ STA_NOINIT
#define STA_NOINIT 0x01 /* Drive not initialized */ |
◆ STA_NODISK
#define STA_NODISK 0x02 /* No medium in the drive */ |
◆ STA_PROTECT
#define STA_PROTECT 0x04 /* Write protected */ |
◆ CTRL_SYNC
#define CTRL_SYNC 0 /* Complete pending write process (needed at _FS_READONLY == 0) */ |
◆ GET_SECTOR_COUNT
#define GET_SECTOR_COUNT 1 /* Get media size (needed at _USE_MKFS == 1) */ |
◆ GET_SECTOR_SIZE
◆ GET_BLOCK_SIZE
#define GET_BLOCK_SIZE 3 /* Get erase block size (needed at _USE_MKFS == 1) */ |
◆ CTRL_TRIM
#define CTRL_TRIM 4 /* Inform device that the data on the block of sectors is no longer used (needed at _USE_TRIM == 1) */ |
◆ CTRL_POWER
#define CTRL_POWER 5 /* Get/Set power status */ |
◆ CTRL_LOCK
#define CTRL_LOCK 6 /* Lock/Unlock media removal */ |
◆ CTRL_EJECT
#define CTRL_EJECT 7 /* Eject media */ |
◆ CTRL_FORMAT
#define CTRL_FORMAT 8 /* Create physical format on the media */ |
◆ MMC_GET_TYPE
#define MMC_GET_TYPE 10 /* Get card type */ |
◆ MMC_GET_CSD
#define MMC_GET_CSD 11 /* Get CSD */ |
◆ MMC_GET_CID
#define MMC_GET_CID 12 /* Get CID */ |
◆ MMC_GET_OCR
#define MMC_GET_OCR 13 /* Get OCR */ |
◆ MMC_GET_SDSTAT
#define MMC_GET_SDSTAT 14 /* Get SD status */ |
◆ ATA_GET_REV
#define ATA_GET_REV 20 /* Get F/W revision */ |
◆ ATA_GET_MODEL
#define ATA_GET_MODEL 21 /* Get model name */ |
◆ ATA_GET_SN
#define ATA_GET_SN 22 /* Get serial number */ |
◆ DSTATUS
◆ DRESULT
Enumerator |
---|
RES_OK | |
RES_ERROR | |
RES_WRPRT | |
RES_NOTRDY | |
RES_PARERR | |
RES_OK | |
RES_ERROR | |
RES_WRPRT | |
RES_NOTRDY | |
RES_PARERR | |
◆ disk_initialize()
Initializes a Drive.
- Parameters
-
pdrv | Physical drive number (0..) |
- Return values
-
◆ disk_status()
Gets Disk Status.
- Parameters
-
pdrv | Physical drive number (0..) |
- Return values
-
◆ disk_read()
Reads Sector(s)
- Parameters
-
pdrv | Physical drive number (0..) |
*buff | Data buffer to store read data |
sector | Sector address (LBA) |
count | Number of sectors to read (1..128) |
- Return values
-
◆ disk_write()
Writes Sector(s)
- Parameters
-
pdrv | Physical drive number (0..) |
*buff | Data to be written |
sector | Sector address (LBA) |
count | Number of sectors to write (1..128) |
- Return values
-
◆ disk_ioctl()
I/O control operation.
- Parameters
-
pdrv | Physical drive number (0..) |
cmd | Control code |
*buff | Buffer to send/receive control data |
- Return values
-
◆ get_fattime()
Gets Time from RTC.
- Parameters
-
- Return values
-