fn on(&self, i: usize) -> sysfs_gpio::Result<()> {
        let n = self.pins.len();
        if i > n || i < 0 {
            Err(Unsupported("Index too low/high".to_string()))
        } else {
            let pin = self.pins[i];
            pin.export()?;
            pin.set_direction(Direction::High)?;
            pin.set_value(0)?;
            Ok(())
        }

    }
/// Allows accessing the LEDBar by logical indexes.
/// The lowest PIN receives index 0, the highest gpios.len() - 1.
/// The pin will be left exported and on when this function returns.
Allows accessing the LEDBar by logical indexes.
The lowest PIN receives index 0, the highest gpios.len() - 1.
The pin will be left exported and on when this function returns.
Allows accessing the LEDBar by logical indexes . The lowest PIN receives index 0 the highest gpios . len () - 1 . The pin will be left exported and on when this function returns .
fn on(&self, i: usize) -> sysfs_gpio::Result<()> {
        let n = self.pins.len();
        if i > n || i < 0 {
            Err(Unsupported("Index too low/high".to_string()))
        } else {
            let pin = self.pins[i];
            pin.export()?;
            pin.set_direction(Direction::High)?;
            pin.set_value(0)?;
            Ok(())
        }
    }
fn on ( & self , i : usize ) -> sysfs_gpio :: Result < ( ) > { let n = self . pins . len ( ) ; if i > n || i < 0 { Err ( Unsupported ( " " . to_string ( ) ) ) } else { let pin = self . pins [ i ] ; pin . export ( ) ? ; pin . set_direction ( Direction :: High ) ? ; pin . set_value ( 0 ) ? ; Ok ( ( ) ) } }
Allows accessing the LEDBar by logical indexes.
Allows accessing the LEDBar by logical indexes .
&self
i
usize
&self
i
usize