2013-09-22 23:53:48 -03:00
|
|
|
/*
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
Flymaple port by Mike McCauley
|
|
|
|
*/
|
2016-02-17 21:25:24 -04:00
|
|
|
#pragma once
|
2013-09-22 23:53:48 -03:00
|
|
|
|
2015-08-11 03:28:43 -03:00
|
|
|
#include "AP_HAL_FLYMAPLE.h"
|
2013-09-22 23:53:48 -03:00
|
|
|
|
|
|
|
class AP_HAL_FLYMAPLE_NS::FLYMAPLEStorage : public AP_HAL::Storage {
|
|
|
|
public:
|
|
|
|
FLYMAPLEStorage();
|
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);
|
|
|
|
void write_block(uint16_t dst, const void* src, size_t n);
|
2013-09-22 23:53:48 -03:00
|
|
|
|
2014-08-13 01:59:28 -03:00
|
|
|
private:
|
|
|
|
uint8_t read_byte(uint16_t loc);
|
2013-09-22 23:53:48 -03:00
|
|
|
void write_byte(uint16_t loc, uint8_t value);
|
|
|
|
};
|