2012-12-12 18:04:27 -04:00
|
|
|
|
|
|
|
|
2015-05-04 03:15:12 -03:00
|
|
|
#ifndef __AP_HAL_SITL_STORAGE_H__
|
|
|
|
#define __AP_HAL_SITL_STORAGE_H__
|
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
|
|
|
|
2015-05-04 03:15:12 -03:00
|
|
|
class HALSITL::SITLEEPROMStorage : public AP_HAL::Storage {
|
2012-12-12 18:04:27 -04:00
|
|
|
public:
|
|
|
|
SITLEEPROMStorage() {
|
2015-05-04 21:59:07 -03:00
|
|
|
_eeprom_fd = -1;
|
2012-12-12 18:04:27 -04:00
|
|
|
}
|
|
|
|
void init(void* machtnichts) {}
|
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);
|
|
|
|
};
|
|
|
|
|
2015-05-04 03:15:12 -03:00
|
|
|
#endif // __AP_HAL_SITL_STORAGE_H__
|