예제 #1
0
        private static PinValue GpioPinValueToPinValue(WinGpio.GpioPinValue value)
        {
            switch (value)
            {
            case WinGpio.GpioPinValue.Low:
                return(PinValue.Low);

            case WinGpio.GpioPinValue.High:
                return(PinValue.High);

            default:
                throw new NotSupportedException($"GPIO pin value not supported: {value}");
            }
        }
예제 #2
0
        private static PinValue GpioPinValueToPinValue(WinGpio.GpioPinValue value)
        {
            switch (value)
            {
            case WinGpio.GpioPinValue.Low:
                return(PinValue.Low);

            case WinGpio.GpioPinValue.High:
                return(PinValue.High);

            default:
                throw new ArgumentException($"GPIO pin value {value} not supported.", nameof(value));
            }
        }