예제 #1
0
        public static LedPin Initialize(GpioController controller, int pin, LedPinState initialState)
        {
            LedPin result = new LedPin(controller, pin);

            controller.OpenPin(pin, PinMode.Output);
            controller.Write(pin, LedPinStateConverter.Convert(initialState));

            return(result);
        }
예제 #2
0
 public void SetState(LedPinState desiredState)
 {
     _controller.Write(_pin, LedPinStateConverter.Convert(desiredState));
 }