C# Class CyrusBuilt.MonoPi.IO.PCF.PCF8574Pin

Represents a TI PCF8574 GPIO pin abstraction. This class also provides hard implementations of all 8 of the GPIO pins on the PCF8574.
Inheritance: IPCF8574Pin
Mostrar archivo Open project: cyrusbuilt/MonoPi

Public Properties

Property Type Description
ALL IPCF8574Pin[]
GPIO_00 IPCF8574Pin
GPIO_01 IPCF8574Pin
GPIO_02 IPCF8574Pin
GPIO_03 IPCF8574Pin
GPIO_04 IPCF8574Pin
GPIO_05 IPCF8574Pin
GPIO_06 IPCF8574Pin
GPIO_07 IPCF8574Pin

Public Methods

Method Description
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

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

PCF8574Pin ( ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.IO.PCF.PCF8574Pin class. This is the default constructor.

PCF8574Pin ( Int32 address ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.IO.PCF.PCF8574Pin class with the address of the pin.

PCF8574Pin ( Int32 address, String name ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.IO.PCF.PCF8574Pin class with the address and name of the pin.

PCF8574Pin ( String provider, Int32 address, String name ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.IO.PCF.PCF8574Pin class with the GPIO provider, address, and name of the pin.

SetMode ( PinMode mode ) : void

Sets the pin mode.

SetState ( PinState state ) : void

Sets the state of the pin.

ToString ( ) : string

Returns a System.String that represents the current CyrusBuilt.MonoPi.IO.PCF.PCF8574Pin.

Private Methods

Method Description
CreateDigitalPin ( Int32 address, String name ) : PCF8574Pin

Factory method for creating a digital PCF8574 pin.

Method Details

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Call Dispose when you are finished using the CyrusBuilt.MonoPi.IO.PCF.PCF8574Pin. The Dispose method leaves the CyrusBuilt.MonoPi.IO.PCF.PCF8574Pin in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.IO.PCF.PCF8574Pin so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.IO.PCF.PCF8574Pin was occupying.
public Dispose ( ) : void
return void

PCF8574Pin() public method

Initializes a new instance of the CyrusBuilt.MonoPi.IO.PCF.PCF8574Pin class. This is the default constructor.
public PCF8574Pin ( ) : System
return System

PCF8574Pin() public method

Initializes a new instance of the CyrusBuilt.MonoPi.IO.PCF.PCF8574Pin class with the address of the pin.
public PCF8574Pin ( Int32 address ) : System
address System.Int32 /// The address of the pin. ///
return System

PCF8574Pin() public method

Initializes a new instance of the CyrusBuilt.MonoPi.IO.PCF.PCF8574Pin class with the address and name of the pin.
public PCF8574Pin ( Int32 address, String name ) : System
address System.Int32 /// The address of the pin. ///
name String /// The name of the pin. ///
return System

PCF8574Pin() public method

Initializes a new instance of the CyrusBuilt.MonoPi.IO.PCF.PCF8574Pin class with the GPIO provider, address, and name of the pin.
public PCF8574Pin ( String provider, Int32 address, String name ) : System
provider String /// The GPIO pin provider. ///
address System.Int32 /// The address of the pin. ///
name String /// The name of the pin. ///
return System

SetMode() public method

Sets the pin mode.
public SetMode ( PinMode mode ) : void
mode PinMode /// The pin mode. ///
return void

SetState() public method

Sets the state of the pin.
public SetState ( PinState state ) : void
state PinState /// The pin state. ///
return void

ToString() public method

Returns a System.String that represents the current CyrusBuilt.MonoPi.IO.PCF.PCF8574Pin.
public ToString ( ) : string
return string

Property Details

ALL public_oe static_oe property

An array of all 8 pins.
public static IPCF8574Pin[] ALL
return IPCF8574Pin[]

GPIO_00 public_oe static_oe property

The GPIO 0 pin (at address 0).
public static IPCF8574Pin GPIO_00
return IPCF8574Pin

GPIO_01 public_oe static_oe property

The GPIO 1 pin (at address 1).
public static IPCF8574Pin GPIO_01
return IPCF8574Pin

GPIO_02 public_oe static_oe property

The GPIO 2 pin (at address 2).
public static IPCF8574Pin GPIO_02
return IPCF8574Pin

GPIO_03 public_oe static_oe property

The GPIO 3 pin (at address 3).
public static IPCF8574Pin GPIO_03
return IPCF8574Pin

GPIO_04 public_oe static_oe property

The GPIO 4 pin (at address 4).
public static IPCF8574Pin GPIO_04
return IPCF8574Pin

GPIO_05 public_oe static_oe property

The GPIO 5 pin (at address 5).
public static IPCF8574Pin GPIO_05
return IPCF8574Pin

GPIO_06 public_oe static_oe property

The GPIO 6 pin (at address 6).
public static IPCF8574Pin GPIO_06
return IPCF8574Pin

GPIO_07 public_oe static_oe property

The GPIO 7 pin (at address 7).
public static IPCF8574Pin GPIO_07
return IPCF8574Pin