36template <u
int8_t Bits,
class T_in = u
int16_t,
class T_out = u
int8_t>
74 constexpr static T_in margin = (1ul <<
Bits) - 1ul;
76 constexpr static T_in max_in =
static_cast<T_in>(-1);
78 static_assert(max_in > 0,
"Error: only unsigned types are supported");
81template <
class T_in,
class T_out>
#define BEGIN_AH_NAMESPACE
bool update(T_in inputLevel)
void setValue(T_in inputLevel)
A class for applying hysteresis to a given input.
bool update(T_in inputLevel)
Update the hysteresis output with a new input value.
void setValue(T_in inputLevel)
Forcefully update the internal state to the given level.
T_out getValue() const
Get the current output level.
A class for serial-in/parallel-out shift registers, like the 74HC595 that are connected to the SPI bu...