MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / resetStorage

Function resetStorage

modules/io/storage/flash/storage-flash.c:84–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82static uint8_t writeEntry(const char *domain, const char *key, uint8_t format, const uint8_t *value, uint16_t byteCount);
83
84static void resetStorage(void)
85{
86 uint32_t magic = kStorageMagic;
87
88 modSPIErase(kStorageStartOffset, kFlashSectorSize << 1);
89 modSPIWrite(kStorageStartOffset, sizeof(magic), (uint8_t *)&magic);
90}
91
92static uint8_t findStorageBlock(uint32_t *offset)
93{

Callers 1

findStorageBlockFunction · 0.85

Calls 2

modSPIEraseFunction · 0.50
modSPIWriteFunction · 0.50

Tested by

no test coverage detected