Files
mt32-pi/include/control/button.h
Dale Whinham 71fa6533af Implement volume button hold/repeat with delay
Improve the button handling code so that a pressed and held button will
now generate additional press events after a short delay.

An acceleration curve is also applied so that events are generated with
increasing frequency the longer the button is held down.

Closes #323.
2023-02-06 20:36:10 +00:00

41 lines
967 B
C

//
// button.h
//
// mt32-pi - A baremetal MIDI synthesizer for Raspberry Pi
// Copyright (C) 2020-2023 Dale Whinham <daleyo@gmail.com>
//
// This file is part of mt32-pi.
//
// mt32-pi is free software: you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the Free Software
// Foundation, either version 3 of the License, or (at your option) any later
// version.
//
// mt32-pi is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// mt32-pi. If not, see <http://www.gnu.org/licenses/>.
//
#ifndef _button_h
#define _button_h
#include <circle/types.h>
enum TButton : u8
{
Button1,
Button2,
Button3,
Button4,
EncoderButton,
Max,
};
#endif