2016-02-17 21:25:25 -04:00
|
|
|
#pragma once
|
2012-08-20 15:37:46 -03:00
|
|
|
|
2012-08-30 21:18:20 -03:00
|
|
|
#include <stdint.h>
|
2012-08-20 15:37:46 -03:00
|
|
|
#include "AP_HAL_Namespace.h"
|
|
|
|
|
|
|
|
class AP_HAL::Storage {
|
|
|
|
public:
|
2015-12-02 11:37:22 -04:00
|
|
|
virtual void init() = 0;
|
2019-12-26 20:43:07 -04:00
|
|
|
virtual bool erase();
|
2014-08-13 01:59:28 -03:00
|
|
|
virtual void read_block(void *dst, uint16_t src, size_t n) = 0;
|
2013-06-04 01:02:13 -03:00
|
|
|
virtual void write_block(uint16_t dst, const void* src, size_t n) = 0;
|
2018-01-26 22:30:45 -04:00
|
|
|
virtual void _timer_tick(void) {};
|
2018-06-29 19:48:22 -03:00
|
|
|
virtual bool healthy(void) { return true; }
|
2021-11-08 10:19:20 -04:00
|
|
|
virtual bool get_storage_ptr(void *&ptr, size_t &size) { return false; }
|
2012-08-20 15:37:46 -03:00
|
|
|
};
|