|
ELEC-C7222
Libraries for ELEC C7222 Course Work
|
Simple on-board LED controller. More...
#include <onboard_led.hpp>


Public Member Functions | |
| bool | Initialize () |
| Initialize the on-board LED hardware. | |
| void | Set (bool on) |
| Set the LED state. | |
| void | On () |
| Turn the LED on. | |
| void | Off () |
| Turn the LED off. | |
| void | Toggle () |
| Toggle the LED state. | |
| ~OnBoardLED ()=default | |
| Destructor. | |
Public Member Functions inherited from c7222::NonCopyable | |
| NonCopyable (const NonCopyable &)=delete | |
| NonCopyable & | operator= (const NonCopyable &)=delete |
| NonCopyable (NonCopyable &&)=default | |
| NonCopyable & | operator= (NonCopyable &&)=default |
Public Member Functions inherited from c7222::NonMovable | |
| NonMovable (const NonMovable &)=default | |
| NonMovable & | operator= (const NonMovable &)=default |
| NonMovable (NonMovable &&)=delete | |
| NonMovable & | operator= (NonMovable &&)=delete |
Static Public Member Functions | |
| static OnBoardLED * | GetInstance () |
| Get the singleton instance. | |
Additional Inherited Members | |
Protected Member Functions inherited from c7222::NonCopyableNonMovable | |
| NonCopyableNonMovable ()=default | |
| ~NonCopyableNonMovable ()=default | |
Protected Member Functions inherited from c7222::NonCopyable | |
| NonCopyable ()=default | |
| ~NonCopyable ()=default | |
Protected Member Functions inherited from c7222::NonMovable | |
| NonMovable ()=default | |
| ~NonMovable ()=default | |
Simple on-board LED controller.
Design intent:
Initialize() once before using On(), Off(), or Toggle(). The Platform does not auto-initialize this device.Example:
|
default |
Destructor.
Public to allow std::unique_ptr default deleter.
|
static |
Get the singleton instance.

| bool c7222::OnBoardLED::Initialize | ( | ) |
Initialize the on-board LED hardware.
On Pico W, this may initialize the CYW43 subsystem if required. Returns true on success.

| void c7222::OnBoardLED::Off | ( | ) |
Turn the LED off.

| void c7222::OnBoardLED::On | ( | ) |
Turn the LED on.
| void c7222::OnBoardLED::Set | ( | bool | on | ) |
Set the LED state.
| on | true to turn on, false to turn off. |
| void c7222::OnBoardLED::Toggle | ( | ) |
Toggle the LED state.
