~aleteoryx/muditaos

ref: e747fb15de6dd1ba37b8be2500f1a45a19027ae3 muditaos/module-bsp/board/rt1051/puretx/hal/key_input/KeyInput.cpp -rw-r--r-- 1010 bytes
e747fb15 — Adam Dobrowolski [EGD-8032] Changed image compression to multithreaded one 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
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "KeyInput.hpp"

#include <hal/GenericFactory.hpp>
#include <bsp/keyboard/keyboard.hpp>

namespace hal::key_input
{
    std::shared_ptr<AbstractKeyInput> AbstractKeyInput::Factory::create()
    {
        return hal::impl::factory<KeyInput, AbstractKeyInput>();
    }

    void KeyInput::init(xQueueHandle queueHandle)
    {
        bsp::keyboard::init(queueHandle);
    }

    void KeyInput::deinit()
    {
        bsp::keyboard::deinit();
    }

    std::vector<bsp::KeyEvent> KeyInput::getKeyEvents(KeyNotificationSource notification)
    {
        return bsp::keyboard::getKeyEvents(notification);
    }

    BaseType_t generalIRQHandler(std::uint32_t irqMask)
    {
        return bsp::keyboard::IRQHandler();
    }

    BaseType_t rightFunctionalIRQHandler()
    {
        return bsp::keyboard::rightFunctionalIRQHandler();
    }

} // namespace hal::key_input