8#ifndef __LIBGPIOD_CXX_LINE_HPP__
9#define __LIBGPIOD_CXX_LINE_HPP__
11#if !defined(__LIBGPIOD_GPIOD_CXX_INSIDE__)
12#error "Only gpiod.hpp can be included directly."
41 offset(
unsigned int off = 0) : _m_offset(off) { }
74 operator unsigned int() const noexcept
76 return this->_m_offset;
80 unsigned int _m_offset;
Wrapper around unsigned int for representing line offsets.
offset(const offset &other)=default
Copy constructor.
offset(offset &&other)=default
Move constructor.
offset & operator=(offset &&other) noexcept=default
Move assignment operator.
offset(unsigned int off=0)
Constructor with implicit conversion from unsigned int.
offset & operator=(const offset &other)=default
Assignment operator.
::std::pair< offset, value > value_mapping
Represents a mapping of a line offset to line logical state.
::std::vector< value_mapping > value_mappings
Vector of offset->value mappings.
edge
Edge detection settings.
@ FALLING
Line detect falling edge events.
@ BOTH
Line detects both rising and falling edge events.
@ RISING
Line detects rising edge events.
@ NONE
Line edge detection is disabled.
direction
Direction settings.
@ OUTPUT
Direction is output - we're driving the GPIO line.
@ INPUT
Direction is input - we're reading the state of a GPIO line.
@ AS_IS
Request the line(s), but don't change current direction.
clock
Event clock settings.
@ MONOTONIC
Line uses the monotonic clock for edge event timestamps.
@ REALTIME
Line uses the realtime clock for edge event timestamps.
::std::ostream & operator<<(::std::ostream &out, value val)
Stream insertion operator for logical line values.
::std::vector< value > values
Vector of line values.
::std::vector< offset > offsets
Vector of line offsets.
@ PUSH_PULL
Drive setting is push-pull.
@ OPEN_SOURCE
Line output is open-source.
@ OPEN_DRAIN
Line output is open-drain.
bias
Internal bias settings.
@ DISABLED
The internal bias is disabled.
@ PULL_UP
The internal pull-up bias is enabled.
@ PULL_DOWN
The internal pull-down bias is enabled.
@ UNKNOWN
The internal bias state is unknown.
value
Logical line states.
@ INACTIVE
Line is inactive.