fn pin_write_fn_factory(pin_num: u64) -> Box<dyn Fn(GpioPinValue)> {
    Box::from(move |bit| {
        let pin = Pin::new(pin_num);
        pin.export().unwrap();
        pin.set_direction(Direction::Out).unwrap();
        pin.set_value(bit as u8).unwrap();
    })
}
/// Creates a function/closure for the given pin that changes the value of the pin.
Creates a function/closure for the given pin that changes the value of the pin.
Creates a function / closure for the given pin that changes the value of the pin .
fn pin_write_fn_factory(pin_num: u64) -> Box<dyn Fn(GpioPinValue)> {
    Box::from(move |bit| {
        let pin = Pin::new(pin_num);
        pin.export().unwrap();
        pin.set_direction(Direction::Out).unwrap();
        pin.set_value(bit as u8).unwrap();
    })
}
fn pin_write_fn_factory ( pin_num : u64 ) -> Box < dyn Fn ( GpioPinValue ) > { Box :: from ( move | bit | { let pin = Pin :: new ( pin_num ) ; pin . export ( ) . unwrap ( ) ; pin . set_direction ( Direction :: Out ) . unwrap ( ) ; pin . set_value ( bit as u8 ) . unwrap ( ) ; } ) }
Creates a function/closure for the given pin that changes the value of the pin.
Creates a function / closure for the given pin that changes the value of the pin .
pin_num
u64