MCPcopy Create free account
hub / github.com/Santroller/Santroller / save_empty

Function save_empty

src/config.cpp:943–956  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

941
942static const uint32_t FOOTER_MAGIC = 0xd2f1e365;
943bool save_empty()
944{
945
946 ConfigFooter *footer = reinterpret_cast<ConfigFooter *>(EEPROM.writeCache + EEPROM_SIZE_BYTES - sizeof(ConfigFooter));
947
948 footer->dataSize = 0;
949 footer->mainSize = 0;
950 footer->auxSize = 0;
951 footer->dataCrc = CRC32::calculate(EEPROM.writeCache, 0);
952 footer->magic = FOOTER_MAGIC;
953 footer->currentProfile = 0;
954 EEPROM.commit_now();
955 return true;
956}
957
958bool decode_cycle_input_states(pb_istream_t *stream, const pb_field_t *field, void **arg)
959{

Callers 1

mainFunction · 0.85

Calls 1

commit_nowMethod · 0.80

Tested by

no test coverage detected