-
Notifications
You must be signed in to change notification settings - Fork 0
/
btnmr.h
61 lines (46 loc) · 1.12 KB
/
btnmr.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//
// Header Guard
//
#ifndef BTNMR_H
#define BTNMR_H
//
// C Binding for C++ Compilers
//
#ifdef __cplusplus
extern "C"
{
#endif
//*********************************************************************************
// Macros and Globals
//*********************************************************************************
#define APP_SYSTICKS_PER_SEC 1000
#define APP_BUTTON_POLL_DIVIDER_MODE_SELECT 5000
#define APP_BUTTON_POLL_DIVIDER_UP_DOWN 100
#define APP_BUTTON_POLL_DIVIDER_R_L 400
typedef enum
{
NONE,
UP,
DOWN,
RIGHT,
LEFT
}btn_t;
typedef struct
{
btn_t btnpressed;
bool EditFlag;
}btnstatus_t;
typedef enum {HOUR=1, MIN, DAY, MONTH, YEAR, RADIUS, LENGTH}cursor_t;
//*********************************************************************************
// Prototypes
//*********************************************************************************
void BtnMr_Init(void);
void BtnMr( cursor_t * cursor_ptr, int * counter_ptr, bool * EditFlag_ptr);
void xGetButtonState( btnstatus_t * btnstatus );
//
// End of C Binding
//
#ifdef __cplusplus
}
#endif
#endif // BTNMR_H