rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
art_keep_t Struct Reference

The write art_store_put() does, cut into steps of at most one sector each, so a caller can stop between any two and carry on later. More...

#include <art_store.h>

Data Fields

const art_flash_t * f
const uint8_t * payload
art_entry_t entry
uint16_t board
uint8_t phase
uint32_t at
uint32_t span
uint32_t done
uint16_t crc
uint32_t hash
uint8_t buf [ART_KEEP_READ_BYTES]

Detailed Description

The write art_store_put() does, cut into steps of at most one sector each, so a caller can stop between any two and carry on later.

The steps, in order: choose the slot; erase each sector the header and the payload occupy, the header's first; write the payload a sector at a time; read it back a sector at a time against the entry's checksum; write the header. The header's sector is erased before anything else is written and the header is written last, so a keep stopped between any two steps – or never resumed, by a power cut – leaves nothing findable for the board. Resumed, it carries on from the step it stopped before: what it already wrote is still in flash, because nothing else writes the slot in between.

Owned by one caller; the payload must stay valid and unchanged until the keep is DONE or FAILED.

Field Documentation

◆ at

uint32_t art_keep_t::at

the slot's offset

◆ buf

uint8_t art_keep_t::buf[ART_KEEP_READ_BYTES]

the chunk read back from flash

◆ crc

uint16_t art_keep_t::crc

of what has been read back so far

◆ done

uint32_t art_keep_t::done

bytes of the phase done

◆ hash

uint32_t art_keep_t::hash

the same, link_fnv1a32()

◆ phase

uint8_t art_keep_t::phase

◆ span

uint32_t art_keep_t::span

bytes from the slot's start to erase


The documentation for this struct was generated from the following file: