Class OpenSkyhawk::Pdu::CalStore
ClassList > OpenSkyhawk > Pdu > CalStore
The reserved flash page holding the calibration log.
#include <PduCalStore.h>
Public Functions
| Type | Name |
|---|---|
| CalStore (uint32_t pageAddr=0x0800FC00UL) |
|
| bool | erase () Erase the whole page — back to uncalibrated. |
| bool | load (CalRecord & out) const Newest valid record into out . |
| bool | save (CalRecord & rec) Append rec (sealed here, seq = previous + 1); erases the page first when full. |
| uint8_t | usedSlots () const Slots holding a record (valid or not) — 0..CAL_SLOTS. |
Public Functions Documentation
function CalStore
inline explicit OpenSkyhawk::Pdu::CalStore::CalStore (
uint32_t pageAddr=0x0800FC00UL
)
function erase
Erase the whole page — back to uncalibrated.
bool OpenSkyhawk::Pdu::CalStore::erase ()
function load
Newest valid record into out .
bool OpenSkyhawk::Pdu::CalStore::load (
CalRecord & out
) const
Returns:
false (out = calDefaults()) when none.
function save
Append rec (sealed here, seq = previous + 1); erases the page first when full.
bool OpenSkyhawk::Pdu::CalStore::save (
CalRecord & rec
)
Returns:
true when the written slot reads back valid.
function usedSlots
Slots holding a record (valid or not) — 0..CAL_SLOTS.
uint8_t OpenSkyhawk::Pdu::CalStore::usedSlots () const
The documentation for this class was generated from the following file Firmware/Libraries/PowerMonitor/PduCalStore.h