#include <Gpio.h>
|
| | Gpio (BaseLib::SharedObjects *baseLib, std::string gpioPath) |
| |
| virtual | ~Gpio () |
| |
| virtual void | openDevice (uint32_t index, bool readOnly) |
| |
| virtual void | getPath (uint32_t index) |
| |
| virtual void | closeDevice (uint32_t index) |
| |
| virtual bool | get (uint32_t index) |
| |
| virtual int32_t | poll (uint32_t index, int32_t timeout, bool debounce) |
| | Waits for a GPIO input to change and returns the input value. More...
|
| |
| virtual void | set (uint32_t index, bool value) |
| |
| virtual void | setPermission (uint32_t index, int32_t userID, int32_t groupID, bool readOnly) |
| |
| virtual void | exportGpio (uint32_t index) |
| |
| virtual void | setDirection (uint32_t index, GpioDirection::Enum direction) |
| |
| virtual void | setEdge (uint32_t index, GpioEdge::Enum edge) |
| |
| virtual bool | isOpen (uint32_t index) |
| |
| virtual void | setup (int32_t userId, int32_t groupId, bool setPermissions, std::vector< uint32_t > &exportGpios) |
| |
| virtual std::shared_ptr< FileDescriptor > | getFileDescriptor (uint32_t index) |
| |
§ Gpio()
§ ~Gpio()
| BaseLib::LowLevel::Gpio::~Gpio |
( |
| ) |
|
|
virtual |
§ closeDevice()
| void BaseLib::LowLevel::Gpio::closeDevice |
( |
uint32_t |
index | ) |
|
|
virtual |
§ exportGpio()
| void BaseLib::LowLevel::Gpio::exportGpio |
( |
uint32_t |
index | ) |
|
|
virtual |
§ get()
| bool BaseLib::LowLevel::Gpio::get |
( |
uint32_t |
index | ) |
|
|
virtual |
§ getFileDescriptor()
| PFileDescriptor BaseLib::LowLevel::Gpio::getFileDescriptor |
( |
uint32_t |
index | ) |
|
|
virtual |
§ getPath()
| void BaseLib::LowLevel::Gpio::getPath |
( |
uint32_t |
index | ) |
|
|
virtual |
§ isOpen()
| bool BaseLib::LowLevel::Gpio::isOpen |
( |
uint32_t |
index | ) |
|
|
virtual |
§ openDevice()
| void BaseLib::LowLevel::Gpio::openDevice |
( |
uint32_t |
index, |
|
|
bool |
readOnly |
|
) |
| |
|
virtual |
§ poll()
| int32_t BaseLib::LowLevel::Gpio::poll |
( |
uint32_t |
index, |
|
|
int32_t |
timeout, |
|
|
bool |
debounce |
|
) |
| |
|
virtual |
Waits for a GPIO input to change and returns the input value.
- Parameters
-
| index | The index of the GPIO |
| timeout | The timeout in milliseconds after which to return regardless if the input changed |
| debounce | If true the method waits 30 milliseconds after the input change and then returns the value (use this for e. g. switches) |
- Returns
- Returns -1 on error, -2 on timeout, 0 for input low and 1 for input high
§ set()
| void BaseLib::LowLevel::Gpio::set |
( |
uint32_t |
index, |
|
|
bool |
value |
|
) |
| |
|
virtual |
§ setDirection()
§ setEdge()
| void BaseLib::LowLevel::Gpio::setEdge |
( |
uint32_t |
index, |
|
|
GpioEdge::Enum |
edge |
|
) |
| |
|
virtual |
§ setPermission()
| void BaseLib::LowLevel::Gpio::setPermission |
( |
uint32_t |
index, |
|
|
int32_t |
userID, |
|
|
int32_t |
groupID, |
|
|
bool |
readOnly |
|
) |
| |
|
virtual |
§ setup()
| void BaseLib::LowLevel::Gpio::setup |
( |
int32_t |
userId, |
|
|
int32_t |
groupId, |
|
|
bool |
setPermissions, |
|
|
std::vector< uint32_t > & |
exportGpios |
|
) |
| |
|
virtual |
§ _bl
§ _gpioInfo
| std::map<uint32_t, GpioInfo> BaseLib::LowLevel::Gpio::_gpioInfo |
|
protected |
§ _gpioMutex
| std::mutex BaseLib::LowLevel::Gpio::_gpioMutex |
|
protected |
§ _gpioPath
| std::string BaseLib::LowLevel::Gpio::_gpioPath |
|
protected |
The documentation for this class was generated from the following files: