semf
ledblinking.h
Go to the documentation of this file.
1
10#ifndef SEMF_APP_OUTPUT_LEDBLINKING_H_
11#define SEMF_APP_OUTPUT_LEDBLINKING_H_
12
13#include <semf/app/output/led.h>
14
15namespace semf
16{
17namespace app
18{
22class LedBlinking : public Led
23{
24public:
26 enum class Mode : uint8_t
27 {
28 Off = 0, //<! Led is off.
29 On = 1, //<! Led is on.
30 Blinking = 2 //<! Led is blinking.
31 };
32
33 virtual ~LedBlinking() = default;
34
39 virtual void setBlinking(unsigned int onOffTime) = 0;
45 virtual void setBlinking(unsigned int onTime, unsigned int offTime) = 0;
50 virtual Mode mode() const = 0;
51};
52} /* namespace app */
53} /* namespace semf */
54#endif /* SEMF_APP_OUTPUT_LEDBLINKING_H_ */
Interface for a blinking led class.
Definition: ledblinking.h:23
virtual void setBlinking(unsigned int onTime, unsigned int offTime)=0
Starts blinking the led with different on and off time.
virtual Mode mode() const =0
Returns the active mode of the led.
virtual void setBlinking(unsigned int onOffTime)=0
Starts blinking the led with the same on and off time.
virtual ~LedBlinking()=default
Interface for all Led classes.
Definition: led.h:23