From ed82063af5f83530afa5cfb5bf5bd516f3d05f2a Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 10 Apr 2024 16:56:10 +1000 Subject: WIP decompose our giant LVGL driver into smaller classes --- src/input/include/input_volume_buttons.hpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/input/include/input_volume_buttons.hpp (limited to 'src/input/include/input_volume_buttons.hpp') diff --git a/src/input/include/input_volume_buttons.hpp b/src/input/include/input_volume_buttons.hpp new file mode 100644 index 00000000..4ca8c16b --- /dev/null +++ b/src/input/include/input_volume_buttons.hpp @@ -0,0 +1,30 @@ +/* + * Copyright 2024 jacqueline + * + * SPDX-License-Identifier: GPL-3.0-only + */ + +#pragma once + +#include + +#include "gpios.hpp" +#include "hal/lv_hal_indev.h" + +#include "haptics.hpp" +#include "input_device.hpp" +#include "touchwheel.hpp" + +namespace input { + +class VolumeButtons : public IInputDevice { + public: + VolumeButtons(drivers::IGpios&); + + auto read(lv_indev_data_t* data) -> void override; + + private: + drivers::IGpios& gpios_; +}; + +} // namespace input -- cgit v1.2.3 From 33919e9e3f419e13318fa6b8217d8c8dcd86c1eb Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 11 Apr 2024 15:16:35 +1000 Subject: Migrate all existing control schemes to the cool new world --- src/input/include/input_volume_buttons.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/input/include/input_volume_buttons.hpp') diff --git a/src/input/include/input_volume_buttons.hpp b/src/input/include/input_volume_buttons.hpp index 4ca8c16b..162ca8d9 100644 --- a/src/input/include/input_volume_buttons.hpp +++ b/src/input/include/input_volume_buttons.hpp @@ -13,6 +13,7 @@ #include "haptics.hpp" #include "input_device.hpp" +#include "input_trigger.hpp" #include "touchwheel.hpp" namespace input { @@ -25,6 +26,9 @@ class VolumeButtons : public IInputDevice { private: drivers::IGpios& gpios_; + + Trigger up_; + Trigger down_; }; } // namespace input -- cgit v1.2.3