Toolbox.NETMF.Hardware.IGPOPort


This is a generic interface used by multiplex classes in the .NETMF Toolbox.
If you want to use this interface directly, I suggest to use the Toolbox.NETMF.Hardware.IntegratedGPO class.

Methods

  • Write(State) Writes the value, true for high, false for low.
  • Dispose() Releases the SPI pins (when using the bitbang constructor)

Property

  • State Returns the last written state

Sample code in C#

IGPOPort Pin = new IntegratedGPO(Pins.GPIO_PIN_D0);

while (true)
{
    Pin.Write(!Pin.State);
    Thread.Sleep(1000);
}

Sample code in VB

Dim Pin as IGPOPort = new IntegratedGPO(Pins.GPIO_PIN_D0)

Do
    Pin.Write(Not Pin.State)
    Thread.Sleep(1000)
Loop

Last edited Jul 15, 2012 at 8:48 PM by Garrcomm, version 1