You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
759 B
41 lines
759 B
1 year ago
|
/*
|
||
|
* Copyright 2024 jacqueline <me@jacqueline.id.au>
|
||
|
*
|
||
|
* SPDX-License-Identifier: GPL-3.0-only
|
||
|
*/
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include <cstdint>
|
||
|
|
||
|
#include "hal/lv_hal_indev.h"
|
||
|
|
||
|
#include "haptics.hpp"
|
||
|
#include "input_device.hpp"
|
||
1 year ago
|
#include "input_hook.hpp"
|
||
1 year ago
|
#include "input_trigger.hpp"
|
||
1 year ago
|
#include "touchwheel.hpp"
|
||
|
|
||
|
namespace input {
|
||
|
|
||
|
class TouchDPad : public IInputDevice {
|
||
|
public:
|
||
|
TouchDPad(drivers::TouchWheel&);
|
||
|
|
||
|
auto read(lv_indev_data_t* data) -> void override;
|
||
|
|
||
1 year ago
|
auto name() -> std::string override;
|
||
1 year ago
|
auto triggers() -> std::vector<std::reference_wrapper<TriggerHooks>> override;
|
||
1 year ago
|
|
||
1 year ago
|
private:
|
||
|
drivers::TouchWheel& wheel_;
|
||
1 year ago
|
|
||
1 year ago
|
TriggerHooks centre_;
|
||
|
TriggerHooks up_;
|
||
|
TriggerHooks right_;
|
||
|
TriggerHooks down_;
|
||
|
TriggerHooks left_;
|
||
1 year ago
|
};
|
||
|
|
||
|
} // namespace input
|