#include <AP_FlashStorage.h>
|
| FUNCTOR_TYPEDEF (FlashWrite, bool, uint8_t, uint32_t, const uint8_t *, uint16_t) |
|
| FUNCTOR_TYPEDEF (FlashRead, bool, uint8_t, uint32_t, uint8_t *, uint16_t) |
|
| FUNCTOR_TYPEDEF (FlashErase, bool, uint8_t) |
|
| FUNCTOR_TYPEDEF (FlashEraseOK, bool) |
|
| AP_FlashStorage (uint8_t *mem_buffer, uint32_t flash_sector_size, FlashWrite flash_write, FlashRead flash_read, FlashErase flash_erase, FlashEraseOK flash_erase_ok) |
|
bool | init (void) |
|
bool | re_initialise (void) |
|
bool | switch_full_sector (void) |
|
bool | write (uint16_t offset, uint16_t length) |
|
Definition at line 45 of file AP_FlashStorage.h.
◆ BlockState
Enumerator |
---|
BLOCK_STATE_AVAILABLE | |
BLOCK_STATE_WRITING | |
BLOCK_STATE_VALID | |
Definition at line 118 of file AP_FlashStorage.h.
◆ SectorState
Enumerator |
---|
SECTOR_STATE_AVAILABLE | |
SECTOR_STATE_IN_USE | |
SECTOR_STATE_FULL | |
Definition at line 105 of file AP_FlashStorage.h.
◆ AP_FlashStorage()
AP_FlashStorage::AP_FlashStorage |
( |
uint8_t * |
mem_buffer, |
|
|
uint32_t |
flash_sector_size, |
|
|
FlashWrite |
flash_write, |
|
|
FlashRead |
flash_read, |
|
|
FlashErase |
flash_erase, |
|
|
FlashEraseOK |
flash_erase_ok |
|
) |
| |
◆ all_zero()
bool AP_FlashStorage::all_zero |
( |
uint16_t |
ofs, |
|
|
uint16_t |
size |
|
) |
| |
|
private |
◆ erase_all()
bool AP_FlashStorage::erase_all |
( |
void |
| ) |
|
|
private |
◆ erase_sector()
bool AP_FlashStorage::erase_sector |
( |
uint8_t |
sector | ) |
|
|
private |
◆ FUNCTOR_TYPEDEF() [1/4]
AP_FlashStorage::FUNCTOR_TYPEDEF |
( |
FlashWrite |
, |
|
|
bool |
, |
|
|
uint8_t |
, |
|
|
uint32_t |
, |
|
|
const uint8_t * |
, |
|
|
uint16_t |
|
|
) |
| |
◆ FUNCTOR_TYPEDEF() [2/4]
AP_FlashStorage::FUNCTOR_TYPEDEF |
( |
FlashRead |
, |
|
|
bool |
, |
|
|
uint8_t |
, |
|
|
uint32_t |
, |
|
|
uint8_t * |
, |
|
|
uint16_t |
|
|
) |
| |
◆ FUNCTOR_TYPEDEF() [3/4]
AP_FlashStorage::FUNCTOR_TYPEDEF |
( |
FlashErase |
, |
|
|
bool |
, |
|
|
uint8_t |
|
|
) |
| |
◆ FUNCTOR_TYPEDEF() [4/4]
AP_FlashStorage::FUNCTOR_TYPEDEF |
( |
FlashEraseOK |
, |
|
|
bool |
|
|
) |
| |
◆ init()
bool AP_FlashStorage::init |
( |
void |
| ) |
|
◆ load_sector()
bool AP_FlashStorage::load_sector |
( |
uint8_t |
sector | ) |
|
|
private |
◆ re_initialise()
bool AP_FlashStorage::re_initialise |
( |
void |
| ) |
|
◆ switch_full_sector()
bool AP_FlashStorage::switch_full_sector |
( |
void |
| ) |
|
◆ switch_sectors()
bool AP_FlashStorage::switch_sectors |
( |
void |
| ) |
|
|
private |
◆ write()
bool AP_FlashStorage::write |
( |
uint16_t |
offset, |
|
|
uint16_t |
length |
|
) |
| |
◆ write_all()
bool AP_FlashStorage::write_all |
( |
void |
| ) |
|
|
private |
◆ block_size
const uint8_t AP_FlashStorage::block_size = 8 |
|
staticprivate |
◆ current_sector
uint8_t AP_FlashStorage::current_sector |
|
private |
◆ flash_erase
FlashErase AP_FlashStorage::flash_erase |
|
private |
◆ flash_erase_ok
FlashEraseOK AP_FlashStorage::flash_erase_ok |
|
private |
◆ flash_read
FlashRead AP_FlashStorage::flash_read |
|
private |
◆ flash_sector_size
const uint32_t AP_FlashStorage::flash_sector_size |
|
private |
◆ flash_write
FlashWrite AP_FlashStorage::flash_write |
|
private |
◆ max_write
const uint8_t AP_FlashStorage::max_write = 64 |
|
staticprivate |
◆ mem_buffer
uint8_t* AP_FlashStorage::mem_buffer |
|
private |
◆ num_blocks
◆ reserve_size
◆ reserved_space
uint32_t AP_FlashStorage::reserved_space |
|
private |
◆ signature
const uint32_t AP_FlashStorage::signature = 0x51685B |
|
staticprivate |
◆ storage_size
◆ write_error
bool AP_FlashStorage::write_error |
|
private |
◆ write_offset
uint32_t AP_FlashStorage::write_offset |
|
private |
The documentation for this class was generated from the following files: