Loading...
Searching...
No Matches
etl::debounce< 0, 0, 0 > Class Reference

`#include <debounce.h>`

## Public Member Functions

| debounce (bool initial_state=false)
| debounce (count_t valid, count_t hold=0, count_t repeat=0)
void | set (count_t valid, count_t hold=0, count_t repeat=0)
| Constructor.
bool | add (bool sample)
Public Member Functions inherited from etl::private_debounce::debounce_base
void | add_sample (bool sample)
bool | has_changed () const
bool | is_set () const
bool | is_held () const
bool | is_repeating () const

## Additional Inherited Members

Public Types inherited from etl::private_debounce::debounce_base
typedef uint_least8_t | flags_t
typedef uint16_t | count_t
Protected Types inherited from etl::private_debounce::debounce_base
enum | states { Off = 0 , On = 1 , Held = 2 , Repeating = 3 , State = 0x03U , Sample = 4 , Change = 8 }
Protected Member Functions inherited from etl::private_debounce::debounce4
| debounce4 (bool initial_state)
| ~debounce4 ()
| Destructor.
void | set_state (bool sample, bool condition_set, bool condition_clear)
bool | process (bool sample, count_t valid_count, count_t hold_count, count_t repeat_count)
Protected Member Functions inherited from etl::private_debounce::debounce_base
| debounce_base (bool initial_state)
| Constructor.
| ~debounce_base ()
| Destructor.
void | get_next (bool sample, bool condition_set, bool condition_clear, const uint_least8_t state_table[][2])
| Gets the next state based on the inputs.
Protected Attributes inherited from etl::private_debounce::debounce_base
flags_t | flags
count_t | count

## Detailed Description

A class to debounce signals. Variable Valid/Hold/Repeating values.

## Constructor & Destructor Documentation

## debounce() [1/2]

etl::debounce< 0, 0, 0 >::debounce | ( | bool | initial_state = false | ) |

inline

Constructor.

Parameters

  initial_state | The initial state. Default = false.

## debounce() [2/2]

etl::debounce< 0, 0, 0 >::debounce | ( | count_t | valid,
|  | count_t | hold = 0,
|  | count_t | repeat = 0 )

inline

Constructor.

Parameters

  valid_count | The count for a valid state..
  hold_count | The count after valid_count for a hold state. Default = 0.
  repeat_count | The count after hold_count for a key repeat. Default = 0.

## Member Function Documentation

## add()

bool etl::debounce< 0, 0, 0 >::add | ( | bool | sample | ) |

inline

Adds a new sample. Returns 'true' if the debouncer changes state from...

1. Clear to Set.
2. Set to Clear.
3. Not Held to Held.
4. Key repeats.
   Parameters

     sample | The new sample.

   Returns
     'true' if the debouncer changed state.

The documentation for this class was generated from the following file:

- include/etl/debounce.h