Microchip® Advanced Software Framework

diskio.c File Reference

Implementation of low level disk I/O module skeleton for FatFS.

Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.

#include "compiler.h"
#include "diskio.h"
#include "ctrl_access.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>

Macros

#define SECTOR_SIZE_1024   2
 
#define SECTOR_SIZE_2048   4
 
#define SECTOR_SIZE_4096   8
 
#define SECTOR_SIZE_512   1
 Supported sector size. More...
 
#define SECTOR_SIZE_DEFAULT   512
 Default sector size. More...
 

Functions

DSTATUS disk_initialize (BYTE drv)
 Initialize a disk. More...
 
DRESULT disk_ioctl (BYTE drv, BYTE ctrl, void *buff)
 Miscellaneous functions, which support the following commands: More...
 
DRESULT disk_read (BYTE drv, BYTE *buff, DWORD sector, BYTE count)
 Read sector(s). More...
 
DSTATUS disk_status (BYTE drv)
 Return disk status. More...
 
DRESULT disk_write (BYTE drv, BYTE const *buff, DWORD sector, BYTE count)
 Write sector(s). More...