Files
MuditaOS/module-bsp/hal/key_input/AbstractKeyInput.hpp
Wojtek Rzepecki a4a5a09c30 [BH-826] Add key input abstraction layer
Added abstraction layer for key input HAL
to provide elastic structure
2021-09-02 16:28:41 +02:00

34 lines
838 B
C++

// 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 "KeyEventDefinitions.hpp"
#include <FreeRTOS.h>
#include <queue.h>
#include <memory>
#include <vector>
namespace hal::key_input
{
class AbstractKeyInput
{
public:
struct Factory
{
static std::shared_ptr<AbstractKeyInput> create();
};
virtual ~AbstractKeyInput() = default;
virtual void init(xQueueHandle) = 0;
virtual void deinit() = 0;
virtual std::vector<bsp::KeyEvent> getKeyEvents(std::uint8_t) = 0;
};
BaseType_t generalIRQHandler();
BaseType_t rightFunctionalIRQHandler();
} // namespace hal::key_input