|
RTLib
|
HAL implementation for LEDs. More...
#include <led.h>
Classes | |
| struct | Config |
| Configuration for LED. More... | |
Public Member Functions | |
| Led (const Config &config) | |
| Default constructor for LED. More... | |
| ~Led ()=default | |
| Default trivial destructor. More... | |
| Led (Led &&other) noexcept=default | |
| Move constructor for LED. More... | |
| Led & | operator= (Led &&other) noexcept=default |
| Move assignment operator for LED. More... | |
| Led (const Led &)=delete | |
| Copy constructor for LED. More... | |
| Led & | operator= (const Led &)=delete |
| Copy assignment operator for LED. More... | |
| void | SetEnable (bool flag) |
| Sets the state of the LED. More... | |
| void | Switch () |
| Toggles the state of the LED, i.e. On -> Off, vice versa. More... | |
Protected Member Functions | |
| CORE_NS::GPIO * | GetGpio () |
HAL implementation for LEDs.
This abstraction layer provides standard state-setting and toggling features for onboard LEDs. One LED object is designed to manage one LED on the mainboard.
|
explicit |
Default constructor for LED.
| config | LED configuration |

|
default |
Default trivial destructor.
|
defaultnoexcept |
Move constructor for LED.
| other | LED object to move from |
|
delete |
Copy constructor for LED.
This constructor is deleted because there should only be one object managing each LED, similar to std::unique_ptr.
|
inlineprotected |
Move assignment operator for LED.
| other | LED object to move from |
Copy assignment operator for LED.
This constructor is deleted because there should only be one object managing each LED, similar to std::unique_ptr.
| void Led::SetEnable | ( | bool | flag | ) |
Sets the state of the LED.
| flag | True if the LED should be on |

| void Led::Switch | ( | ) |
Toggles the state of the LED, i.e. On -> Off, vice versa.