/// <inheritDoc /> public Mode GetMode(int gpio) { short value = PiGpioNativeMethods.GetMode((ushort)gpio); if (value < 0) { throw new PiGPIOException(value); } return((Mode)value); }