~aleteoryx/muditaos

ref: 8b50f65a79f51bc712fc22c99c5c96f5421c1792 muditaos/module-bsp/board/linux/lpm/LinuxLPM.h -rw-r--r-- 842 bytes
8b50f65a — mkamonMdt [BH-828] PowerNap progress implementation 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#ifndef PUREPHONE_LINUXLPM_H
#define PUREPHONE_LINUXLPM_H

#include "bsp/lpm/bsp_lpm.hpp"

namespace bsp
{

    class LinuxLPM : public LowPowerMode
    {
      public:
        int32_t PowerOff() override final;
        int32_t Reboot(RebootType reason) override final;
        void SetCpuFrequency(CpuFrequencyHz freq) final;
        void SetHighestCoreVoltage() final;
        [[nodiscard]] uint32_t GetCpuFrequency() const noexcept final;
        void SwitchOscillatorSource(OscillatorSource source) final;
        void SetBootSuccess() override;

        void EnableDcdcPowerSaveMode() final;
        void DisableDcdcPowerSaveMode() final;
    };

} // namespace bsp

#endif // PUREPHONE_LINUXLPM_H