|
RTLib
|
HAL implementation for buttons. More...
#include <button.h>
Classes | |
| struct | Config |
| Configuration for button. More... | |
Public Member Functions | |
| Button (const Config &config) | |
| Default constructor for Button. More... | |
| ~Button ()=default | |
| Default trivial destructor. More... | |
| Button (Button &&other) noexcept=default | |
| Move constructor for Button. More... | |
| Button & | operator= (Button &&other) noexcept=default |
| Move assignment operator for Button. More... | |
| Button (const Button &)=delete | |
| Copy constructor for Button. More... | |
| Button & | operator= (const Button &)=delete |
| Copy assignment operator for Button. More... | |
| bool | Read () |
| Reads the state of the button. More... | |
Protected Member Functions | |
| CORE_NS::GPIO * | GetGpio () |
HAL implementation for buttons.
This abstraction layer provides standard state-reading for onboard buttons. One button object is designed to manage one button on the mainboard.
|
explicit |
|
default |
Default trivial destructor.
|
defaultnoexcept |
|
delete |
Copy constructor for Button.
This constructor is deleted because there should only be one object managing each button, similar to std::unique_ptr.
|
inlineprotected |
Copy assignment operator for Button.
This constructor is deleted because there should only be one object managing each button, similar to std::unique_ptr.
| bool Button::Read | ( | ) |
Reads the state of the button.
true if button is pressed, false otherwise.