forked from toniebox-reverse-engineering/hackiebox_cfw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BoxButtonEars.h
34 lines (25 loc) · 864 Bytes
/
BoxButtonEars.h
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
27
28
29
30
31
32
33
34
#ifndef BoxButtonEars_h
#define BoxButtonEars_h
#include "BaseHeader.h"
#include "JC_Button.h"
#include <EnhancedThread.h>
class BoxButtonEars : public EnhancedThread {
public:
enum class PressedTime { NOT, SHORT, LONG, VERY_LONG };
enum class EarButton { NONE, SMALL, BIG, BOTH };
enum class PressedType { NONE, PRESS, RELEASE };
void
begin(),
loop(),
reloadConfig(),
waitForRelease();
private:
uint16_t _earLongPressMs;
uint16_t _earVeryLongPressMs;
PressedTime _earSmallPressedTime = PressedTime::NOT;
PressedTime _earBigPressedTime = PressedTime::NOT;
PressedTime _earBothPressedTime = PressedTime::NOT;
Button _earSmall = Button(59, 25, false, true);
Button _earBig = Button(57, 25, false, true);
};
#endif