APM:Libraries
Public Member Functions | Private Member Functions | Private Attributes | List of all members
VRBRAIN::VRBRAINStorage Class Reference

#include <Storage.h>

Inheritance diagram for VRBRAIN::VRBRAINStorage:
[legend]
Collaboration diagram for VRBRAIN::VRBRAINStorage:
[legend]

Public Member Functions

 VRBRAINStorage ()
 
void init ()
 
void read_block (void *dst, uint16_t src, size_t n)
 
void write_block (uint16_t dst, const void *src, size_t n)
 
void _timer_tick (void) override
 

Private Member Functions

void _storage_create (void)
 
void _storage_open (void)
 
void _mark_dirty (uint16_t loc, uint16_t length)
 
uint8_t _buffer [VRBRAIN_STORAGE_SIZE__attribute__ ((aligned(4)))
 
void bus_lock (bool lock)
 
void _mtd_load (void)
 
void _mtd_write (uint16_t line)
 

Private Attributes

volatile bool _initialised
 
Bitmask _dirty_mask {VRBRAIN_STORAGE_NUM_LINES}
 
perf_counter_t _perf_storage
 
perf_counter_t _perf_errors
 
uint32_t _last_re_init_ms
 
int _fd = -1
 

Detailed Description

Definition at line 30 of file Storage.h.

Constructor & Destructor Documentation

◆ VRBRAINStorage()

VRBRAINStorage::VRBRAINStorage ( void  )

Definition at line 34 of file Storage.cpp.

Member Function Documentation

◆ __attribute__()

uint8_t _buffer [VRBRAIN_STORAGE_SIZE] VRBRAIN::VRBRAINStorage::__attribute__ ( (aligned(4))  )
private

◆ _mark_dirty()

void VRBRAINStorage::_mark_dirty ( uint16_t  loc,
uint16_t  length 
)
private

Definition at line 73 of file Storage.cpp.

Referenced by write_block().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _mtd_load()

void VRBRAINStorage::_mtd_load ( void  )
private

Definition at line 198 of file Storage.cpp.

Referenced by _storage_open().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _mtd_write()

void VRBRAINStorage::_mtd_write ( uint16_t  line)
private

Definition at line 172 of file Storage.cpp.

Referenced by _timer_tick().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _storage_create()

void VRBRAIN::VRBRAINStorage::_storage_create ( void  )
private

◆ _storage_open()

void VRBRAINStorage::_storage_open ( void  )
private

Definition at line 40 of file Storage.cpp.

Referenced by read_block(), and write_block().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _timer_tick()

void VRBRAINStorage::_timer_tick ( void  )
overridevirtual

Reimplemented from AP_HAL::Storage.

Definition at line 104 of file Storage.cpp.

Referenced by init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bus_lock()

void VRBRAINStorage::bus_lock ( bool  lock)
private

Definition at line 148 of file Storage.cpp.

Referenced by _mtd_load(), and _mtd_write().

Here is the caller graph for this function:

◆ init()

void VRBRAIN::VRBRAINStorage::init ( void  )
inlinevirtual

Implements AP_HAL::Storage.

Definition at line 34 of file Storage.h.

Here is the call graph for this function:

◆ read_block()

void VRBRAINStorage::read_block ( void *  dst,
uint16_t  src,
size_t  n 
)
virtual

Implements AP_HAL::Storage.

Definition at line 83 of file Storage.cpp.

Referenced by init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_block()

void VRBRAINStorage::write_block ( uint16_t  dst,
const void *  src,
size_t  n 
)
virtual

Implements AP_HAL::Storage.

Definition at line 92 of file Storage.cpp.

Referenced by init().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _dirty_mask

Bitmask VRBRAIN::VRBRAINStorage::_dirty_mask {VRBRAIN_STORAGE_NUM_LINES}
private

Definition at line 46 of file Storage.h.

Referenced by _mark_dirty(), _mtd_load(), _mtd_write(), _storage_open(), and _timer_tick().

◆ _fd

int VRBRAIN::VRBRAINStorage::_fd = -1
private

Definition at line 52 of file Storage.h.

Referenced by _mtd_write(), and _timer_tick().

◆ _initialised

volatile bool VRBRAIN::VRBRAINStorage::_initialised
private

Definition at line 41 of file Storage.h.

Referenced by _storage_open(), and _timer_tick().

◆ _last_re_init_ms

uint32_t VRBRAIN::VRBRAINStorage::_last_re_init_ms
private

Definition at line 49 of file Storage.h.

Referenced by _mtd_load().

◆ _perf_errors

perf_counter_t VRBRAIN::VRBRAINStorage::_perf_errors
private

Definition at line 48 of file Storage.h.

Referenced by _mtd_load(), _mtd_write(), and _timer_tick().

◆ _perf_storage

perf_counter_t VRBRAIN::VRBRAINStorage::_perf_storage
private

Definition at line 47 of file Storage.h.

Referenced by _timer_tick().


The documentation for this class was generated from the following files: