Files
MuditaOS/module-bsp/board/linux/lpm/LinuxLPM.h
Lefucjusz 32c6769cb6 [BH-1657][BH-1833][BH-1854] Add WFI and SDRAM self-refresh mode
* 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.
2024-01-22 12:32:35 +01:00

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