|
DUDS
|
Distributed Update of Data from Something
|
Implements using a single gpiohandle_request object for working with a single pin. More...
Public Member Functions | |
| SingleGpioRequest (const std::string &consumer, std::uint32_t offset) | |
| virtual | ~SingleGpioRequest () |
| virtual void | inputOffset (int chipFd, std::uint32_t offset) |
| Configures the pin at the given offset as an input. More... | |
| virtual bool | inputState (int chipFd, std::uint32_t offset) |
| Reads the input state of the indicated pin. More... | |
| virtual void | outputOffset (int chipFd, std::uint32_t offset, bool state) |
| Configures the pin at the given offset as an output. More... | |
| virtual void | outputState (std::uint32_t offset, bool state) |
| Sets the output state of a single pin in advance of making the output request to the port. More... | |
| virtual void | read (int chipFd, gpiohandle_data &result, std::uint32_t *&offsets, int &length) |
| Read from all input pins. More... | |
| virtual void | write (int chipFd) |
| Configures pins as outputs and sets their output states. More... | |
| virtual void | write (int chipFd, std::uint32_t offset, bool state) |
| Sets the output state of a single output pin. More... | |
Public Member Functions inherited from duds::hardware::interface::linux::GpioRequest | |
| virtual | ~GpioRequest () |
Private Attributes | |
| gpiohandle_request | req |
| The request object. More... | |
Implements using a single gpiohandle_request object for working with a single pin.
Definition at line 244 of file GpioDevPort.cpp.
|
inline |
Definition at line 250 of file GpioDevPort.cpp.
|
inlinevirtual |
Definition at line 255 of file GpioDevPort.cpp.
|
inlinevirtual |
Configures the pin at the given offset as an input.
| chipFd | The file descriptor for the GPIO device. |
| offset | The pin offset. |
Implements duds::hardware::interface::linux::GpioRequest.
Definition at line 258 of file GpioDevPort.cpp.
|
inlinevirtual |
Reads the input state of the indicated pin.
Configures the pin as an input if not already an input.
| chipFd | The file descriptor for the GPIO device. |
| offset | The pin offset. |
Implements duds::hardware::interface::linux::GpioRequest.
Definition at line 311 of file GpioDevPort.cpp.
|
inlinevirtual |
Configures the pin at the given offset as an output.
| chipFd | The file descriptor for the GPIO device. |
| offset | The pin offset. |
| state | The output state for the pin. |
Implements duds::hardware::interface::linux::GpioRequest.
Definition at line 270 of file GpioDevPort.cpp.
|
inlinevirtual |
Sets the output state of a single pin in advance of making the output request to the port.
Use write(int) to output the data.
| offset | The pin offset. |
| state | The output state to store for the pin. |
Implements duds::hardware::interface::linux::GpioRequest.
Definition at line 323 of file GpioDevPort.cpp.
|
inlinevirtual |
Read from all input pins.
| chipFd | The file descriptor for the GPIO device. |
| result | The input states. |
| offsets | A pointer to the start of an array with the line offset values for identifying where the input source. |
| length | The number of line offsets. |
Implements duds::hardware::interface::linux::GpioRequest.
Definition at line 283 of file GpioDevPort.cpp.
|
inlinevirtual |
Configures pins as outputs and sets their output states.
| chipFd | The file descriptor for the GPIO device. |
Implements duds::hardware::interface::linux::GpioRequest.
Definition at line 293 of file GpioDevPort.cpp.
|
inlinevirtual |
Sets the output state of a single output pin.
| chipFd | The file descriptor for the GPIO device. |
| offset | The pin offset. |
| state | The output state for the pin. |
Implements duds::hardware::interface::linux::GpioRequest.
Definition at line 296 of file GpioDevPort.cpp.
|
private |
The request object.
Definition at line 248 of file GpioDevPort.cpp.