C# Class CyrusBuilt.MonoPi.IO.PiFaceDigitalGPIO

PiFace GPIO pin implementing DMA.
Inheritance: PiFaceGpioBase
Afficher le fichier Open project: cyrusbuilt/MonoPi

Méthodes publiques

Méthode 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

Méthode 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 méthode

Destroy this GPIO factory.
public static Destroy ( ) : void
Résultat void

Dispose() public méthode

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
Résultat void

Initialize() public static méthode

Initialize the memory access to the GPIO.
public static Initialize ( ) : System.Boolean
Résultat System.Boolean

PiFaceDigitalGPIO() public méthode

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. ///
Résultat System

PiFaceDigitalGPIO() public méthode

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. ///
Résultat System

Provision() public méthode

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

Pulse() public méthode

Pulses the pin for 500ms.
public Pulse ( ) : void
Résultat void

Pulse() public méthode

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. ///
Résultat void

Read() public méthode

Read a value from the pin.
public Read ( ) : PinState
Résultat PinState

Read() public static méthode

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

ToString() public méthode

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

Write() public static méthode

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. ///
Résultat void

Write() public méthode

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