35#ifndef _UTILS_ACTIVITYLED_HXX_
36#define _UTILS_ACTIVITYLED_HXX_
55 : ::
Timer(service->executor()->active_timers())
Operates an LED to visually display some activity.
const Gpio * gpio_
Output pin to blink for activity.
ActivityLed(Service *service, const Gpio *pin, long long period=MSEC_TO_NSEC(33))
Constructor.
long long timeout() override
Clients of timer should override this function.
void activity()
Call this function when activity happens.
unsigned triggerCount_
How many triggers happened since the last run of the timer.
OS-independent abstraction for GPIO.
virtual void write(Value new_state) const =0
Writes a GPIO output pin (set or clear to a specific state).
Collection of related state machines that pend on incoming messages.
A timer that can schedule itself to run on an executor at specified times in the future.
@ RESTART
Restart the timer with existing period.
void start(long long period=-1)
Starts a timer.
#define MSEC_TO_NSEC(_msec)
Convert a millisecond value to a nanosecond value.