Loading...
Searching...
No Matches
gpiod::line Namespace Reference

Namespace containing various type definitions for GPIO lines. More...

## Classes

class | offset
| Wrapper around unsigned int for representing line offsets. More...

## Typedefs

using | offsets = ::std::vector<offset>
| Vector of line offsets.
using | values = ::std::vector<value>
| Vector of line values.
using | value_mapping = ::std::pair<offset, value>
| Represents a mapping of a line offset to line logical state.
using | value_mappings = ::std::vector<value_mapping>
| Vector of offset->value mappings. Each mapping is defined as a pair of an unsigned and signed integers.

## Enumerations

enum class | value { INACTIVE = 0 , ACTIVE = 1 }
| Logical line states. More...
enum class | direction { AS_IS = 1 , INPUT , OUTPUT }
| Direction settings. More...
enum class | edge { NONE = 1 , RISING , FALLING , BOTH }
| Edge detection settings. More...
enum class | bias { AS_IS = 1 , UNKNOWN , DISABLED , PULL_UP , PULL_DOWN }
| Internal bias settings. More...
enum class | drive { PUSH_PULL = 1 , OPEN_DRAIN , OPEN_SOURCE }
| Drive settings. More...
enum class | clock { MONOTONIC = 1 , REALTIME , HTE }
| Event clock settings. More...

## Functions

::std::ostream & | operator<< (::std::ostream &out, value val)
| Stream insertion operator for logical line values.
::std::ostream & | operator<< (::std::ostream &out, direction dir)
| Stream insertion operator for direction values.
::std::ostream & | operator<< (::std::ostream &out, edge edge)
| Stream insertion operator for edge detection values.
::std::ostream & | operator<< (::std::ostream &out, bias bias)
| Stream insertion operator for bias values.
::std::ostream & | operator<< (::std::ostream &out, drive drive)
| Stream insertion operator for drive values.
::std::ostream & | operator<< (::std::ostream &out, clock clock)
| Stream insertion operator for event clock values.
::std::ostream & | operator<< (::std::ostream &out, const values &vals)
| Stream insertion operator for the list of output values.
::std::ostream & | operator<< (::std::ostream &out, const offsets &offs)
| Stream insertion operator for the list of line offsets.
::std::ostream & | operator<< (::std::ostream &out, const value_mapping &mapping)
| Stream insertion operator for the offset-to-value mapping.
::std::ostream & | operator<< (::std::ostream &out, const value_mappings &mappings)
| Stream insertion operator for the list of offset-to-value mappings.

## Detailed Description

Namespace containing various type definitions for GPIO lines.

## Typedef Documentation

## offsets

using gpiod::line::offsets = ::std::vector<offset>

Vector of line offsets.

## value_mapping

using gpiod::line::value_mapping = ::std::pair<offset, value>

Represents a mapping of a line offset to line logical state.

## value_mappings

using gpiod::line::value_mappings = ::std::vector<value_mapping>

Vector of offset->value mappings. Each mapping is defined as a pair of an unsigned and signed integers.

## values

using gpiod::line::values = ::std::vector<value>

Vector of line values.

## Enumeration Type Documentation

## bias

enum class gpiod::line::bias

strong

Internal bias settings.

Enumerator
AS_IS | Don't change the bias setting when applying line config.
UNKNOWN | The internal bias state is unknown.
DISABLED | The internal bias is disabled.
PULL_UP | The internal pull-up bias is enabled.
PULL_DOWN | The internal pull-down bias is enabled.

## clock

enum class gpiod::line::clock

strong

Event clock settings.

Enumerator
MONOTONIC | Line uses the monotonic clock for edge event timestamps.
REALTIME | Line uses the realtime clock for edge event timestamps.
HTE |

## direction

enum class gpiod::line::direction

strong

Direction settings.

Enumerator
AS_IS | Request the line(s), but don't change current direction.
INPUT | Direction is input - we're reading the state of a GPIO line.
OUTPUT | Direction is output - we're driving the GPIO line.

## drive

enum class gpiod::line::drive

strong

Drive settings.

Enumerator
PUSH_PULL | Drive setting is push-pull.
OPEN_DRAIN | Line output is open-drain.
OPEN_SOURCE | Line output is open-source.

## edge

enum class gpiod::line::edge

strong

Edge detection settings.

Enumerator
NONE | Line edge detection is disabled.
RISING | Line detects rising edge events.
FALLING | Line detect falling edge events.
BOTH | Line detects both rising and falling edge events.

## value

enum class gpiod::line::value

strong

Logical line states.

Enumerator
INACTIVE | Line is inactive.
ACTIVE | Line is active.

## Function Documentation

## operator<<() [1/10]

::std::ostream & gpiod::line::operator<< | ( | ::std::ostream & | out,
|  | bias | bias )

Stream insertion operator for bias values.

Parameters

  out | Output stream.
  bias | Value to insert into the output stream in a human-readable form.

Returns
  Reference to out.

## operator<<() [2/10]

::std::ostream & gpiod::line::operator<< | ( | ::std::ostream & | out,
|  | clock | clock )

Stream insertion operator for event clock values.

Parameters

  out | Output stream.
  clock | Value to insert into the output stream in a human-readable form.

Returns
  Reference to out.

## operator<<() [3/10]

::std::ostream & gpiod::line::operator<< | ( | ::std::ostream & | out,
|  | const offsets & | offs )

Stream insertion operator for the list of line offsets.

Parameters

  out | Output stream.
  offs | Object to insert into the output stream in a human-readable form.

Returns
  Reference to out.

## operator<<() [4/10]

::std::ostream & gpiod::line::operator<< | ( | ::std::ostream & | out,
|  | const value_mapping & | mapping )

Stream insertion operator for the offset-to-value mapping.

Parameters

  out | Output stream.
  mapping | Value to insert into the output stream in a human-readable form.

Returns
  Reference to out.

## operator<<() [5/10]

::std::ostream & gpiod::line::operator<< | ( | ::std::ostream & | out,
|  | const value_mappings & | mappings )

Stream insertion operator for the list of offset-to-value mappings.

Parameters

  out | Output stream.
  mappings | Object to insert into the output stream in a human-readable form.

Returns
  Reference to out.

## operator<<() [6/10]

::std::ostream & gpiod::line::operator<< | ( | ::std::ostream & | out,
|  | const values & | vals )

Stream insertion operator for the list of output values.

Parameters

  out | Output stream.
  vals | Object to insert into the output stream in a human-readable form.

Returns
  Reference to out.

## operator<<() [7/10]

::std::ostream & gpiod::line::operator<< | ( | ::std::ostream & | out,
|  | direction | dir )

Stream insertion operator for direction values.

Parameters

  out | Output stream.
  dir | Value to insert into the output stream in a human-readable form.

Returns
  Reference to out.

## operator<<() [8/10]

::std::ostream & gpiod::line::operator<< | ( | ::std::ostream & | out,
|  | drive | drive )

Stream insertion operator for drive values.

Parameters

  out | Output stream.
  drive | Value to insert into the output stream in a human-readable form.

Returns
  Reference to out.

## operator<<() [9/10]

::std::ostream & gpiod::line::operator<< | ( | ::std::ostream & | out,
|  | edge | edge )

Stream insertion operator for edge detection values.

Parameters

  out | Output stream.
  edge | Value to insert into the output stream in a human-readable form.

Returns
  Reference to out.

## operator<<() [10/10]

::std::ostream & gpiod::line::operator<< | ( | ::std::ostream & | out,
|  | value | val )

Stream insertion operator for logical line values.

Parameters

  out | Output stream.
  val | Value to insert into the output stream in a human-readable form.

Returns
  Reference to out.