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

Function resetPrefs

modules/files/preference/esp/modPreference.c:226–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226void resetPrefs(void)
227{
228 uint32_t magic = kPreferencesMagic;
229
230 modSPIErase(kPreferencesStartOffset, kFlashSectorSize << 1);
231 modSPIWrite(kPreferencesStartOffset, sizeof(magic), (uint8_t *)&magic);
232}
233
234uint8_t findPrefsBlock(uint32_t *offset)
235{

Callers 2

xs_preference_resetFunction · 0.85
findPrefsBlockFunction · 0.85

Calls 2

modSPIEraseFunction · 0.50
modSPIWriteFunction · 0.50

Tested by

no test coverage detected