|
Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Debounced digital gate input with edge detection and retrigger lockout.
Definition at line 31 of file digital_gate.hpp.
#include <digital_gate.hpp>
Public Member Functions | |
| DigitalGateInput (const DigitalGateConfig &config={}) | |
| void | update (bool logical_state) |
| bool | gate () const |
| Current debounced gate state (true = high). | |
| bool | rising () |
| bool | falling () |
| void | reset () |
| Reset all state. | |
|
inlineexplicit |
Definition at line 33 of file digital_gate.hpp.
|
inline |
Feed a new logical GPIO reading. Call once per update cycle (e.g. 200 Hz control rate).
Definition at line 39 of file digital_gate.hpp.
Referenced by sbl::gate::read().
|
inline |
Current debounced gate state (true = high).
Definition at line 67 of file digital_gate.hpp.
|
inline |
True if gate just went high (rising edge). Consuming read — resets after first read. Call once per update cycle.
Definition at line 71 of file digital_gate.hpp.
|
inline |
True if gate just went low (falling edge). Consuming read — resets after first read. Call once per update cycle.
Definition at line 79 of file digital_gate.hpp.
|
inline |
Reset all state.
Definition at line 86 of file digital_gate.hpp.