~aleteoryx/muditaos

ref: b355d5ce007a02f551f9d897f0dcbc20b76464f2 muditaos/module-bsp/board/linux/keypad_backlight/keypad_backlight.cpp -rw-r--r-- 915 bytes
b355d5ce — Marcin Smoczyński [BH-733] Cleanup target dependencies 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
49
50
51
52
53
54
55
56
57
58
59
60
61
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "bsp/keypad_backlight/keypad_backlight.hpp"

namespace bsp::keypad_backlight
{
    namespace
    {
        bool diodesState = false;
    }

    std::int32_t init()
    {
        return 0;
    }

    void deinit()
    {}

    bool turnOnAll()
    {
        diodesState = true;
        return true;
    }

    bool turnOnFunctionKeysBacklight()
    {
        return true;
    }

    bool turnOnNumericKeysBacklight()
    {
        return true;
    }

    bool configureModule()
    {
        return true;
    }

    bool shutdown()
    {
        diodesState = false;
        return true;
    }

    void wakeup()
    {}

    bool reset()
    {
        return true;
    }

    bool checkState()
    {
        return diodesState;
    }

} // namespace bsp::keypad_backlight