예제 #1
0
 public Pin(short pinNumber, IGpioInterface gpioInterface, PinBase pinBase)
 {
     this.PinNumber     = pinNumber;
     this.RawPinNumber  = (short)(pinBase + pinNumber);
     this.gpioInterface = gpioInterface;
     this.gpioInterface.Init(this.RawPinNumber);
 }
예제 #2
0
 public OutputPin(short pinNumber, IGpioInterface gpioInterface, PinBase pinBase) : base(pinNumber, gpioInterface, pinBase)
 {
     this.Direction = Direction.Out;
 }
예제 #3
0
 public Gpio(IGpioInterface gpioInterface)
 {
     this.gpioInterface  = gpioInterface;
     this.defaultPinBase = gpioInterface.GetDefaultPinBase();
 }
예제 #4
0
 public Gpio(IGpioInterface gpioInterface, PinBase defaultPinBase)
 {
     this.gpioInterface  = gpioInterface;
     this.defaultPinBase = defaultPinBase;
 }
예제 #5
0
 public InputPin(short pinNumber, IGpioInterface gpioInterface, PinBase pinBase) : base(pinNumber, gpioInterface, pinBase)
 {
     this.Direction = Direction.In;
     this.gpioInterface.SubscribeToValueChanged(this.RawPinNumber, this.ValueChanged);
 }