blob: bf79ed558751672ba8aaebd2e0b9346068c0917b (
plain)
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
|
/*
* Copyright 2024 jacqueline <me@jacqueline.id.au>
*
* SPDX-License-Identifier: GPL-3.0-only
*/
#include "input_volume_buttons.hpp"
#include "gpios.hpp"
namespace input {
VolumeButtons::VolumeButtons(drivers::IGpios& gpios) : gpios_(gpios) {}
auto VolumeButtons::read(lv_indev_data_t* data) -> void {
bool vol_up = gpios_.Get(drivers::IGpios::Pin::kKeyUp);
if (!vol_up) {
ESP_LOGI("volume", "vol up");
}
bool vol_down = gpios_.Get(drivers::IGpios::Pin::kKeyDown);
if (!vol_down) {
ESP_LOGI("volume", "vol down");
}
}
} // namespace input
|