Soldered SD Card Arduino Library 1.0.0
Easily read and write files to and form the SD card breakout! A fork of the original SDFat library by Bill Greiman.
Loading...
Searching...
No Matches
FatFormatter Class Reference

Format a FAT volume. More...

#include <FatFormatter.h>

Public Member Functions

bool format (BlockDevice *dev, uint8_t *secBuffer, print_t *pr=nullptr)
 

Private Member Functions

bool initFatDir (uint8_t fatType, uint32_t sectorCount)
 
void initPbs ()
 
bool makeFat16 ()
 
bool makeFat32 ()
 
bool writeMbr ()
 

Private Attributes

uint32_t m_capacityMB
 
uint32_t m_dataStart
 
uint32_t m_fatSize
 
uint32_t m_fatStart
 
uint32_t m_relativeSectors
 
uint32_t m_sectorCount
 
uint32_t m_totalSectors
 
BlockDevicem_dev
 
print_tm_pr
 
uint8_t * m_secBuf
 
uint16_t m_reservedSectorCount
 
uint8_t m_partType
 
uint8_t m_sectorsPerCluster
 

Detailed Description

Format a FAT volume.

Member Function Documentation

◆ format()

bool FatFormatter::format ( BlockDevice dev,
uint8_t *  secBuffer,
print_t pr = nullptr 
)

Format a FAT volume.

Parameters
[in]devBlock device for volume.
[in]secBufferbuffer for writing to volume.
[in]prPrint device for progress output.
Returns
true for success or false for failure.

◆ initFatDir()

bool FatFormatter::initFatDir ( uint8_t  fatType,
uint32_t  sectorCount 
)
private

◆ initPbs()

void FatFormatter::initPbs ( )
private

◆ makeFat16()

bool FatFormatter::makeFat16 ( )
private

◆ makeFat32()

bool FatFormatter::makeFat32 ( )
private

◆ writeMbr()

bool FatFormatter::writeMbr ( )
private

Member Data Documentation

◆ m_capacityMB

uint32_t FatFormatter::m_capacityMB
private

◆ m_dataStart

uint32_t FatFormatter::m_dataStart
private

◆ m_dev

BlockDevice* FatFormatter::m_dev
private

◆ m_fatSize

uint32_t FatFormatter::m_fatSize
private

◆ m_fatStart

uint32_t FatFormatter::m_fatStart
private

◆ m_partType

uint8_t FatFormatter::m_partType
private

◆ m_pr

print_t* FatFormatter::m_pr
private

◆ m_relativeSectors

uint32_t FatFormatter::m_relativeSectors
private

◆ m_reservedSectorCount

uint16_t FatFormatter::m_reservedSectorCount
private

◆ m_secBuf

uint8_t* FatFormatter::m_secBuf
private

◆ m_sectorCount

uint32_t FatFormatter::m_sectorCount
private

◆ m_sectorsPerCluster

uint8_t FatFormatter::m_sectorsPerCluster
private

◆ m_totalSectors

uint32_t FatFormatter::m_totalSectors
private

The documentation for this class was generated from the following files: