Beispiel #1
0
        /// <summary>
        /// Sets up an input pin.
        /// </summary>
        /// <param name="pin">GPIO pin</param>
        /// <param name="id">Unique signal identifier</param>
        public InputPin(GPIOController.Pin pin, T id)
        {
            this.id        = id;                         // Set ID
            this.state     = GPIOController.State.Low;   // Default states to Low
            this.prevState = GPIOController.State.Low;
            this.isChanged = false;

            this.pinInterface = new GPIOController(pin, GPIOController.Direction.In); // Set up for reading
        }
 /// <summary>
 /// Sets up an output pin.
 /// </summary>
 /// <param name="pin">GPIO pin</param>
 /// <param name="id">Unique signal identifier</param>
 public OutputPin(GPIOController.Pin pin, T id, GPIOController.State initialState)
 {
     this.id           = id;                                                                  // Set ID
     this.pinInterface = new GPIOController(pin, GPIOController.Direction.Out, initialState); // Set up for writing
 }