forked from neskweek/LightSaberOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Buttons.h
40 lines (31 loc) · 1.09 KB
/
Buttons.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
35
36
37
38
39
40
/*
* Buttons.h
*
* Created on: 6 mars 2016
* author: Sebastien CAPOU (neskweek@gmail.com)
* Source : https://github.com/neskweek/LightSaberOS
*/
#include <Arduino.h>
#if not defined BUTTONS_H_
#define BUTTONS_H_
/*
* BUTTONS PARAMETERS
************************************/
#define CLICK 5 // ms you need to press a button to be a click
#define PRESS_ACTION 200 // ms you need to press a button to be a long press, in action mode
#define PRESS_CONFIG 400 // ms you need to press a button to be a long press, in config mode
/************************************/
// ====================================================================================
// === BUTTONS CALLBACK FUNCTIONS ===
// ====================================================================================
void mainClick();
void mainDoubleClick();
void mainLongPressStart();
void mainLongPress();
void mainLongPressStop();
void lockupClick();
void lockupDoubleClick();
void lockupLongPressStart();
void lockupLongPress();
void lockupLongPressStop();
#endif /* BUTTONS_H_ */