diskio.c File Reference
#include "diskio.h"
#include "spi_flash.h"
#include "sd.h"
#include "c_tlm_var.h"
#include "spi_sem.h"
Include dependency graph for diskio.c:

Functions

DSTATUS disk_initialize (BYTE drv)
 
DSTATUS disk_status (BYTE drv)
 
DRESULT disk_read (BYTE drv, BYTE *buff, DWORD sector, BYTE count)
 
DRESULT disk_write (BYTE drv, const BYTE *buff, DWORD sector, BYTE count)
 
DRESULT disk_ioctl (BYTE drv, BYTE ctrl, void *buff)
 

Function Documentation

DSTATUS disk_initialize ( BYTE  drv)

Initializes the disk given by

Parameters
drv
DRESULT disk_ioctl ( BYTE  drv,
BYTE  ctrl,
void *  buff 
)

Gets control data of the disk

Parameters
drvThe drive number to get data from
ctrlThe control data type to get
buffThe buffer to write data to
Returns
The status of the request
DRESULT disk_read ( BYTE  drv,
BYTE buff,
DWORD  sector,
BYTE  count 
)

Performs low level disk read

Parameters
drvThe disk drive to read from
buffThe pointer to the buffer to read data to
sectorThe sector number to read
countThe number of sectors to read
Returns
The status of the read operation
DSTATUS disk_status ( BYTE  drv)
Returns
Disk status of the
Parameters
drv
DRESULT disk_write ( BYTE  drv,
const BYTE buff,
DWORD  sector,
BYTE  count 
)

Performs low level disk write

Parameters
drvThe disk drive to write data to
buffThe pointer to the buffer to write data from
sectorThe sector number to write
countThe number of sectors to write
Returns
The status of the write operation