DUDS
Distributed Update of Data from Something
GpioDevPort.cpp File Reference
#include <boost/exception/errinfo_file_name.hpp>
#include <boost/exception/errinfo_errno.hpp>
#include <duds/hardware/interface/linux/GpioDevPort.hpp>
#include <duds/hardware/interface/PinConfiguration.hpp>
#include <linux/gpio.h>
#include <sys/ioctl.h>
#include <fcntl.h>
Include dependency graph for GpioDevPort.cpp:

Go to the source code of this file.

Classes

class  duds::hardware::interface::linux::GpioRequest
 An abstraction for using gpiohandle_request object(s). More...
 
class  duds::hardware::interface::linux::IoGpioRequest
 Implements using two gpiohandle_requests object for working with multiple pins. More...
 
class  duds::hardware::interface::linux::SingleGpioRequest
 Implements using a single gpiohandle_request object for working with a single pin. More...
 

Namespaces

 duds
 
 duds::hardware
 
 duds::hardware::interface
 Library code for interfacing with hardware external to the processor.
 
 duds::hardware::interface::linux
 A Linux specific library for communicating with external hardware.
 

Functions

static void duds::hardware::interface::linux::AddOffset (gpiohandle_request &req, std::uint32_t offset)
 Adds a GPIO line offset to a gpiohandle_request object. More...
 
static void duds::hardware::interface::linux::CloseIfOpen (gpiohandle_request &req)
 Closes the file descriptor in the request object if it appears to have a file, and then sets the descriptor to zero. More...
 
static int duds::hardware::interface::linux::FindOffset (gpiohandle_request &req, std::uint32_t offset)
 Finds the array index that corresponds to the given offset. More...
 
static void duds::hardware::interface::linux::GetInput (int chipFd, gpiohandle_data &result, gpiohandle_request &req)
 Requests input states from the kernel. More...
 
static void duds::hardware::interface::linux::InitGpioHandleReq (gpiohandle_request &req, const std::string &consumer)
 Initializes a gpiohandle_request structure. More...
 
static bool duds::hardware::interface::linux::RemoveOffset (gpiohandle_request &req, std::uint32_t offset)
 Removes a GPIO line offset from a gpiohandle_request object. More...
 
static void duds::hardware::interface::linux::SetOutput (int chipFd, gpiohandle_request &req)
 Sets the output states for all the pins in the request object. More...