MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / wipe

Method wipe

libraries/FRAM_I2C/FRAM_RINGBUFFER.cpp:167–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165
166
167void FRAM_RINGBUFFER::wipe()
168{
169 uint32_t pos = _start - 20; // also overwrite metadata
170 while (pos < _start + _size - 4) // prevent writing adjacent FRAM
171 {
172 _fram->write32(pos, 0xFFFFFFFF);
173 pos += 4;
174 }
175 while (pos < _start + _size) // if _size not a multiple of 4.
176 {
177 _fram->write8(pos, 0xFF);
178 pos++;
179 }
180 flush(); // reset internal variables too.
181}
182
183
184

Callers

nothing calls this directly

Calls 2

write32Method · 0.80
write8Method · 0.45

Tested by

no test coverage detected