repo.or.cz
/
ExpressLRS.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge pull request #1269 from pkendall64/crsf-max-output
[ExpressLRS.git]
/
src
/
lib
/
SCREEN
/
FiveWayButton
/
FiveWayButton.h
blob
c0bc557743589ec51660e1a0b9a2089b8d952b11
1
#pragma once
2
3
#include
"targets.h"
4
5
typedef
enum
6
{
7
INPUT_KEY_LEFT_PRESS
=
2
,
8
INPUT_KEY_UP_PRESS
=
3
,
9
INPUT_KEY_RIGHT_PRESS
=
4
,
10
INPUT_KEY_DOWN_PRESS
=
5
,
11
INPUT_KEY_OK_PRESS
=
6
,
12
INPUT_KEY_NO_PRESS
=
7
13
}
Input_Key_Value_t
;
14
15
class
FiveWayButton
16
{
17
private
:
18
int
key_state
;
19
bool
keyPressed
;
20
bool
isLongPressed
;
21
22
public
:
23
24
void
init
();
25
void
handle
();
26
27
void
getKeyState
(
int
*
keyValue
,
bool
*
keyLongPressed
);
28
void
clearKeyState
();
29
};