1#ifndef SBL_CORE_COMPONENTS_CV_TRIGGER_HPP_
2#define SBL_CORE_COMPONENTS_CV_TRIGGER_HPP_
26template<
typename PinImpl,
typename TimerImpl>
34 Trigger(PinImpl& pin, uint32_t pulse_ms = 10)
35 : pin_(pin), pulseDuration_(pulse_ms), active_(false) {
36 pin_.setMode(sbl::core::hal::PinMode::Output);
47 pulseTimer_.
start(pulseDuration_);
57 if (active_ && pulseTimer_.hasExpired()) {
74 uint32_t pulseDuration_;
CV trigger pulse generator.
Trigger(PinImpl &pin, uint32_t pulse_ms=10)
Construct trigger generator.
void update()
Update trigger state.
void fire()
Fire trigger pulse.
bool isActive() const
Check if trigger is currently active.
Simple non-blocking delay using system time.
void start()
Start the delay timer.
Root namespace for all Sound Byte Libs functionality.
Non-blocking delay utilities for cooperative scheduling.