![]() |
semf
|
Interface for a blinking led class. More...
#include <ledblinking.h>
Public Member Functions | |
LedBlinking (Gpio &ledPin, app::TimeBase &timebase, bool inverted=false) | |
Constructor. More... | |
LedBlinking (const LedBlinking &other)=delete | |
void | setOn () override |
void | setOff () override |
void | toggle () override |
void | setBlinking (unsigned int onOffTime) override |
Starts blinking the led with the same on and off time. More... | |
void | setBlinking (unsigned int onTime, unsigned int offTime) override |
Starts blinking the led with different on and off time. More... | |
Mode | mode () const override |
Returns the active mode of the led. More... | |
![]() | |
virtual | ~LedBlinking ()=default |
virtual void | setBlinking (unsigned int onOffTime)=0 |
Starts blinking the led with the same on and off time. More... | |
virtual void | setBlinking (unsigned int onTime, unsigned int offTime)=0 |
Starts blinking the led with different on and off time. More... | |
virtual Mode | mode () const =0 |
Returns the active mode of the led. More... | |
![]() | |
virtual | ~Led ()=default |
virtual void | setOn ()=0 |
virtual void | setOff ()=0 |
virtual void | toggle ()=0 |
Additional Inherited Members | |
![]() | |
enum class | Mode : uint8_t { Off = 0 , On = 1 , Blinking = 2 } |
Interface for a blinking led class.
Definition at line 21 of file ledblinking.h.
semf::LedBlinking::LedBlinking | ( | Gpio & | ledPin, |
app::TimeBase & | timebase, | ||
bool | inverted = false |
||
) |
Constructor.
ledPin | Led GPIO. |
timebase | TimeBase used for internal SoftwareTimer . |
inverted | true for inverted on / off status of the led. |
Definition at line 16 of file ledblinking.cpp.
|
explicitdelete |
|
overridevirtual |
Returns the active mode of the led.
Implements semf::app::LedBlinking.
Definition at line 67 of file ledblinking.cpp.
|
overridevirtual |
Starts blinking the led with the same on and off time.
onOffTime | On and off time. |
Implements semf::app::LedBlinking.
Definition at line 49 of file ledblinking.cpp.
|
overridevirtual |
Starts blinking the led with different on and off time.
onTime | On time. |
offTime | Off time. |
Implements semf::app::LedBlinking.
Definition at line 54 of file ledblinking.cpp.
|
overridevirtual |
Switch the LED off.
Implements semf::app::Led.
Definition at line 31 of file ledblinking.cpp.
|
overridevirtual |
Switch the LED on.
Implements semf::app::Led.
Definition at line 22 of file ledblinking.cpp.
|
overridevirtual |
Toggle the led state.
Implements semf::app::Led.
Definition at line 39 of file ledblinking.cpp.