// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include "bsp_lpm.hpp" #if defined(TARGET_RT1051) #include #elif defined(TARGET_Linux) #include "board/linux/lpm/LinuxLPM.h" #else #error "Unsupported target" #endif namespace bsp{ std::optional> LowPowerMode::Create() { std::unique_ptr inst; #if defined(TARGET_RT1051) inst = std::make_unique(); #elif defined(TARGET_Linux) inst = std::make_unique(); #else #error "Unsupported target" #endif return inst; } CpuFrequencyMHz LowPowerMode::GetCurrentFrequencyLevel() const noexcept { return currentFrequency; } }