Skip to Content
The Alchemy Project

struct BUP_WORKSPACE

The save's state: which of the BUP_SECTOR_COUNT flash sectors hold a part, their part ids and counters, one part's three sectors and the summaries.

Declared in definitions.h.

Fields

NameDescription
Uint8occupied [BUP_SECTOR_COUNT]1 for a sector holding the current copy of a part.
Uint8partId [BUP_SECTOR_COUNT]Each sector's part.
Uint16count [BUP_SECTOR_COUNT]Each sector's counter.
Uint8slot [BUP_SECTORS_PER_PART * BUP_SECTOR_SIZE]One part's sectors, read from or written to flash.
BUP_SUMMARYsummary [BUP_FILE_COUNT]Each file's, from parts 0 to 2.
BUP_SUMMARYextraPart 3's summary.
void (*progress )(Sint32 step)Called between sector writes, if set.
Uint16sectorCount0 when a write starts.
Uint16sectorTotalSectors to write: a part's, and as many again when an old copy is invalidated.

Description

The save's state: which of the BUP_SECTOR_COUNT flash sectors hold a part, their part ids and counters, one part's three sectors and the summaries.

struct BUP_WORKSPACE

Referenced by mnFileListSelectFile(), mnSaveCountFilesExcludingSent(), mnSaveFindFreeFile(), mnSaveProgressAdvance(), mnSaveScanFileSummaries(), mnSaveToChosenFile(), syBupChecksumSector(), syBupDeletePart(), syBupFindLatestSector(), syBupGetLatestCounter(), syBupInitState(), syBupInvalidateSector(), syBupLoadExtraSummary(), syBupLoadFileSummaries(), syBupReadPart(), syBupReadSector(), syBupSelectWriteSector(), syBupSetProgressCallback(), syBupWritePart() and syBupWriteSector().

Definition at line 1715 of file definitions.h.

Fields in detail

occupied

Uint8 occupied[BUP_SECTOR_COUNT]

1 for a sector holding the current copy of a part.

partId

Uint8 partId[BUP_SECTOR_COUNT]

Each sector's part.

count

Uint16 count[BUP_SECTOR_COUNT]

Each sector's counter.

slot

Uint8 slot[BUP_SECTORS_PER_PART * BUP_SECTOR_SIZE]

One part's sectors, read from or written to flash.

summary

BUP_SUMMARY summary[BUP_FILE_COUNT]

Each file's, from parts 0 to 2.

extra

BUP_SUMMARY extra

Part 3's summary.

progress

void (*progress)(Sint32 step)

Called between sector writes, if set.

sectorCount

Uint16 sectorCount

0 when a write starts.

sectorTotal

Uint16 sectorTotal

Sectors to write: a part's, and as many again when an old copy is invalidated.