Exemplo n.º 1
0
        /// <summary>
        /// Closes an open pin.
        /// </summary>
        /// <param name="pinNumber">The pin number in the controller's numbering scheme.</param>
        public void ClosePin(int pinNumber)
        {
            int logicalPinNumber = GetLogicalPinNumber(pinNumber);

            if (!_openPins.Contains(logicalPinNumber))
            {
                throw new InvalidOperationException("Can not close a pin that is not open.");
            }
            _driver.ClosePin(logicalPinNumber);
            _openPins.Remove(logicalPinNumber);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Closes an open pin.
        /// </summary>
        /// <param name="pinNumber">The pin number in the controller's numbering scheme.</param>
        protected virtual void ClosePinCore(int pinNumber)
        {
            int logicalPinNumber = GetLogicalPinNumber(pinNumber);

            _driver.ClosePin(logicalPinNumber);
        }