/// <inheritDoc /> public void SetMode(int gpio, Mode mode) { short ret = PiGpioNativeMethods.SetMode((ushort)gpio, (ushort)mode); if (ret < 0) { throw new PiGPIOException(ret); } }