CyrusBuilt.MonoPi.IO.GpioMem.internal_UnexportPin C# (CSharp) Method

internal_UnexportPin() private static method

Unexports an exported pin.
private static internal_UnexportPin ( Int32 pin, String gpionum ) : void
pin System.Int32 /// The pin to unexport. ///
gpionum String /// The GPIO number. ///
return void
		private static void internal_UnexportPin(Int32 pin, String gpionum) {
			Debug.WriteLine("Unexporting pin " + pin.ToString());
			// TODO Somehow reverse what we did in internal_ExportPin? Is there
			// a way to "free" the pin in the libbcm2835 library?
			UnsafeNativeMethods.bcm2835_gpio_write((uint)pin, (uint)PinState.Low);
			UnsafeNativeMethods.bcm2835_gpio_fsel((uint)pin, (uint)PinMode.TRI);
			ExportedPins.Remove(pin);
		}