public Pin(short pinNumber, IGpioInterface gpioInterface, PinBase pinBase) { this.PinNumber = pinNumber; this.RawPinNumber = (short)(pinBase + pinNumber); this.gpioInterface = gpioInterface; this.gpioInterface.Init(this.RawPinNumber); }
public Pin NewPin(short pinNumber, PinBase pinBase, Direction direction = Direction.Out, short value = 0) { var newPin = new Pin(pinNumber, this.gpioInterface, pinBase); newPin.Direction = direction; newPin.Value = value; return(newPin); }
public OutputPin(short pinNumber, IGpioInterface gpioInterface, PinBase pinBase) : base(pinNumber, gpioInterface, pinBase) { this.Direction = Direction.Out; }
public OutputPin NewOutputPin(short pinNumber, PinBase pinBase) { return(new OutputPin(pinNumber, this.gpioInterface, pinBase)); }
public Gpio(IGpioInterface gpioInterface) { this.gpioInterface = gpioInterface; this.defaultPinBase = gpioInterface.GetDefaultPinBase(); }
public Gpio(IGpioInterface gpioInterface, PinBase defaultPinBase) { this.gpioInterface = gpioInterface; this.defaultPinBase = defaultPinBase; }
public InputPin(short pinNumber, IGpioInterface gpioInterface, PinBase pinBase) : base(pinNumber, gpioInterface, pinBase) { this.Direction = Direction.In; this.gpioInterface.SubscribeToValueChanged(this.RawPinNumber, this.ValueChanged); }