private static PinMode GpioDriveModeToPinMode(WinGpio.GpioPinDriveMode mode) { switch (mode) { case WinGpio.GpioPinDriveMode.Input: return(PinMode.Input); case WinGpio.GpioPinDriveMode.Output: return(PinMode.Output); case WinGpio.GpioPinDriveMode.InputPullDown: return(PinMode.InputPullDown); case WinGpio.GpioPinDriveMode.InputPullUp: return(PinMode.InputPullUp); default: throw new NotSupportedException($"GPIO pin mode not supported: {mode}"); } }
private static PinMode GpioDriveModeToPinMode(WinGpio.GpioPinDriveMode mode) { switch (mode) { case WinGpio.GpioPinDriveMode.Input: return(PinMode.Input); case WinGpio.GpioPinDriveMode.Output: return(PinMode.Output); case WinGpio.GpioPinDriveMode.InputPullDown: return(PinMode.InputPullDown); case WinGpio.GpioPinDriveMode.InputPullUp: return(PinMode.InputPullUp); default: throw new ArgumentException($"GPIO pin mode {mode} not supported.", nameof(mode)); } }