~aleteoryx/muditaos

ref: 255d03a5da8506d06667d26c79f44ec6ca774961 muditaos/module-services/service-evtmgr/api/torch.cpp -rw-r--r-- 419 bytes
255d03a5 — Lefucjusz [MOS-677] Fix crash on importing unprocessable contact 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "service-evtmgr/torch.hpp"
#include "bsp/torch/torch.hpp"

// Static API for torch

namespace event::service::api
{
    bool isTorchOn()
    {
        auto isOn = bsp::torch::getState();
        return isOn == bsp::torch::State::on;
    }
} // namespace event::service::api