Skip to main content

input

Function input 

Source
pub fn input(chip: impl AsRef<Path>, line: u32) -> Result<Line, OpenError>
Expand description

Opens a line as an input.

§Arguments

  • chip - the GPIO chip’s device file.
  • line - the line’s number on that chip.

§Returns

The line.

§Errors

OpenError::Unsupported on any platform but Linux, or OpenError::Gpio when the chip or the line cannot be opened.