Beispiel #1
0
        /// <inheritdoc/>
        public void WritePin(int pin, PinState pinState)
        {
            if (pin < 0 || 3 < pin)
            {
                throw new ArgumentOutOfRangeException(nameof(pin));
            }
            if (!IsInitialized)
            {
                Initialize();
            }

            var state = pinState == PinState.Off;

            _ioExpander.WritePin(0, (byte)pin, state);
        }
Beispiel #2
0
 private void IoExpanderWritePin(int port, int pin, bool state)
 {
     _ioExpander.WritePin(port, pin, state);
 }