5 #define LINUX_STORAGE_SIZE HAL_STORAGE_SIZE 6 #define LINUX_STORAGE_MAX_WRITE 512 7 #define LINUX_STORAGE_LINE_SHIFT 9 8 #define LINUX_STORAGE_LINE_SIZE (1<<LINUX_STORAGE_LINE_SHIFT) 9 #define LINUX_STORAGE_NUM_LINES (LINUX_STORAGE_SIZE/LINUX_STORAGE_LINE_SIZE) 19 return static_cast<Storage*
>(storage);
28 void read_block(
void *dst, uint16_t src,
size_t n);
33 void write_block(uint16_t dst,
const void* src,
size_t n);
void write_dword(uint16_t loc, uint32_t value)
static Storage * from(AP_HAL::Storage *storage)
uint32_t read_dword(uint16_t loc)
void write_block(uint16_t dst, const void *src, size_t n)
void write_byte(uint16_t loc, uint8_t value)
#define LINUX_STORAGE_SIZE
int _storage_create(const char *dpath)
void read_block(void *dst, uint16_t src, size_t n)
uint8_t read_byte(uint16_t loc)
virtual void _timer_tick(void) override
void write_word(uint16_t loc, uint16_t value)
volatile bool _initialised
void _mark_dirty(uint16_t loc, uint16_t length)
uint16_t read_word(uint16_t loc)
volatile uint32_t _dirty_mask
uint8_t _buffer[LINUX_STORAGE_SIZE]