Unit FATFS

From Ultibo.org
Jump to: navigation, search

Return to Unit Reference


Description


Ultibo FAT12/16/32/exFAT Interface unit

Notes:

Based on information from numerous sources, primarily the document fatgen103.pdf from Microsoft. FAT Disk Blocks are based on reading a group of sectors into a block at once. The BlockNo of each block is therefore the FAT entry no of the first FAT in the block.

The use of IsEightDotThree and GenerateShortName(Ex) from the UltiboUtils unit should be replaced by internal routines optimised for maximum performance. All Block and Entry Offsets have been expanded to 32bit to avoid 16bit overflow on 64K clusters.

Constants



[Expand]
FATFS specific constants fat*


[Expand]
FATFS params table fatParams*


[Expand]
FATFS geometry tables fat12Geometry*


[Expand]
FATFS cluster size tables fat_ClusterSize*


[Expand]
FATFS partition types fatPartitionType*


Type definitions



FATFS specific types

TFATType = (ftNONE,ftFAT12,ftFAT16,ftFAT32);

FATFS params

[Expand]

TFATParams = record

FATFS geometry

[Expand]

TFATGeometry = record

FATFS cluster size

[Expand]

TFATClusterSize = record

FATFS partition type

[Expand]

TFATPartitionType = record

FATFS name

[Expand]

PFATName = ^TFATName;

TFATName = packed record

FATSFS directory

[Expand]

PFATDirectory = ^TFATDirectory;

TFATDirectory = packed record

LFN directory

[Expand]

PLFNDirectory = ^TLFNDirectory;

TLFNDirectory = packed record

FATFS info sector

[Expand]

PFATInfoSector = ^TFATInfoSector;

TFATInfoSector = packed record


Class definitions



FATFS specific classes

TFATRecognizer = class(TRecognizer)
TFATPartitioner = class(TDiskPartitioner)
TFATFormatter = class(TDiskFormatter)
TFATDefragger = class(TDiskDefragger)
TFATRepairer = class(TDiskRepairer)
TFATFileSystem = class(TFileSystem)
TFATDiskTable = class(TDiskTable)
TFATDiskBlock = class(TDiskBlock)
TFATDiskEntry = class(TDiskEntry)


Public variables


None defined

Function declarations



Initialization functions

[Expand]
procedure FATFSInit;
Description: To be documented


[Expand]
procedure FATFSQuit;
Description: To be documented


FATFS helper functions

[Expand]
function FATTypeToString(AType:TFATType):String;
Description: To be documented


Return to Unit Reference