Debounce a value on a given time base.
More...
#include <debouncer.hpp>
template<typename T, T(*)(void) poll_func, unsigned(*)(void) time_func, unsigned int time_freq, unsigned wait_time_ms = 50>
class debouncer< T, poll_func, time_func, time_freq, wait_time_ms >
NOTE: time_func() must return a growing value!
◆ debouncer()
template<typename T , T(*)(void) poll_func, unsigned(*)(void) time_func, unsigned int time_freq, unsigned wait_time_ms = 50>
◆ get()
template<typename T , T(*)(void) poll_func, unsigned(*)(void) time_func, unsigned int time_freq, unsigned wait_time_ms = 50>
T debouncer< T, poll_func, time_func, time_freq, wait_time_ms >::get |
( |
void |
| ) |
const |
|
inline |
◆ operator T()
template<typename T , T(*)(void) poll_func, unsigned(*)(void) time_func, unsigned int time_freq, unsigned wait_time_ms = 50>
debouncer< T, poll_func, time_func, time_freq, wait_time_ms >::operator T |
( |
| ) |
const |
|
inline |
◆ poll()
template<typename T , T(*)(void) poll_func, unsigned(*)(void) time_func, unsigned int time_freq, unsigned wait_time_ms = 50>
bool debouncer< T, poll_func, time_func, time_freq, wait_time_ms >::poll |
( |
void |
| ) |
|
|
inline |
Returns true if the value has changed.
The documentation for this class was generated from the following file: