fremoclock  1_3A01
FREMO Clock - Software for UTG
PushButton.h
Go to the documentation of this file.
1 
23 #ifndef PUSH_BUTTON_
24 #define PUSH_BUTTON_
25 
26 #include <stdbool.h> // typedef bool
27 #include <stdint.h> // typedef uint8_t
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 /* -- Function prototypes for push buttons ---------------------------------- */
34 
35 // for comments see PushButton.c
36 
37 void PushButtonInit(void);
38 
39 bool PushButtonSingleShotEnter(void);
40 bool PushButtonSingleShotBack(void);
41 bool PushButtonSingleShotUp(void);
42 bool PushButtonSingleShotDown(void);
43 uint8_t PushButtonGetUpDownValue(uint8_t ucbut, uint8_t ucmin, uint8_t ucmax);
44 
45 void PushButtonInterrupt(void);
46 
47 #ifdef __cplusplus
48 }
49 #endif
50 
51 #endif /* PUSH_BUTTON_ */
uint8_t PushButtonGetUpDownValue(uint8_t ucbut, uint8_t ucmin, uint8_t ucmax)
Get selection value by up and down button.
Definition: PushButton.c:217
void PushButtonInit(void)
Initialization of module.
Definition: PushButton.c:92
bool PushButtonSingleShotEnter(void)
Test if button enter is pressed.
Definition: PushButton.c:147
bool PushButtonSingleShotDown(void)
Test if button down is pressed.
Definition: PushButton.c:180
bool PushButtonSingleShotBack(void)
Test if button back is pressed.
Definition: PushButton.c:158
bool PushButtonSingleShotUp(void)
Test if button up is pressed.
Definition: PushButton.c:169
void PushButtonInterrupt(void)
Called by timer interrupt every 10ms.
Definition: PushButton.c:292