Releasing DigitalOutput pin

Hi everybody,

I’m having some issues with Gadgeteer. How does one release a pin after one is done with it?

I have a chip that needs it’s I2C pins pulled low during a reset, so I declare them as OutputPort, Release from reset, but now I can’t reuse the I2C pins in SoftwareI2C as Gadgeteer thinks that the pin is already used.

Any ideas?

Your not the only one…

Could this work??

 GT.Socket S = GT.Socket.GetSocket(1, false, null, "Y");
            DigitalOutput Reset = new DigitalOutput(S, GT.Socket.Pin.Five, true, null);
            DigitalOutput SerialEnable = new DigitalOutput(S, GT.Socket.Pin.Six, true, null);


           using(Microsoft.SPOT.Hardware.OutputPort SDIO = new OutputPort(GT.Socket.GetSocket(S.SocketNumber, true, null, null).CpuPins[8], false))
            I2C = new SoftwareI2C(S, GT.Socket.Pin.Eight, GT.Socket.Pin.Seven, null);

I thought about using plain MF, but I would have liked to keep it pure Gadgeteer.

I assumed that I was just doing something dumb… :slight_smile:

looks like there is no way to Dispose a pin in 4.2…