#include <mock_power_management.h>
◆ acquirePerformance()
Acquire a temporary CPU/APB minimum for latency-sensitive work.
- Parameters
-
| profile | Workload class selecting the platform's performance guarantee. |
| reason | Short diagnostic label paired with releasePerformance(). |
- Returns
- False when the profile is unsupported or the platform lock failed.
Implements ersa::hal::IPowerManagement.
◆ allowAutomaticSleep()
| void ersa::test::MockPowerManagement::allowAutomaticSleep |
( |
bool |
allow | ) |
|
|
inlineoverridevirtual |
Permit FreeRTOS automatic sleep when true; false holds the platform's no-light-sleep guard for display, network, USB, or active interaction.
Implements ersa::hal::IPowerManagement.
◆ enterDeepSleep()
| void ersa::test::MockPowerManagement::enterDeepSleep |
( |
uint64_t |
timerUs | ) |
|
|
inlineoverridevirtual |
Enter deep sleep after configuring enabled GPIO/timer sources. This normally restarts firmware on wake, unlike light sleep.
Implements ersa::hal::IPowerManagement.
◆ getPowerModeReport()
| bool ersa::test::MockPowerManagement::getPowerModeReport |
( |
char * |
buffer, |
|
|
size_t |
capacity |
|
) |
| |
|
inlineoverridevirtual |
◆ initialize()
| bool ersa::test::MockPowerManagement::initialize |
( |
| ) |
|
|
inlineoverridevirtual |
◆ initializeWakeSources()
| bool ersa::test::MockPowerManagement::initializeWakeSources |
( |
const board::Pins & |
pins | ) |
|
|
inlineoverridevirtual |
◆ notifyWake()
| void ersa::test::MockPowerManagement::notifyWake |
( |
| ) |
|
|
inlineoverridevirtual |
◆ releasePerformance()
◆ reportPowerModes()
| void ersa::test::MockPowerManagement::reportPowerModes |
( |
| ) |
|
|
inlineoverridevirtual |
◆ setTestCpuFrequencyMHz()
| bool ersa::test::MockPowerManagement::setTestCpuFrequencyMHz |
( |
unsigned |
mhz | ) |
|
|
inlineoverridevirtual |
◆ testCpuFrequencyMHz()
| unsigned ersa::test::MockPowerManagement::testCpuFrequencyMHz |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ tick()
| void ersa::test::MockPowerManagement::tick |
( |
| ) |
|
|
inlineoverridevirtual |
◆ waitForWake()
| void ersa::test::MockPowerManagement::waitForWake |
( |
uint32_t |
timeoutMs | ) |
|
|
inlineoverridevirtual |
◆ lastDeepSleepUs
| uint64_t ersa::test::MockPowerManagement::lastDeepSleepUs {0} |
◆ lastWaitMs
| uint32_t ersa::test::MockPowerManagement::lastWaitMs {0} |
◆ performanceAcquires
| uint32_t ersa::test::MockPowerManagement::performanceAcquires {0} |
◆ performanceReleases
| uint32_t ersa::test::MockPowerManagement::performanceReleases {0} |
◆ sleepAllowed
| bool ersa::test::MockPowerManagement::sleepAllowed {false} |
◆ testMHz
| unsigned ersa::test::MockPowerManagement::testMHz {0} |
◆ wakeNotifications
| uint32_t ersa::test::MockPowerManagement::wakeNotifications {0} |
◆ wakeSourcesInitialized
| bool ersa::test::MockPowerManagement::wakeSourcesInitialized {false} |
The documentation for this class was generated from the following file: