Provides GPIO functions accessible via the platform / os specific API.
More...
#include <Imt.Base.OS.Linux/Gpio.h>
Provides GPIO functions accessible via the platform / os specific API.
◆ Gpio() [1/4]
imt::base::os::linux::Gpio::Gpio |
( |
| ) |
|
|
delete |
Deleted default constructor.
◆ Gpio() [2/4]
imt::base::os::linux::Gpio::Gpio |
( |
std::unique_ptr< GpioData > && |
gpioData | ) |
|
|
explicit |
Constructor.
- Parameters
-
gpioData | The gpio data used to access the gpio pin |
◆ ~Gpio()
imt::base::os::linux::Gpio::~Gpio |
( |
| ) |
|
◆ Gpio() [3/4]
imt::base::os::linux::Gpio::Gpio |
( |
const Gpio & |
| ) |
|
|
default |
◆ Gpio() [4/4]
imt::base::os::linux::Gpio::Gpio |
( |
Gpio && |
| ) |
|
|
default |
◆ isSet()
bool imt::base::os::linux::Gpio::isSet |
( |
| ) |
|
True if the GPIO is set, false if reset.
◆ openInput()
static std::unique_ptr<Gpio> imt::base::os::linux::Gpio::openInput |
( |
const std::string & |
deviceName, |
|
|
uint32_t |
pinNumber |
|
) |
| |
|
static |
Opens the given gpio.
The optional may be empty if opening the gpio has failed
- Parameters
-
deviceName | The name of the gpio device |
pinNumber | The name of the gpio pin |
◆ openOutput()
static std::unique_ptr<Gpio> imt::base::os::linux::Gpio::openOutput |
( |
const std::string & |
deviceName, |
|
|
uint32_t |
pinNumber, |
|
|
bool |
initialValue |
|
) |
| |
|
static |
Opens the given gpio.
The optional may be empty if opening the gpio has failed
- Parameters
-
deviceName | The name of the gpio device |
pinNumber | The name of the gpio pin |
initialValue | The initial output value |
◆ operator=() [1/2]
Gpio& imt::base::os::linux::Gpio::operator= |
( |
const Gpio & |
| ) |
|
|
default |
◆ operator=() [2/2]
Gpio& imt::base::os::linux::Gpio::operator= |
( |
Gpio && |
| ) |
|
|
default |
◆ set()
void imt::base::os::linux::Gpio::set |
( |
bool |
value | ) |
|
Sets an output to the desired state.
No effect if the ioType has been set to IoType::INPUT.
- Parameters
-
value | True to set the output, false to reset. |
◆ waitForChange()
void imt::base::os::linux::Gpio::waitForChange |
( |
| ) |
|
Waits for a gpio state change.
The documentation for this class was generated from the following file:
- D:/_Work/10/s/Imt.Base/Imt.Base.OS.Linux/Gpio.h