#include <mock_rtc.h>
◆ MockRtc()
| ersa::test::MockRtc::MockRtc |
( |
uint32_t |
epoch = 1790535111 | ) |
|
|
inlineexplicit |
◆ adjust()
Write explicit calendar fields and report bus/chip failures.
Implements ersa::hal::IRtc.
◆ advanceMinutes()
| void ersa::test::MockRtc::advanceMinutes |
( |
uint32_t |
min | ) |
|
|
inline |
◆ advanceSeconds()
| void ersa::test::MockRtc::advanceSeconds |
( |
uint32_t |
sec | ) |
|
|
inline |
◆ init()
| Result< void > ersa::test::MockRtc::init |
( |
| ) |
|
|
inlineoverridevirtual |
Initialize the chip/bus and verify that calendar reads are plausible.
Implements ersa::hal::IRtc.
◆ isHealthy()
| bool ersa::test::MockRtc::isHealthy |
( |
| ) |
const |
|
inlineoverridevirtual |
Report backend health; this does not guarantee the wall time is accurate.
Implements ersa::hal::IRtc.
◆ now()
Return a calendar snapshot; the implementation may derive epoch fields.
Implements ersa::hal::IRtc.
◆ setEpoch()
| Result< void > ersa::test::MockRtc::setEpoch |
( |
uint32_t |
epochSeconds | ) |
|
|
inlineoverridevirtual |
Convert and write epoch seconds without exposing a chip-specific date type.
Implements ersa::hal::IRtc.
◆ setHealthy()
| void ersa::test::MockRtc::setHealthy |
( |
bool |
h | ) |
|
|
inline |
◆ epoch_
| uint32_t ersa::test::MockRtc::epoch_ {0} |
|
private |
◆ healthy_
| bool ersa::test::MockRtc::healthy_ {true} |
|
private |
The documentation for this class was generated from the following file: