struct BUP_STATE
The save state: which of the 16 flash sectors hold a part, their part ids and counters, one sector's buffer and the three files' summaries.
Declared in definitions.h.
Fields
| Name | Description | |
|---|---|---|
Uint8 | occupied [16] | 1 for a sector holding the current copy of a part. |
Uint8 | partId [16] | Each sector's part; 16 for none. |
Uint16 | count [16] | Each sector's counter. |
union { struct { BUP_SECTOR_HEADER | header, payload, part, bytes, slot ; Uint8 payload[4080]; } part; Uint8 bytes[4096]; } slot | One sector, read from or written to flash. |
BUP_FILE_SUMMARY | summary [BUP_FILE_COUNT] | Each file's summary, read from its first part. |
Description
The save state: which of the 16 flash sectors hold a part, their part ids and counters, one sector's buffer and the three files' summaries.
struct BUP_STATE
Referenced by mnFileListSelectFile(), mnSaveScanFileSummaries(), mnSaveToChosenFile(), syBupChecksumSector(), syBupFindLatestSector(), syBupGetLatestCounter(), syBupInitState(), syBupInvalidateSector(), syBupLoadFileSummaries(), syBupReadPart(), syBupReadSector(), syBupWritePart() and syBupWriteSector().
Definition at line 1308 of file definitions.h.
Fields in detail
occupied
Uint8 occupied[16]
1 for a sector holding the current copy of a part.
partId
Uint8 partId[16]
Each sector's part; 16 for none.
count
Uint16 count[16]
Each sector's counter.
header, payload, part, bytes, slot
union { struct { BUP_SECTOR_HEADER header; Uint8 payload[4080]; } part; Uint8 bytes[4096]; } slot
One sector, read from or written to flash.
summary
BUP_FILE_SUMMARY summary[BUP_FILE_COUNT]
Each file's summary, read from its first part.