mirror of https://github.com/ArduPilot/ardupilot
AP_HAL_Linux: add get_storage_ptr method
This commit is contained in:
parent
7a1044309c
commit
f57f106c7f
|
@ -266,3 +266,16 @@ void Storage::_timer_tick(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
get storage size and ptr
|
||||
*/
|
||||
bool Storage::get_storage_ptr(void *&ptr, size_t &size)
|
||||
{
|
||||
if (!_initialised) {
|
||||
return false;
|
||||
}
|
||||
ptr = _buffer;
|
||||
size = sizeof(_buffer);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -32,6 +32,8 @@ public:
|
|||
void write_dword(uint16_t loc, uint32_t value);
|
||||
void write_block(uint16_t dst, const void* src, size_t n) override;
|
||||
|
||||
bool get_storage_ptr(void *&ptr, size_t &size) override;
|
||||
|
||||
virtual void _timer_tick(void) override;
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in New Issue