Files
MuditaOS/module-sys/SystemManager/PowerManager.hpp
Radoslaw Wicik a8573a404c Apply new style
2020-03-17 10:03:16 +01:00

53 lines
905 B
C++

/*
* @file PowerManager.hpp
* @author Mateusz Piesta (mateusz.piesta@mudita.com)
* @date 12.09.19
* @brief
* @copyright Copyright (C) 2019 mudita.com
* @details
*/
#ifndef PUREPHONE_POWERMANAGER_HPP
#define PUREPHONE_POWERMANAGER_HPP
#include <functional>
#include "bsp/lpm/bsp_lpm.hpp"
namespace sys
{
class PowerManager
{
public:
enum class Mode
{
FullSpeed,
LowPowerRun,
LowPowerIdle,
Suspend
};
PowerManager();
~PowerManager();
int32_t Switch(const Mode mode);
int32_t PowerOff();
Mode GetCurrentMode()
{
return currentPowerMode;
}
private:
std::unique_ptr<bsp::LowPowerMode> lowPowerControl;
Mode currentPowerMode = Mode ::FullSpeed;
};
} // namespace sys
#endif // PUREPHONE_POWERMANAGER_HPP