Merge pull request #1269 from pkendall64/crsf-max-output
[ExpressLRS.git] / src / lib / SCREEN / FiveWayButton / FiveWayButton.h
blobc0bc557743589ec51660e1a0b9a2089b8d952b11
1 #pragma once
3 #include "targets.h"
5 typedef enum
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;
15 class FiveWayButton
17 private:
18 int key_state;
19 bool keyPressed;
20 bool isLongPressed;
22 public:
24 void init();
25 void handle();
27 void getKeyState(int *keyValue, bool *keyLongPressed);
28 void clearKeyState();