C# Класс CyrusBuilt.MonoPi.IO.GpioBase

Abstract base class for the GPIO connector on the Pi (P1) (as found next to the yellow RCA video socket on the Rpi circuit board).
Наследование: IRaspiGpio
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
_initValue PinState
_mode PinMode

Открытые методы

Метод Описание
ChangeBoardRevision ( BoardRevision revision ) : void

Changes the board revision.

Dispose ( ) : void

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

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

Provision ( ) : void

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

Pulse ( Int32 millis ) : void

Pulse the pin output for the specified number of milliseconds.

Read ( ) : PinState

Read a value from the pin.

Write ( PinState value ) : void

Write the specified value to the pin.

Защищенные методы

Метод Описание
GetGpioPinNumber ( GpioPins pin ) : String

Gets the GPIO pin number.

GpioBase ( GpioPins pin ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.IO.GpioBase class with a board Revision 1.0 pin.

GpioBase ( GpioPins pin, PinMode mode ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.IO.GpioBase class with a board Revision 1.0 pin and the pin direction.

GpioBase ( GpioPins pin, PinMode mode, PinState value ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.IO.GpioBase class with a board Revision 1.0 GPIO pin, the pin mode, and the initial pin value.

OnStateChanged ( PinStateChangeEventArgs e ) : void

Raises the state changed event.

Описание методов

ChangeBoardRevision() публичный Метод

Changes the board revision.
public ChangeBoardRevision ( BoardRevision revision ) : void
revision BoardRevision /// The board revision. Default is . ///
Результат void

Dispose() публичный Метод

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

GetGpioPinNumber() защищенный статический Метод

Gets the GPIO pin number.
protected static GetGpioPinNumber ( GpioPins pin ) : String
pin GpioPins /// The GPIO pin. ///
Результат String

GpioBase() защищенный Метод

Initializes a new instance of the CyrusBuilt.MonoPi.IO.GpioBase class with a board Revision 1.0 pin.
protected GpioBase ( GpioPins pin ) : System
pin GpioPins /// The GPIO pin. ///
Результат System

GpioBase() защищенный Метод

Initializes a new instance of the CyrusBuilt.MonoPi.IO.GpioBase class with a board Revision 1.0 pin and the pin direction.
protected GpioBase ( GpioPins pin, PinMode mode ) : System
pin GpioPins /// The GPIO pin. ///
mode PinMode /// The I/O pin mode. ///
Результат System

GpioBase() защищенный Метод

Initializes a new instance of the CyrusBuilt.MonoPi.IO.GpioBase class with a board Revision 1.0 GPIO pin, the pin mode, and the initial pin value.
protected GpioBase ( GpioPins pin, PinMode mode, PinState value ) : System
pin GpioPins /// The GPIO pin. ///
mode PinMode /// The I/O pin mode. ///
value PinState /// The initial pin value. ///
Результат System

OnStateChanged() защищенный Метод

Raises the state changed event.
protected OnStateChanged ( PinStateChangeEventArgs e ) : void
e PinStateChangeEventArgs /// The event arguments. ///
Результат void

Provision() публичный абстрактный Метод

Provisions the pin (initialize to specified mode and make active).
public abstract Provision ( ) : void
Результат void

Pulse() публичный Метод

Pulse the pin output for the specified number of milliseconds.
public Pulse ( Int32 millis ) : void
millis System.Int32 /// The number of milliseconds to wait between states. ///
Результат void

Read() публичный абстрактный Метод

Read a value from the pin.
public abstract Read ( ) : PinState
Результат PinState

Write() публичный Метод

Write the specified value to the pin.
public Write ( PinState value ) : void
value PinState /// If set to true value. ///
Результат void

Описание свойств

_initValue защищенное свойство

protected PinState _initValue
Результат PinState

_mode защищенное свойство

protected PinMode _mode
Результат PinMode