2012-08-20 15:38:09 -03:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef __AP_HAL_AVR_STORAGE_H__
|
|
|
|
#define __AP_HAL_AVR_STORAGE_H__
|
|
|
|
|
|
|
|
#include <AP_HAL.h>
|
2012-08-22 21:31:52 -03:00
|
|
|
#include "AP_HAL_AVR_Namespace.h"
|
2012-08-20 15:38:09 -03:00
|
|
|
|
2012-08-21 18:11:24 -03:00
|
|
|
class AP_HAL_AVR::AVREEPROMStorage : public AP_HAL::Storage {
|
2012-08-20 15:38:09 -03:00
|
|
|
public:
|
2012-08-30 21:18:20 -03:00
|
|
|
AVREEPROMStorage() {}
|
2012-11-12 15:05:20 -04:00
|
|
|
void init(void* machtnichts) {}
|
|
|
|
uint8_t read_byte(uint16_t loc);
|
|
|
|
uint16_t read_word(uint16_t loc);
|
|
|
|
uint32_t read_dword(uint16_t loc);
|
|
|
|
void read_block(void *dst, uint16_t src, size_t n);
|
2012-08-30 21:18:20 -03:00
|
|
|
|
2012-11-12 15:05:20 -04:00
|
|
|
void write_byte(uint16_t loc, uint8_t value);
|
|
|
|
void write_word(uint16_t loc, uint16_t value);
|
|
|
|
void write_dword(uint16_t loc, uint32_t value);
|
2013-06-04 01:02:13 -03:00
|
|
|
void write_block(uint16_t dst, const void* src, size_t n);
|
2012-08-20 15:38:09 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __AP_HAL_AVR_STORAGE_H__
|