|
DUDS
|
Distributed Update of Data from Something
|
Implements using two gpiohandle_requests object for working with multiple pins. More...
Public Member Functions | |
| IoGpioRequest (const std::string &consumer) | |
| virtual | ~IoGpioRequest () |
| void | addInputOffset (std::uint32_t offset) |
| Adds an offset for input use. More... | |
| void | addOutputOffset (std::uint32_t offset, bool state) |
| Adds an offset for output use and sets the initial output state. More... | |
| 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... | |
| void | lastOutputState (bool state) |
| 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 | inReq |
| Input request. More... | |
| gpiohandle_request | outReq |
| Output request. More... | |
Implements using two gpiohandle_requests object for working with multiple pins.
Definition at line 335 of file GpioDevPort.cpp.
|
inline |
Definition at line 345 of file GpioDevPort.cpp.
|
inlinevirtual |
Definition at line 351 of file GpioDevPort.cpp.
|
inline |
Adds an offset for input use.
Definition at line 362 of file GpioDevPort.cpp.
Referenced by duds::hardware::interface::linux::GpioDevPort::madeAccess().
|
inline |
Adds an offset for output use and sets the initial output state.
Definition at line 369 of file GpioDevPort.cpp.
Referenced by duds::hardware::interface::linux::GpioDevPort::madeAccess().
|
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 373 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 425 of file GpioDevPort.cpp.
|
inline |
Definition at line 355 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 386 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 432 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 400 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 410 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 415 of file GpioDevPort.cpp.
|
private |
Input request.
Definition at line 339 of file GpioDevPort.cpp.
|
private |
Output request.
Definition at line 343 of file GpioDevPort.cpp.