~aleteoryx/muditaos

ref: 3511e64a9104ff9e7995746329f69f0ef8bb2e37 muditaos/module-bsp/hal/temperature_source/TemperatureSource.hpp -rw-r--r-- 426 bytes
3511e64a — Mateusz Piesta [BH-789] Add thermometer interface 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

#include <optional>

namespace bsp::hal
{
    class TemperatureSource
    {
      public:
        using Temperature     = float; ///< Celsius degrees
        using Result          = std::optional<Temperature>;
        virtual Result read() = 0;
    };
} // namespace bsp::hal