mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-01-21 04:18:08 -05:00
* Added mechanism enabling CPU to enter WFI mode when the OS is in idle, what results in large power consumption reduction. * Added mechanism to switch SDRAM to self-refresh mode before entering WFI, what resulted in further power consumption reduction.
31 lines
962 B
C++
31 lines
962 B
C++
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include "bsp/lpm/bsp_lpm.hpp"
|
|
|
|
namespace bsp
|
|
{
|
|
class LinuxLPM : public LowPowerMode
|
|
{
|
|
public:
|
|
std::int32_t PowerOff() override final;
|
|
std::int32_t Reboot(RebootType reason) override final;
|
|
void SetCpuFrequency(CpuFrequencyMHz freq) final;
|
|
[[nodiscard]] std::uint32_t GetCpuFrequency() const noexcept final;
|
|
void SwitchOscillatorSource(OscillatorSource source) final;
|
|
|
|
void EnableDcdcPowerSaveMode() final;
|
|
void DisableDcdcPowerSaveMode() final;
|
|
|
|
void AllowEnteringWfiMode() final;
|
|
void BlockEnteringWfiMode() final;
|
|
std::uint32_t EnterWfiModeIfAllowed() final;
|
|
std::uint32_t GetLastTimeSpentInWfi() final;
|
|
|
|
void DisableSysTick() final;
|
|
void EnableSysTick() final;
|
|
};
|
|
} // namespace bsp
|