MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / write_block

Method write_block

libraries/AP_HAL_Linux/Storage.cpp:193–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193void Storage::write_block(uint16_t loc, const void *src, size_t n)
194{
195 if (loc >= sizeof(_buffer)-(n-1)) {
196 return;
197 }
198 if (memcmp(src, &_buffer[loc], n) != 0) {
199 init();
200 memcpy(&_buffer[loc], src, n);
201 _mark_dirty(loc, n);
202 }
203}
204
205void Storage::_timer_tick(void)
206{

Callers

nothing calls this directly

Calls 2

memcpyFunction · 0.85
initFunction · 0.70

Tested by

no test coverage detected