Leosac
0.8.0
Open Source Access Control
|
Abstraction of a GPIO device attributes. More...
#include <GPIO.hpp>
Public Types | |
enum | Direction { Direction::In = 0, Direction::Out = 1 } |
Public Member Functions | |
GPIO () | |
virtual | ~GPIO ()=default |
uint16_t | number () const |
void | number (uint16_t number) |
Direction | direction () const |
void | direction (Direction direction) |
bool | default_value () const |
void | default_value (bool default_value) |
void | validation_callback (odb::callback_event e, odb::database &) const override |
Public Member Functions inherited from Leosac::Hardware::Device | |
Device () | |
Device (DeviceClass device_class) | |
virtual | ~Device ()=default |
UUID | id () const |
const std::string & | name () const |
void | name (const std::string &name) |
DeviceClass | device_class () const |
void | device_class (DeviceClass d) |
bool | enabled () const |
void | enabled (bool e) |
uint64_t | odb_version () const |
Private Attributes | |
uint16_t | number_ |
Direction | direction_ |
bool | default_value_ |
True to default to ON, false otherwise. More... | |
Abstraction of a GPIO device attributes.
Modules that provides GPIO support may subclass this to provide additional configuration options.
|
strong |
|
virtualdefault |
void Leosac::Hardware::GPIO::default_value | ( | bool | default_value | ) |
GPIO::Direction Leosac::Hardware::GPIO::direction | ( | ) | const |
void Leosac::Hardware::GPIO::direction | ( | GPIO::Direction | direction | ) |
|
overridevirtual |
Reimplemented from Leosac::Hardware::Device.
|
private |