Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
|
Public Member Functions | |
LCD () | |
virtual void | begin (uint8_t cols, uint8_t rows, uint8_t charsize=LCD_5x8DOTS) |
void | clear () |
void | home () |
void | noDisplay () |
void | display () |
void | noBlink () |
void | blink () |
void | noCursor () |
void | cursor () |
void | scrollDisplayLeft () |
void | scrollDisplayRight () |
void | leftToRight () |
void | rightToLeft () |
void | moveCursorLeft () |
void | moveCursorRight () |
void | autoscroll () |
void | noAutoscroll () |
void | createChar (uint8_t location, uint8_t charmap[]) |
void | setCursor (uint8_t col, uint8_t row) |
void | backlight (void) |
void | noBacklight (void) |
void | on (void) |
void | off (void) |
virtual void | setBacklightPin (uint8_t value, t_backlighPol pol) |
virtual void | setBacklight (uint8_t value) |
virtual void | write (uint8_t value) |
int | getWriteError () |
Gets last error. More... | |
void | clearWriteError () |
Clears the last write error. More... | |
size_t | write (const char *str) |
Writes a c-string to output stream. More... | |
virtual size_t | write (const uint8_t *buffer, size_t size) |
Writes characters from a buffer to output stream. More... | |
size_t | write (const char *buffer, size_t size) |
Writes characters from a buffer to output stream. More... | |
size_t | print (char) |
Prints a single character to output stream. More... | |
size_t | print (const char[]) |
Prints a c-string to output stream. More... | |
size_t | print (unsigned long, int base=DEC) |
Prints a number to output stream. More... | |
size_t | print (long, int base=DEC) |
Prints a number to output stream. More... | |
size_t | print (unsigned int, int base=DEC) |
size_t | print (unsigned char, int base=DEC) |
size_t | print (int, int base=DEC) |
Prints a number to output stream. More... | |
size_t | print (double, int digits=2) |
Prints number to output stream. More... | |
size_t | print (const Printable &p) |
Prints a Printable object to output stream. More... | |
size_t | print (const String &s) |
Prints a String to output stream. More... | |
size_t | println (void) |
Prints a newline to output stream. More... | |
size_t | println (const char[]) |
Prints a c-string to output stream, appending newline. More... | |
size_t | println (char) |
Prints a single character to output stream, appending newline. More... | |
size_t | println (unsigned char, int base=DEC) |
Prints a number to output stream, appending newline. More... | |
size_t | println (unsigned int, int base=DEC) |
size_t | println (unsigned long, int base=DEC) |
size_t | println (int, int base=DEC) |
Prints a number to output stream, appending newline. More... | |
size_t | println (long, int base=DEC) |
Prints a number to output stream, appending newline. More... | |
size_t | println (double, int digits=2) |
Prints a number to output stream, appending newline. More... | |
size_t | println (const Printable &p) |
Prints a Printable object to output stream, appending newline. More... | |
size_t | println (const String &s) |
Prints a String to output stream, appending newline. More... | |
size_t | printf (const char *fmt,...) |
Prints a formatted c-string to output stream. More... | |
Protected Member Functions | |
void | setWriteError (int err=1) |
Protected Attributes | |
uint8_t | _displayfunction |
uint8_t | _displaycontrol |
uint8_t | _displaymode |
uint8_t | _numlines |
uint8_t | _cols |
t_backlighPol | _polarity |
LCD::LCD | ( | ) |
LiquidCrystal abstract constructor. LiquidCrystal class abstract constructor needed to create the base abstract class.
void LCD::autoscroll | ( | ) |
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.
none |
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.
|
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.
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.
void LCD::blink | ( | ) |
void LCD::clear | ( | ) |
|
inlineinherited |
Clears the last write error.
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.
location[in] | LCD memory location of the character to create (0 to 7) |
charmap[in] | the bitmap array representing each row of the character. |
void LCD::cursor | ( | ) |
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().
none |
|
inlineinherited |
Gets last error.
int | Error number of last write error |
void LCD::home | ( | ) |
void LCD::leftToRight | ( | ) |
void LCD::moveCursorLeft | ( | ) |
Moves the cursor one space to the left.
none |
void LCD::moveCursorRight | ( | ) |
Moves the cursor one space to the right.
none |
void LCD::noAutoscroll | ( | ) |
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.
void LCD::noBlink | ( | ) |
Turns off the blinking of the LCD cursor.
none |
void LCD::noCursor | ( | ) |
Hides the LCD cursor.
none |
void LCD::noDisplay | ( | ) |
void LCD::off | ( | void | ) |
void LCD::on | ( | void | ) |
|
inherited |
Prints a single character to output stream.
size_t | Quantity of characters written to stream |
|
inherited |
Prints a c-string to output stream.
char[] | c-string to print |
size_t | Quantity of characters written to output stream |
size_t | Quantity of characters written to stream |
|
inherited |
Prints a number to output stream.
unsigned long | Number to print |
base | The base for output (Default: Decimal (base 10)) |
size_t | Quantity of characters written to stream |
unsigned int | Number to print |
base | The base for output (Default: Decimal (base 10)) |
size_t | Quantity of characters written to stream |
unsigned char | Number to print |
base | The base for output (Default: Decimal (base 10)) |
size_t | Quantity of characters written to stream |
|
inherited |
Prints a number to output stream.
long | Number to print |
base | The base for output (Default: Decimal (base 10)) |
size_t | Quantity of characters written to stream |
|
inherited |
Prints a number to output stream.
int | Number to print |
base | The base for output (Default: Decimal (base 10)) |
size_t | Quantity of characters written to stream |
|
inherited |
Prints number to output stream.
Prints a number to output stream.
double | Number to print |
int | Decimal places to show |
size_t | Quantity of characters written to output stream |
double | Number to print |
digits | The decimal places to print (Default: 2, e.g. 21.35) |
size_t | Quantity of characters written to stream |
|
inherited |
Prints a Printable object to output stream.
p | Object to print |
size_t | Quantity of characters written to stream |
|
inherited |
|
inherited |
Prints a formatted c-string to output stream.
fmt | Pointer to formated c-string to print |
... | Parameters for placeholders within formated string |
size_t | Quantity of characters written to stream |
|
inherited |
Prints a newline to output stream.
Prints | newline to output stream |
size_t | Quantity of characters written to output stream |
size_t | Quantity of characters written to stream |
|
inherited |
Prints a c-string to output stream, appending newline.
char[] | c-string to print |
size_t | Quantity of characters written to stream |
|
inherited |
Prints a single character to output stream, appending newline.
char | Character to print |
size_t | Quantity of characters written to stream |
|
inherited |
Prints a number to output stream, appending newline.
unsigned char | Number to print |
base | The base for output (Default: Decimal (base 10)) |
size_t | Quantity of characters written to stream |
unsigned int | Number to print |
base | The base for output (Default: Decimal (base 10)) |
size_t | Quantity of characters written to stream |
unsigned long | Number to print |
base | The base for output (Default: Decimal (base 10)) |
size_t | Quantity of characters written to stream |
|
inherited |
Prints a number to output stream, appending newline.
int | Number to print |
base | The base for output (Default: Decimal (base 10)) |
size_t | Quantity of characters written to stream |
|
inherited |
Prints a number to output stream, appending newline.
long | Number to print |
base | The base for output (Default: Decimal (base 10)) |
size_t | Quantity of characters written to stream |
|
inherited |
Prints a number to output stream, appending newline.
double | Number to print |
digits | The decimal places to print (Default: 2, e.g. 21.35) |
size_t | Quantity of characters written to stream |
|
inherited |
Prints a Printable object to output stream, appending newline.
p | Object to print |
size_t | Quantity of characters written to stream |
|
inherited |
void LCD::rightToLeft | ( | ) |
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.
none |
void LCD::scrollDisplayLeft | ( | ) |
Scrolls the contents of the display (text and cursor) one space to the left.
none |
void LCD::scrollDisplayRight | ( | ) |
Scrolls the contents of the display (text and cursor) one space to the right.
none |
|
inlinevirtual |
Sets the pin to control the backlight. Sets the pin in the device to control the backlight. The behaviour of this method is very dependent on the device. Some controllers support dimming some don't. Please read the actual header file for each individual device. The setBacklightPin method has to be called before setting the backlight or the adequate backlight control constructor.
NOTE: The prefered methods to control the backlight are "backlight" and "noBacklight".
0..255 | - the value is very dependent on the LCD. However, BACKLIGHT_OFF will be interpreted as off and BACKLIGHT_ON will drive the backlight on. |
Reimplemented in LiquidCrystal_SR2W, LiquidCrystal_SR3W, LiquidCrystal_SR, LiquidCrystal_I2C, and LiquidCrystal.
|
inlinevirtual |
Sets the pin to control the backlight. Sets the pin in the device to control the backlight. This method is device dependent and can be programmed on each subclass. An empty function call is provided that does nothing.
value | pin associated to backlight control. |
pol | backlight polarity control (POSITIVE, NEGATIVE) |
Reimplemented in LiquidCrystal_SR3W, LiquidCrystal_SR, LiquidCrystal_I2C, and LiquidCrystal.
void LCD::setCursor | ( | uint8_t | col, |
uint8_t | row | ||
) |
|
inlineinherited |
Writes a c-string to output stream.
str | Pointer to c-string |
size_t | Quantity of characters written to stream |
|
virtualinherited |
Writes characters from a buffer to output stream.
buffer | Pointer to character buffer |
size | Quantity of characters to write |
size_t | Quantity of characters written to stream |
Reimplemented in HardwareSerial, CircularBuffer, FileStream, MemoryDataStream, LimitedMemoryStream, TwoWire, EndlessMemoryStream, GdbFileStream, rBootItemOutputStream, and ReadWriteStream.
|
inlineinherited |
Writes characters from a buffer to output stream.
buffer | Pointer to character buffer |
size | Quantity of characters to write |
size_t | Quantity of characters written to stream |
|
virtual |