fremoclock
1_3A01
FREMO Clock - Software for UTG
|
Push button debouncing module for Atmel AVR. More...
Go to the source code of this file.
Functions | |
void | PushButtonInit (void) |
Initialization of module. More... | |
bool | PushButtonSingleShotEnter (void) |
Test if button enter is pressed. More... | |
bool | PushButtonSingleShotBack (void) |
Test if button back is pressed. More... | |
bool | PushButtonSingleShotUp (void) |
Test if button up is pressed. More... | |
bool | PushButtonSingleShotDown (void) |
Test if button down is pressed. More... | |
uint8_t | PushButtonGetUpDownValue (uint8_t ucbut, uint8_t ucmin, uint8_t ucmax) |
Get selection value by up and down button. More... | |
void | PushButtonInterrupt (void) |
Called by timer interrupt every 10ms. More... | |
Push button debouncing module for Atmel AVR.
Supplies debouncing for push buttons incl. autorepeat.
History:
Definition in file PushButton.h.
uint8_t PushButtonGetUpDownValue | ( | uint8_t | ucbut, |
uint8_t | ucmin, | ||
uint8_t | ucmax | ||
) |
Get selection value by up and down button.
ucbut | current value |
ucmin | minimal allowed value |
ucmax | amximal allowd value |
Definition at line 217 of file PushButton.c.
void PushButtonInit | ( | void | ) |
Initialization of module.
Call once in main after start.
Definition at line 92 of file PushButton.c.
void PushButtonInterrupt | ( | void | ) |
Called by timer interrupt every 10ms.
Runs with global interrupts disabled. Read the ports used by push buttons and increment uiButtonDebounce when pressed. Update ucButtonStatus when uiButtonDebounce reaches BUTTON_PRESSED_VALUE or BUTTON_REPEAT_VALUE.
Definition at line 292 of file PushButton.c.
bool PushButtonSingleShotBack | ( | void | ) |
Test if button back is pressed.
Definition at line 158 of file PushButton.c.
bool PushButtonSingleShotDown | ( | void | ) |
Test if button down is pressed.
Definition at line 180 of file PushButton.c.
bool PushButtonSingleShotEnter | ( | void | ) |
Test if button enter is pressed.
Definition at line 147 of file PushButton.c.
bool PushButtonSingleShotUp | ( | void | ) |
Test if button up is pressed.
Definition at line 169 of file PushButton.c.