LCD Library 1.2.1
LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.
Public Member Functions | Protected Attributes
LCD Class Reference

#include <LCD.h>

Inheritance diagram for LCD:
LiquidCrystalLiquidCrystal_I2CLiquidCrystal_SRLiquidCrystal_SR2WLiquidCrystal_SR3W

List of all members.

Public Member Functions

void autoscroll ()
void backlight (void)
virtual void begin (uint8_t cols, uint8_t rows, uint8_t charsize=LCD_5x8DOTS)
void blink ()
void clear ()
void createChar (uint8_t location, uint8_t charmap[])
void cursor ()
void display ()
void home ()
 LCD ()
void leftToRight ()
void moveCursorLeft ()
void moveCursorRight ()
void noAutoscroll ()
void noBacklight (void)
void noBlink ()
void noCursor ()
void noDisplay ()
void off (void)
void on (void)
void rightToLeft ()
void scrollDisplayLeft ()
void scrollDisplayRight ()
virtual void setBacklight (uint8_t value)
virtual void setBacklightPin (uint8_t value, t_backlighPol pol)
void setCursor (uint8_t col, uint8_t row)
virtual void write (uint8_t value)

Protected Attributes

uint8_t _cols
uint8_t _displaycontrol
uint8_t _displayfunction
uint8_t _displaymode
uint8_t _numlines
t_backlighPol _polarity

Detailed Description

Definition at line 169 of file LCD.h.


Constructor & Destructor Documentation

LCD::LCD ()

LiquidCrystal abstract constructor. LiquidCrystal class abstract constructor needed to create the base abstract class.

Definition at line 49 of file LCD.cpp.


Member Function Documentation

void LCD::autoscroll (void )

Turns on automatic scrolling of the LCD. Turns on automatic scrolling of the LCD. This causes each character output to the display to push previous characters over by one space. If the current text direction is left-to-right (the default), the display scrolls to the left; if the current direction is right-to-left, the display scrolls to the right. This has the effect of outputting each new character to the same location on the LCD.

Parameters:
none

Definition at line 271 of file LCD.cpp.

void LCD::backlight (void )

Switch-on the LCD backlight. Switch-on the LCD backlight. The setBacklightPin has to be called before setting the backlight for this method to work.

See also:
setBacklightPin.

Definition at line 301 of file LCD.cpp.

void LCD::begin (uint8_t cols,
uint8_t rows,
uint8_t charsize = LCD_5x8DOTS 
) [virtual]

LCD initialization. Initializes the LCD to a given size (col, row). This methods initializes the LCD, therefore, it MUST be called prior to using any other method from this class.

This method is abstract, a base implementation is available common to all LCD drivers. Should it not be compatible with some other LCD driver, a derived implementation should be done on the driver specif class.

Parameters:
cols[in]the number of columns that the display has
rows[in]the number of rows that the display has
charsize[in]character size, default==LCD_5x8DOTS

Reimplemented in LiquidCrystal_I2C.

Definition at line 76 of file LCD.cpp.

void LCD::blink ()

Display the cursor of the LCD. Display the blinking LCD cursor. If used in combination with the cursor() function, the result will depend on the particular display.

Parameters:
none

Definition at line 226 of file LCD.cpp.

void LCD::clear ()

Clears the LCD. Clears the LCD screen and positions the cursor in the upper-left corner.

This operation is time consuming for the LCD.

Parameters:
none

Definition at line 159 of file LCD.cpp.

void LCD::createChar (uint8_t location,
uint8_t charmap[] 
)

Creates a custom character for use on the LCD. Create a custom character (glyph) for use on the LCD. Most chipsets only support up to eight characters of 5x8 pixels. Therefore, this methods has been limited to locations (numbered 0 to 7).

The appearance of each custom character is specified by an array of eight bytes, one for each row. The five least significant bits of each byte determine the pixels in that row. To display a custom character on screen, write()/print() its number, i.e. lcd.print (char(x)); // Where x is 0..7.

Parameters:
location[in]LCD memory location of the character to create (0 to 7)
charmap[in]the bitmap array representing each row of the character.

Definition at line 285 of file LCD.cpp.

void LCD::cursor ()

Display the LCD cursor. Display the LCD cursor: an underscore (line) at the location where the next character will be written.

Parameters:
none

Definition at line 213 of file LCD.cpp.

void LCD::display ()

Turns on the LCD display. Turns on the LCD display, after it's been turned off with noDisplay(). This will restore the text (and cursor location) that was on the display prior to calling noDisplay().

Parameters:
none

Definition at line 201 of file LCD.cpp.

void LCD::home ()

Sets the cursor to the upper-left corner. Positions the cursor in the upper-left of the LCD. That is, use that location in outputting subsequent text to the display. To also clear the display, use the clear() function instead.

This operation is time consuming for the LCD.

Parameters:
none

Definition at line 165 of file LCD.cpp.

void LCD::leftToRight (void )

Set the direction for text written to the LCD to left-to-right. Set the direction for text written to the LCD to left-to-right. All subsequent characters written to the display will go from left to right, but does not affect previously-output text.

This is the default configuration.

Parameters:
none

Definition at line 244 of file LCD.cpp.

void LCD::moveCursorLeft (void )
void LCD::moveCursorRight (void )
void LCD::noAutoscroll (void )

Turns off automatic scrolling of the LCD. Turns off automatic scrolling of the LCD, this is the default configuration of the LCD.

Parameters:
none

Definition at line 278 of file LCD.cpp.

void LCD::noBacklight (void )

Switch-off the LCD backlight. Switch-off the LCD backlight. The setBacklightPin has to be called before setting the backlight for this method to work.

See also:
setBacklightPin.

Definition at line 308 of file LCD.cpp.

void LCD::noBlink ()

Turns off the blinking of the LCD cursor.

Parameters:
none

Definition at line 220 of file LCD.cpp.

void LCD::noCursor ()

Hides the LCD cursor.

Parameters:
none

Definition at line 208 of file LCD.cpp.

void LCD::noDisplay ()

Turns off the LCD display. Turns off the LCD display, without losing the text currently being displayed on it.

Parameters:
none

Definition at line 195 of file LCD.cpp.

void LCD::off (void )

Switch off the LCD module. Switch off the LCD module, it will switch off the LCD controller and the backlight. This method has the same effect of calling noDisplay and noBacklight.

See also:
display,
backlight

Definition at line 323 of file LCD.cpp.

void LCD::on (void )

Switch on the LCD module. Switch on the LCD module, it will switch on the LCD controller and the backlight. This method has the same effect of calling display and backlight.

See also:
display,
backlight

Definition at line 315 of file LCD.cpp.

void LCD::rightToLeft (void )

Set the direction for text written to the LCD to right-to-left. Set the direction for text written to the LCD to right-to-left. All subsequent characters written to the display will go from right to left, but does not affect previously-output text.

left-to-right is the default configuration.

Parameters:
none

Definition at line 251 of file LCD.cpp.

void LCD::scrollDisplayLeft (void )
void LCD::scrollDisplayRight (void )
virtual void LCD::setBacklight (uint8_t value) [inline, virtual]
virtual void LCD::setBacklightPin (uint8_t value,
t_backlighPol pol 
) [inline, virtual]
void LCD::setCursor (uint8_t col,
uint8_t row 
)

Position the LCD cursor. Sets the position of the LCD cursor. Set the location at which subsequent text written to the LCD will be displayed.

Parameters:
col[in]LCD column
row[in]LCD row - line.

Definition at line 171 of file LCD.cpp.

void LCD::write (uint8_t value) [virtual]

Writes to the LCD. This method writes character to the LCD in the current cursor position.

This is the virtual write method, implemented in the Print class, therefore all Print class methods will end up calling this method.

Parameters:
value[in]Value to write to the LCD.

Definition at line 337 of file LCD.cpp.


Member Data Documentation

uint8_t LCD::_cols [protected]
uint8_t LCD::_displaycontrol [protected]
uint8_t LCD::_displayfunction [protected]
uint8_t LCD::_displaymode [protected]
uint8_t LCD::_numlines [protected]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines