2016-02-17 21:25:28 -04:00
|
|
|
#pragma once
|
2012-12-12 18:04:27 -04:00
|
|
|
|
2015-08-11 03:28:43 -03:00
|
|
|
#include <AP_HAL/AP_HAL.h>
|
2015-05-04 03:15:12 -03:00
|
|
|
#include "AP_HAL_SITL_Namespace.h"
|
2012-12-12 18:04:27 -04:00
|
|
|
|
2016-01-10 02:23:32 -04:00
|
|
|
class HALSITL::EEPROMStorage : public AP_HAL::Storage {
|
2012-12-12 18:04:27 -04:00
|
|
|
public:
|
2016-01-10 02:23:32 -04:00
|
|
|
EEPROMStorage() {
|
2015-05-04 21:59:07 -03:00
|
|
|
_eeprom_fd = -1;
|
2012-12-12 18:04:27 -04:00
|
|
|
}
|
2015-12-02 11:14:20 -04:00
|
|
|
void init() {}
|
2014-08-13 01:59:28 -03:00
|
|
|
void read_block(void *dst, uint16_t src, size_t n);
|
2013-06-04 01:02:13 -03:00
|
|
|
void write_block(uint16_t dst, const void* src, size_t n);
|
2012-12-12 18:04:27 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
int _eeprom_fd;
|
|
|
|
void _eeprom_open(void);
|
|
|
|
};
|