~aleteoryx/muditaos

ref: 981f9583aecb53fc50d75b0eaa689d1b1b1839fc muditaos/module-bsp/bsp/lpm/bsp_lpm.cpp -rw-r--r-- 570 bytes
981f9583 — mkamonMdt [EGD-4828] Add GUI tests for DOM flow 5 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
#include "bsp_lpm.hpp"


#if defined(TARGET_RT1051)
#include "board/rt1051/bsp/lpm/RT1051LPM.hpp"
#elif defined(TARGET_Linux)
#include "board/linux/lpm/LinuxLPM.h"
#else
#error "Unsupported target"
#endif

namespace bsp{

    std::optional<std::unique_ptr<LowPowerMode>> LowPowerMode::Create() {

        std::unique_ptr<LowPowerMode> inst;

#if defined(TARGET_RT1051)
        inst = std::make_unique<bsp::RT1051LPM>();
#elif defined(TARGET_Linux)
        inst = std::make_unique<bsp::LinuxLPM>();
#else
#error "Unsupported target"
#endif

        return inst;
    }

}