#include "diskio.h"
#include "xparameters.h"
#include "xil_printf.h"
Functions | |
DSTATUS | disk_status (BYTE drv) |
DSTATUS | disk_initialize (BYTE drv) |
DRESULT | disk_read (BYTE drv, BYTE *buff, DWORD sector, BYTE count) |
DWORD | get_fattime (void) |
DRESULT | disk_write (BYTE drv, const BYTE *buff, DWORD sector, BYTE count) |
Description: This glue layer initializes the host controller and SD card in disk_initialize. If SD card supports it, 4-bit mode and high speed mode will be enabled. The default block size is 512 bytes. disk_read and disk_write functions are used to read and write files using ADMA2 in polled mode. The file system can be used to read from and write to an SD card that is already formatted as FATFS.
MODIFICATION HISTORY:
Ver Who Date Changes ----- ---- -------- ------------------------------------------------------- 1.00a hk 10/17/13 First release 2.0 hk 02/12/14 Corrected status check in disk initialize. CR# 772072.
|
Initializes the drive. In case of SD, it initializes the host controller and the card. This function also selects additional settings such as bus width, speed and block size.
|
|
Reads the drive In case of SD, it reads the SD card using ADMA2 in polled mode.
|
|
Gets the status of the disk. In case of SD, it checks whether card is present or not.
|
|
Reads the drive In case of SD, it reads the SD card using ADMA2 in polled mode.
|
|
This function is User Provided Timer Function for FatFs module
|