Button implementation. More...
Go to the source code of this file.
Macros | |
#define | BUT_SW0BIT BIT2 |
Bit on with switch 0 is wired, port 1.2. | |
Typedefs | |
typedef enum but_state | but_state |
States for the button control. | |
Enumerations | |
enum | but_state { BUT_S_IDLE, BUT_S_PRESSED, BUT_S_DEBOUNCE } |
States for the button control. More... | |
Functions | |
void | but_init () |
This function initializes the button control variables. More... | |
UInt16 | but_proccess () |
This function processes the tasks of the button control. More... | |
void | but_clearPending () |
This function clear pending button presses. | |
UInt8 | but_getPending () |
This function get number of button presses on the time window. More... | |
void | BUT_ISR () |
Button Interrupt Service Request on port 1. More... | |
Variables | |
but_state | but_currentState = BUT_S_IDLE |
Current state of the button control. More... | |
UInt32 | but_presses |
Button presses over time, one bit for each press, shift left over time. | |
UInt8 | but_pendingPress |
Number of button presses, it is cleared by but_clearPending. | |
Button implementation.
Process button presses and store the count on an interval.
Definition in file but.c.
enum but_state |
but_state but_currentState = BUT_S_IDLE |
Current state of the button control.
Definition at line 83 of file but.c.
Referenced by but_init(), BUT_ISR(), and but_proccess().