Fork of Tangara with customizations
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.
tangara-fw/src/input/input_volume_buttons.cpp

27 lines
571 B

/*
* 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