fn pin_read_fn_factory(gpio_pin_num: u16, gpio: Rc<WiringPi<wiringpi::pin::Gpio>>) -> Box<dyn Fn() -> GpioPinValue> {
    Box::from(move || {
        let res: WiringPiVal = gpio.input_pin(gpio_pin_num).digital_read();
        return if let WiringPiVal::High = res { GpioPinValue::HIGH } else { GpioPinValue::LOW }
    })
}
/// Creates a function/closure for the given pin that reads its value in the moment of invocation.
Creates a function/closure for the given pin that reads its value in the moment of invocation.
Creates a function / closure for the given pin that reads its value in the moment of invocation .
fn pin_read_fn_factory(gpio_pin_num: u16, gpio: Rc<WiringPi<wiringpi::pin::Gpio>>) -> Box<dyn Fn() -> GpioPinValue> {
    Box::from(move || {
        let res: WiringPiVal = gpio.input_pin(gpio_pin_num).digital_read();
        return if let WiringPiVal::High = res { GpioPinValue::HIGH } else { GpioPinValue::LOW }
    })
}
fn pin_read_fn_factory ( gpio_pin_num : u16 , gpio : Rc < WiringPi < wiringpi :: pin :: Gpio > > ) -> Box < dyn Fn ( ) -> GpioPinValue > { Box :: from ( move | | { let res : WiringPiVal = gpio . input_pin ( gpio_pin_num ) . digital_read ( ) ; return if let WiringPiVal :: High = res { GpioPinValue :: HIGH } else { GpioPinValue :: LOW } } ) }
Creates a function/closure for the given pin that reads its value in the moment of invocation.
Creates a function / closure for the given pin that reads its value in the moment of invocation .
gpio_pin_num
u16
gpio
Rc<WiringPi<wiringpi::pin::Gpio>>