APM:Libraries
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
FlashTest Class Reference
Inheritance diagram for FlashTest:
[legend]
Collaboration diagram for FlashTest:
[legend]

Public Member Functions

void setup () override
 
void loop () override
 

Private Member Functions

bool flash_write (uint8_t sector, uint32_t offset, const uint8_t *data, uint16_t length)
 
bool flash_read (uint8_t sector, uint32_t offset, uint8_t *data, uint16_t length)
 
bool flash_erase (uint8_t sector)
 
bool flash_erase_ok (void)
 
void write (uint16_t offset, const uint8_t *data, uint16_t length)
 

Private Attributes

uint8_t mem_buffer [AP_FlashStorage::storage_size]
 
uint8_t mem_mirror [AP_FlashStorage::storage_size]
 
uint8_t flash [2][flash_sector_size]
 
AP_FlashStorage storage
 
bool erase_ok
 

Static Private Attributes

static const uint32_t flash_sector_size = 32U * 1024U
 

Detailed Description

Definition at line 12 of file FlashTest.cpp.

Member Function Documentation

◆ flash_erase()

bool FlashTest::flash_erase ( uint8_t  sector)
private

Definition at line 78 of file FlashTest.cpp.

Referenced by setup().

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

◆ flash_erase_ok()

bool FlashTest::flash_erase_ok ( void  )
private

Definition at line 87 of file FlashTest.cpp.

◆ flash_read()

bool FlashTest::flash_read ( uint8_t  sector,
uint32_t  offset,
uint8_t *  data,
uint16_t  length 
)
private

Definition at line 63 of file FlashTest.cpp.

Here is the call graph for this function:

◆ flash_write()

bool FlashTest::flash_write ( uint8_t  sector,
uint32_t  offset,
const uint8_t *  data,
uint16_t  length 
)
private

Definition at line 45 of file FlashTest.cpp.

Here is the call graph for this function:

◆ loop()

void FlashTest::loop ( void  )
overridevirtual

Implements AP_HAL::HAL::Callbacks.

Definition at line 158 of file FlashTest.cpp.

Here is the call graph for this function:

◆ setup()

void FlashTest::setup ( void  )
overridevirtual

Implements AP_HAL::HAL::Callbacks.

Definition at line 106 of file FlashTest.cpp.

Here is the call graph for this function:

◆ write()

void FlashTest::write ( uint16_t  offset,
const uint8_t *  data,
uint16_t  length 
)
private

Definition at line 92 of file FlashTest.cpp.

Referenced by setup().

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

Member Data Documentation

◆ erase_ok

bool FlashTest::erase_ok
private

Definition at line 42 of file FlashTest.cpp.

Referenced by flash_erase_ok(), setup(), and write().

◆ flash

uint8_t FlashTest::flash[2][flash_sector_size]
private

Definition at line 25 of file FlashTest.cpp.

Referenced by flash_erase(), flash_read(), and flash_write().

◆ flash_sector_size

const uint32_t FlashTest::flash_sector_size = 32U * 1024U
staticprivate

Definition at line 19 of file FlashTest.cpp.

Referenced by flash_erase(), flash_read(), and flash_write().

◆ mem_buffer

uint8_t FlashTest::mem_buffer[AP_FlashStorage::storage_size]
private

Definition at line 21 of file FlashTest.cpp.

Referenced by setup(), and write().

◆ mem_mirror

uint8_t FlashTest::mem_mirror[AP_FlashStorage::storage_size]
private

Definition at line 22 of file FlashTest.cpp.

Referenced by setup(), and write().

◆ storage

AP_FlashStorage FlashTest::storage
private
Initial value:
FUNCTOR_BIND_MEMBER(&FlashTest::flash_write, bool, uint8_t, uint32_t, const uint8_t *, uint16_t),
FUNCTOR_BIND_MEMBER(&FlashTest::flash_read, bool, uint8_t, uint32_t, uint8_t *, uint16_t),

Definition at line 32 of file FlashTest.cpp.

Referenced by setup(), and write().


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