IFS::FAT Namespace Reference

Classes

struct  FatParam
 
class  FileSystem
 
struct  FormatOptions
 Formatting options. More...
 

Functions

int translateFatfsResult (uint8_t result, bool diskio_write)
 
String fatfsErrorToStr (uint8_t err)
 
ErrorCode calculateFatParam (Partition partition, const FormatOptions &opt, FatParam &param)
 Deduce FAT volume parameters for given space. More...
 
ErrorCode formatVolume (Partition partition, const FatParam &param)
 Format partition using pre-calculated FAT parameters. More...
 
ErrorCode formatVolume (Partition partition, const FormatOptions &opt={})
 Format partition with a blank FAT volume. More...
 

Function Documentation

◆ calculateFatParam()

ErrorCode IFS::FAT::calculateFatParam ( Partition  partition,
const FormatOptions opt,
FatParam param 
)

Deduce FAT volume parameters for given space.

Parameters
partitionThe partition to format
optFormatting options
paramOn success, contains calculated parameters for FAT volume
Return values
ErrorCodeWhen partitioning using MBR format, this method can be used to determine the Sys indicator value setting.

◆ fatfsErrorToStr()

String IFS::FAT::fatfsErrorToStr ( uint8_t  err)

◆ formatVolume() [1/2]

ErrorCode IFS::FAT::formatVolume ( Partition  partition,
const FatParam param 
)

Format partition using pre-calculated FAT parameters.

Parameters
partitionThe partition to format
paramDetailed FAT parameters (returned from calculateFatParam)
Return values
ErrorCodeThis function allows fine control over exactly how a FAT partition is constructed. Generally the calculateFatParam function should be used to populate the param structure, then any modifications can be made as required before actually formatting the volume.

◆ formatVolume() [2/2]

ErrorCode IFS::FAT::formatVolume ( Partition  partition,
const FormatOptions opt = {} 
)
inline

Format partition with a blank FAT volume.

Parameters
partitionThe partition to format
optFormatting options
Return values
ErrorCode

◆ translateFatfsResult()

int IFS::FAT::translateFatfsResult ( uint8_t  result,
bool  diskio_write 
)