C# Class CyrusBuilt.MonoPi.LCD.GpioMemLcdTransferProvider

Raspberry Pi GPIO (via memory) provider for the Micro Liquid Crystal library.
Inheritance: ILcdTransferProvider
Mostra file Open project: cyrusbuilt/MonoPi

Public Methods

Method Description
Dispose ( ) : void

Releases all resource used by the CyrusBuilt.MonoPi.LCD.GpioFileLcdTransferProvider object.

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

GpioMemLcdTransferProvider ( System.Boolean fourBitMode, GpioPins rs, GpioPins rw, GpioPins enable, GpioPins d0, GpioPins d1, GpioPins d2, GpioPins d3, GpioPins d4, GpioPins d5, GpioPins d6, GpioPins d7 ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.LCD.GpioMemLcdTransferProvider class with the mode flag, register select pin, read/write pin, enable pin, and data pins.

The display can be controlled using 4 or 8 data lines. If the former, omit the pin numbers for d0 to d3 and leave those lines disconnected. The RW pin can be tied to ground instead of connected to a pin on the Arduino; If so, omit it from this constructor's parameters.

GpioMemLcdTransferProvider ( GpioPins rs, GpioPins enable, GpioPins d4, GpioPins d5, GpioPins d6, GpioPins d7 ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.LCD.GpioMemLcdTransferProvider class with the mode flag, register select pin, read/write pin, enable pin, and data pins.

The display can be controlled using 4 or 8 data lines. If the former, omit the pin numbers for d0 to d3 and leave those lines disconnected. The RW pin can be tied to ground instead of connected to a pin on the Arduino; If so, omit it from this constructor's parameters.

GpioMemLcdTransferProvider ( GpioPins rs, GpioPins rw, GpioPins enable, GpioPins d4, GpioPins d5, GpioPins d6, GpioPins d7 ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.LCD.GpioMemLcdTransferProvider class with the mode flag, register select pin, read/write pin, enable pin, and data pins.

The display can be controlled using 4 or 8 data lines. If the former, omit the pin numbers for d0 to d3 and leave those lines disconnected. The RW pin can be tied to ground instead of connected to a pin on the Arduino; If so, omit it from this constructor's parameters.

GpioMemLcdTransferProvider ( GpioPins rs, GpioPins enable, GpioPins d0, GpioPins d1, GpioPins d2, GpioPins d3, GpioPins d4, GpioPins d5, GpioPins d6, GpioPins d7 ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.LCD.GpioMemLcdTransferProvider class with the mode flag, register select pin, read/write pin, enable pin, and data pins.

The display can be controlled using 4 or 8 data lines. If the former, omit the pin numbers for d0 to d3 and leave those lines disconnected. The RW pin can be tied to ground instead of connected to a pin on the Arduino; If so, omit it from this constructor's parameters.

GpioMemLcdTransferProvider ( GpioPins rs, GpioPins rw, GpioPins enable, GpioPins d0, GpioPins d1, GpioPins d2, GpioPins d3, GpioPins d4, GpioPins d5, GpioPins d6, GpioPins d7 ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.LCD.GpioMemLcdTransferProvider class with the mode flag, register select pin, read/write pin, enable pin, and data pins.

The display can be controlled using 4 or 8 data lines. If the former, omit the pin numbers for d0 to d3 and leave those lines disconnected. The RW pin can be tied to ground instead of connected to a pin on the Arduino; If so, omit it from this constructor's parameters.

Send ( Byte value, PinState mode, System.Boolean backlight ) : void

Write either command or data, with automatic 4/8-bit selection.

Private Methods

Method Description
Dispose ( System.Boolean disposing ) : void

Dispose this instance and release managed resources.

PulseEnable ( ) : void

Pulses the enable pin.

Write4Bits ( Byte value ) : void

Writes the command or data in 4bit mode (the last 4 data lines).

Write8Bits ( Byte value ) : void

Writes the command or data in 8bit mode (all 8 data lines).

Method Details

Dispose() public method

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

GpioMemLcdTransferProvider() public method

Initializes a new instance of the CyrusBuilt.MonoPi.LCD.GpioMemLcdTransferProvider class with the mode flag, register select pin, read/write pin, enable pin, and data pins.
The display can be controlled using 4 or 8 data lines. If the former, omit the pin numbers for d0 to d3 and leave those lines disconnected. The RW pin can be tied to ground instead of connected to a pin on the Arduino; If so, omit it from this constructor's parameters.
/// and cannot be set to /// . ///
public GpioMemLcdTransferProvider ( System.Boolean fourBitMode, GpioPins rs, GpioPins rw, GpioPins enable, GpioPins d0, GpioPins d1, GpioPins d2, GpioPins d3, GpioPins d4, GpioPins d5, GpioPins d6, GpioPins d7 ) : System
fourBitMode System.Boolean /// If set to true, switch to four bit mode instead of 8 bit mode. ///
rs GpioPins /// The number of the CPU pin that is connected to the RS (Register Select) /// pin on the LCD. ///
rw GpioPins /// The number of the CPU pin that is connected to the RW (Read/Write) /// pin on the LCD. ///
enable GpioPins /// The number of the CPU pin that is connected to the enable pin /// on the LCD. ///
d0 GpioPins /// Data line 0. ///
d1 GpioPins /// Data line 1. ///
d2 GpioPins /// Data line 2. ///
d3 GpioPins /// Data line 3. ///
d4 GpioPins /// Data line 4. ///
d5 GpioPins /// Data line 5. ///
d6 GpioPins /// Data line 6. ///
d7 GpioPins /// Data line 7. ///
return System

GpioMemLcdTransferProvider() public method

Initializes a new instance of the CyrusBuilt.MonoPi.LCD.GpioMemLcdTransferProvider class with the mode flag, register select pin, read/write pin, enable pin, and data pins.
The display can be controlled using 4 or 8 data lines. If the former, omit the pin numbers for d0 to d3 and leave those lines disconnected. The RW pin can be tied to ground instead of connected to a pin on the Arduino; If so, omit it from this constructor's parameters.
/// and cannot be set to /// . ///
public GpioMemLcdTransferProvider ( GpioPins rs, GpioPins enable, GpioPins d4, GpioPins d5, GpioPins d6, GpioPins d7 ) : System
rs GpioPins /// The number of the CPU pin that is connected to the RS (Register Select) /// pin on the LCD. ///
enable GpioPins /// The number of the CPU pin that is connected to the enable pin /// on the LCD. ///
d4 GpioPins /// Data line 4. ///
d5 GpioPins /// Data line 5. ///
d6 GpioPins /// Data line 6. ///
d7 GpioPins /// Data line 7. ///
return System

GpioMemLcdTransferProvider() public method

Initializes a new instance of the CyrusBuilt.MonoPi.LCD.GpioMemLcdTransferProvider class with the mode flag, register select pin, read/write pin, enable pin, and data pins.
The display can be controlled using 4 or 8 data lines. If the former, omit the pin numbers for d0 to d3 and leave those lines disconnected. The RW pin can be tied to ground instead of connected to a pin on the Arduino; If so, omit it from this constructor's parameters.
/// and cannot be set to /// . ///
public GpioMemLcdTransferProvider ( GpioPins rs, GpioPins rw, GpioPins enable, GpioPins d4, GpioPins d5, GpioPins d6, GpioPins d7 ) : System
rs GpioPins /// The number of the CPU pin that is connected to the RS (Register Select) /// pin on the LCD. ///
rw GpioPins /// The number of the CPU pin that is connected to the RW (Read/Write) /// pin on the LCD. ///
enable GpioPins /// The number of the CPU pin that is connected to the enable pin /// on the LCD. ///
d4 GpioPins /// Data line 4. ///
d5 GpioPins /// Data line 5. ///
d6 GpioPins /// Data line 6. ///
d7 GpioPins /// Data line 7. ///
return System

GpioMemLcdTransferProvider() public method

Initializes a new instance of the CyrusBuilt.MonoPi.LCD.GpioMemLcdTransferProvider class with the mode flag, register select pin, read/write pin, enable pin, and data pins.
The display can be controlled using 4 or 8 data lines. If the former, omit the pin numbers for d0 to d3 and leave those lines disconnected. The RW pin can be tied to ground instead of connected to a pin on the Arduino; If so, omit it from this constructor's parameters.
/// and cannot be set to /// . ///
public GpioMemLcdTransferProvider ( GpioPins rs, GpioPins enable, GpioPins d0, GpioPins d1, GpioPins d2, GpioPins d3, GpioPins d4, GpioPins d5, GpioPins d6, GpioPins d7 ) : System
rs GpioPins /// The number of the CPU pin that is connected to the RS (Register Select) /// pin on the LCD. ///
enable GpioPins /// The number of the CPU pin that is connected to the enable pin /// on the LCD. ///
d0 GpioPins /// Data line 0. ///
d1 GpioPins /// Data line 1. ///
d2 GpioPins /// Data line 2. ///
d3 GpioPins /// Data line 3. ///
d4 GpioPins /// Data line 4. ///
d5 GpioPins /// Data line 5. ///
d6 GpioPins /// Data line 6. ///
d7 GpioPins /// Data line 7. ///
return System

GpioMemLcdTransferProvider() public method

Initializes a new instance of the CyrusBuilt.MonoPi.LCD.GpioMemLcdTransferProvider class with the mode flag, register select pin, read/write pin, enable pin, and data pins.
The display can be controlled using 4 or 8 data lines. If the former, omit the pin numbers for d0 to d3 and leave those lines disconnected. The RW pin can be tied to ground instead of connected to a pin on the Arduino; If so, omit it from this constructor's parameters.
/// and cannot be set to /// . ///
public GpioMemLcdTransferProvider ( GpioPins rs, GpioPins rw, GpioPins enable, GpioPins d0, GpioPins d1, GpioPins d2, GpioPins d3, GpioPins d4, GpioPins d5, GpioPins d6, GpioPins d7 ) : System
rs GpioPins /// The number of the CPU pin that is connected to the RS (Register Select) /// pin on the LCD. ///
rw GpioPins /// The number of the CPU pin that is connected to the RW (Read/Write) /// pin on the LCD. ///
enable GpioPins /// The number of the CPU pin that is connected to the enable pin /// on the LCD. ///
d0 GpioPins /// Data line 0. ///
d1 GpioPins /// Data line 1. ///
d2 GpioPins /// Data line 2. ///
d3 GpioPins /// Data line 3. ///
d4 GpioPins /// Data line 4. ///
d5 GpioPins /// Data line 5. ///
d6 GpioPins /// Data line 6. ///
d7 GpioPins /// Data line 7. ///
return System

Send() public method

Write either command or data, with automatic 4/8-bit selection.
public Send ( Byte value, PinState mode, System.Boolean backlight ) : void
value Byte /// The data or command to send. ///
mode PinState /// Mode for register-select pin (PinState.High = on, PinState.Low = off). ///
backlight System.Boolean /// Turns the backlight on or off. ///
return void