~aleteoryx/muditaos

ref: d63580e17b26d4560d81bf14eaedc0a6bb70b8ba muditaos/module-bsp/bsp/keypad_backlight/keypad_backlight.hpp -rw-r--r-- 815 bytes
d63580e1 — Marek Niepieklo [EGD-7997] MTP is not deinitialized properly 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once
#include <cstdint>

namespace bsp::keypad_backlight
{
    enum class Action
    {
        turnOff,
        turnOnActiveMode,
        turnOn,
        turnOnCallMode,
        turnOffCallMode,
        checkState,
    };

    enum class State
    {
        off,
        activeMode,
        on
    };

    using DiodeIntensity = float;

    std::int32_t init();

    void deinit();

    bool turnOnAll();

    bool turnOnFunctionKeysBacklight();

    bool turnOnNumericKeysBacklight();

    bool configureModule(std::uint8_t enablesRegisterValue);

    bool shutdown();

    void wakeup();

    bool reset();

    bool checkState();

} // namespace bsp::keypad_backlight