#[repr(C)]
pub struct LineValues { pub bits: Bitmap<64>, pub mask: Bitmap<64>, }
Expand description

Values of GPIO lines.

Bits in the bitmaps correspond to the index into LineRequest.offsets. The first requested line, offsets[0], is bit 0.

Fields

bits: Bitmap<64>

The value of the lines, set to 1 for active and 0 for inactive.

mask: Bitmap<64>

The lines in a request to access, set to 1 to access and 0 to ignore.

Implementations

Create values from a slice.

The values are in the same order as LineRequest.offsets.

Return the value of a line.

Note that the LineValues need to be populated via a call to get_line_values to get values from the underlying hardware.

Fails if the line of interest is not set in the mask.

Set the value of a line.

Note that the values are not applied to hardware until passed to set_line_values.

  • idx - The index into the LineRequest.offsets for the line of interest.
  • active - The logical state of the line to be set.

Clear the mask bit for a line.

The line will be ignored in subsequent calls to get_line_values and set_line_values.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.