C# Class CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO

PiFace GPIO pin implementing DMA.
Inheritance: PiFaceGpioBase
Show file Open project: cyrusbuilt/MonoPi

Public Methods

Method Description
Destroy ( ) : void

Destroy this GPIO factory.

Dispose ( ) : void

Releases all resource used by the CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO object.

Call Dispose when you are finished using the CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO. The Dispose method leaves the CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO was occupying.

Initialize ( ) : System.Boolean

Initialize the memory access to the GPIO.

PiFaceDigitalGPIO ( PiFacePins pin ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO class with the PiFace pin to control.

PiFaceDigitalGPIO ( PiFacePins pin, PinState initialValue ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO class with the PiFace pin to control and the initial value to write.

Provision ( ) : void

Provisions the pin (initialize to specified mode and make active).

Pulse ( ) : void

Pulses the pin for 500ms.

Pulse ( Int32 millis ) : void

Pulse the pin output for the specified number of milliseconds.

Read ( ) : PinState

Read a value from the pin.

Read ( PiFacePins pin ) : PinState

Read the specified Revision 1.0 pin.

ToString ( ) : String

Returns a String that represents the current CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO.

Write ( PiFacePins pin, PinState value ) : void

Write the specified pin and value.

Write ( PinState value ) : void

Write the specified value to the pin.

Private Methods

Method Description
ExportPin ( PiFacePins pin, PinMode mode ) : void

Exports the pin setting the direction.

UnexportPin ( PiFacePins pin ) : void

Unexport the GPIO.

internal_ExportPin ( Int32 pin, PinMode mode ) : void

Export the GPIO setting the direction.

internal_Read ( Int32 pin, String pinname ) : PinState

Read the value of the specified pin.

internal_UnexportPin ( Int32 pin ) : void

Unexports an exported pin.

internal_Write ( Int32 pin, PinState value, String pinname ) : void

Write the value to the specified pin.

Method Details

Destroy() public static method

Destroy this GPIO factory.
public static Destroy ( ) : void
return void

Dispose() public method

Releases all resource used by the CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO object.
Call Dispose when you are finished using the CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO. The Dispose method leaves the CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO was occupying.
public Dispose ( ) : void
return void

Initialize() public static method

Initialize the memory access to the GPIO.
public static Initialize ( ) : System.Boolean
return System.Boolean

PiFaceDigitalGPIO() public method

Initializes a new instance of the CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO class with the PiFace pin to control.
public PiFaceDigitalGPIO ( PiFacePins pin ) : System
pin PiFacePins /// The PiFace pin to control. ///
return System

PiFaceDigitalGPIO() public method

Initializes a new instance of the CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO class with the PiFace pin to control and the initial value to write.
public PiFaceDigitalGPIO ( PiFacePins pin, PinState initialValue ) : System
pin PiFacePins /// The PiFace pin to control. ///
initialValue PinState /// The initial value to write. ///
return System

Provision() public method

Provisions the pin (initialize to specified mode and make active).
public Provision ( ) : void
return void

Pulse() public method

Pulses the pin for 500ms.
public Pulse ( ) : void
return void

Pulse() public method

Pulse the pin output for the specified number of milliseconds.
/// An attempt was made to pulse an input pin. ///
public Pulse ( Int32 millis ) : void
millis System.Int32 /// The number of milliseconds to wait between states. ///
return void

Read() public method

Read a value from the pin.
public Read ( ) : PinState
return PinState

Read() public static method

Read the specified Revision 1.0 pin.
public static Read ( PiFacePins pin ) : PinState
pin PiFacePins /// The pin to read. ///
return PinState

ToString() public method

Returns a String that represents the current CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO.
public ToString ( ) : String
return String

Write() public static method

Write the specified pin and value.
public static Write ( PiFacePins pin, PinState value ) : void
pin PiFacePins /// The pin to write to. ///
value PinState /// The value to write. ///
return void

Write() public method

Write the specified value to the pin.
public Write ( PinState value ) : void
value PinState /// The value to write to the pin. ///
return void