fn pin_write_fn_factory(gpio_pin_num: u16, gpio: Rc<WiringPi<wiringpi::pin::Gpio>>) -> Box<dyn Fn(GpioPinValue)> {
    Box::from(move |bit| {
        let pin = gpio.output_pin(gpio_pin_num);
        if let GpioPinValue::HIGH = bit {
            pin.digital_write(WiringPiVal::High);
        } else {
            pin.digital_write(WiringPiVal::Low);
        }
    })
}
/// 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(gpio_pin_num: u16, gpio: Rc<WiringPi<wiringpi::pin::Gpio>>) -> Box<dyn Fn(GpioPinValue)> {
    Box::from(move |bit| {
        let pin = gpio.output_pin(gpio_pin_num);
        if let GpioPinValue::HIGH = bit {
            pin.digital_write(WiringPiVal::High);
        } else {
            pin.digital_write(WiringPiVal::Low);
        }
    })
}
fn pin_write_fn_factory ( gpio_pin_num : u16 , gpio : Rc < WiringPi < wiringpi :: pin :: Gpio > > ) -> Box < dyn Fn ( GpioPinValue ) > { Box :: from ( move | bit | { let pin = gpio . output_pin ( gpio_pin_num ) ; if let GpioPinValue :: HIGH = bit { pin . digital_write ( WiringPiVal :: High ) ; } else { pin . digital_write ( WiringPiVal :: Low ) ; } } ) }
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 .
gpio_pin_num
u16
gpio
Rc<WiringPi<wiringpi::pin::Gpio>>