|
Embedded Template Library 1.0
|
Public Types | |
| typedef uint_least8_t | flags_t |
| typedef uint16_t | count_t |
Public Member Functions | |
| void | add_sample (bool sample) |
| bool | has_changed () const |
| bool | is_set () const |
| bool | is_held () const |
| bool | is_repeating () const |
Protected Types | |
| enum | states { Off = 0 , On = 1 , Held = 2 , Repeating = 3 , State = 0x03U , Sample = 4 , Change = 8 } |
Protected Attributes | |
| flags_t | flags |
| count_t | count |
|
inline |
Adds the new sample and clears the state change flag. If the sample has changed then the counter is reset. The last sample state is stored as a bit in the flags.
|
inline |
Gets the current debouncer change state.
|
inline |
Gets the debouncer hold state.
|
inline |
Gets the debouncer repeat state.
|
inline |
Gets the current debouncer state.