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); }
public void SetState(LedPinState desiredState) { _controller.Write(_pin, LedPinStateConverter.Convert(desiredState)); }