Low level disk I/O module skeleton for FatFs.
More...
|
file | diskio.c |
| Low level disk I/O module skeleton for FatFs.
|
|
file | diskio.c |
| Low level disk I/O module skeleton for FatFs.
|
|
|
typedef BYTE | DSTATUS |
| Status of Disk Functions.
|
|
Low level disk I/O module skeleton for FatFs.
1: Enable disk_ioctl function
Definition at line 53 of file diskio.h.
1: Enable disk_write function
Definition at line 52 of file diskio.h.
Get model name
Definition at line 90 of file diskio.h.
Get F/W revision
Definition at line 89 of file diskio.h.
Get serial number
Definition at line 91 of file diskio.h.
Block Size in Bytes
Definition at line 53 of file diskio.c.
Block addressing
Definition at line 99 of file diskio.h.
Eject media
Definition at line 78 of file diskio.h.
#define CTRL_ERASE_SECTOR 4 |
Force erased a block of sectors (for only _USE_ERASE)
Definition at line 71 of file diskio.h.
Create physical format on the media
Definition at line 79 of file diskio.h.
Lock/Unlock media removal
Definition at line 77 of file diskio.h.
Get/Set power status
Definition at line 76 of file diskio.h.
Flush disk cache (for write functions)
Definition at line 63 of file diskio.h.
Get erase block size (for only f_mkfs())
Definition at line 68 of file diskio.h.
#define GET_SECTOR_COUNT 1 |
Get media size (for only f_mkfs())
Definition at line 64 of file diskio.h.
#define GET_SECTOR_SIZE 2 |
Get sector size (for multiple sector size (_MAX_SS >= 1024))
Definition at line 65 of file diskio.h.
#define MMC_GET_SDSTAT 14 |
Get SD status
Definition at line 86 of file diskio.h.
Get card type
Definition at line 82 of file diskio.h.
No medium in the drive
Definition at line 57 of file diskio.h.
Drive not initialized
Definition at line 56 of file diskio.h.
Write protected
Definition at line 58 of file diskio.h.
Results of Disk Functions.
Enumerator |
---|
RES_OK |
0: Successful
|
RES_ERROR |
1: R/W Error
|
RES_WRPRT |
2: Write Protected
|
RES_NOTRDY |
3: Not Ready
|
RES_PARERR |
4: Invalid Parameter
|
Definition at line 112 of file diskio.h.
DSTATUS disk_initialize |
( |
BYTE |
drv | ) |
|
Initialize the SD Card
Returns the disk status.
- Parameters
-
[in] | drv | Physical drive number (0..) |
- Returns
- DSTATUS
Definition at line 71 of file diskio.c.
DRESULT disk_read |
( |
BYTE |
drv, |
|
|
BYTE * |
buff, |
|
|
DWORD |
sector, |
|
|
UINT |
count |
|
) |
| |
Read from the SD Card.
- Parameters
-
[in] | drv | Physical drive number (0..) |
[out] | buff | Data buffer to store read data |
[in] | sector | Sector address (LBA) |
[in] | count | Number of sectors to read (1..128) |
- Returns
- DRESULT
Definition at line 127 of file diskio.c.
Return disk status.
- Parameters
-
[in] | drv | Physical drive number (0..) |
- Returns
- DSTATUS
Definition at line 103 of file diskio.c.