Display text on LCD displays (even on multiple ones). Allow to create windows (frames) on display, and to combine them (split, add, duplicate, scroll). See http://mbed.org/users/hlipka/notebook/lcdwindow/ for more information.
KS0108LCD8bit Class Reference
class for connecting graphical KS0108-based LCD-Display (or using similiar controllers) displays are connected in 8bit-mode for displaying ASCII, the vincent font from http://forum.osdev.org/viewtopic.php?f=2&t=22033 is used (courtesy to Quinn Evans) More...
#include <ks0108_8bit.h>
Inherits TextLCDBase.
Public Member Functions | |
KS0108LCD8bit (const unsigned int columns, const unsigned int rows, BusOut *data, const PinName enable, const PinName rs, const PinName leftCS, const PinName rightCS) | |
virtual void | init () |
this is the only function added to the Window interface it must be called from the outside, and initializes the display. | |
virtual void | writeText (const unsigned int column, const unsigned int row, const char text[]) |
write text into the window, at the given position. | |
virtual void | clear () |
clears the window | |
virtual void | character (int column, int row, int c) |
writes a character to the specified position must be public because it is used during delegation | |
virtual int | getRows () |
virtual int | getColumns () |
virtual void | locate (int column, int row) |
set (internal) cursor to a screen column and row | |
int | putc (int c) |
Write a character to the LCD, on the position specified by the cursor sets the cursor to the next position, and wraps (from right to left, next line, and from bottom back to top) | |
int | printf (const char *format,...) |
Write a formated string to the LCD, on the position specified by the cursor does wrap around (as specified by putc) |
Detailed Description
class for connecting graphical KS0108-based LCD-Display (or using similiar controllers) displays are connected in 8bit-mode for displaying ASCII, the vincent font from http://forum.osdev.org/viewtopic.php?f=2&t=22033 is used (courtesy to Quinn Evans)
Definition at line 39 of file ks0108_8bit.h.
Constructor & Destructor Documentation
KS0108LCD8bit | ( | const unsigned int | columns, |
const unsigned int | rows, | ||
BusOut * | data, | ||
const PinName | enable, | ||
const PinName | rs, | ||
const PinName | leftCS, | ||
const PinName | rightCS | ||
) |
- Parameters:
-
columns number of chars per line (using an 8x8 font) rows number of lines (using an 8x8 font) data the bus object used for sending data (must be 8bit) enable the pin name for the enable line (1=active) rs the pin name for the register select line (0=cmd, 1=data) leftCS the pin name for the left display half (1=active) rightCS the pin name for the right display half (1=active, use NC for smaller displays)
Definition at line 97 of file ks0108_8bit.cpp.
Member Function Documentation
void character | ( | int | column, |
int | row, | ||
int | c | ||
) | [virtual] |
writes a character to the specified position must be public because it is used during delegation
- Parameters:
-
column The horizontal position from the left, indexed from 0 row The vertical position from the top, indexed from 0 c the character
Implements Window.
Definition at line 65 of file ks0108_8bit.cpp.
void clear | ( | ) | [virtual] |
virtual int getColumns | ( | ) | [virtual, inherited] |
virtual int getRows | ( | ) | [virtual, inherited] |
void init | ( | ) | [virtual] |
this is the only function added to the Window interface it must be called from the outside, and initializes the display.
Implements TextLCDBase.
Definition at line 115 of file ks0108_8bit.cpp.
void locate | ( | int | column, |
int | row | ||
) | [virtual, inherited] |
set (internal) cursor to a screen column and row
- Parameters:
-
column The horizontal position from the left, indexed from 0 row The vertical position from the top, indexed from 0
Definition at line 26 of file window.cpp.
int printf | ( | const char * | format, |
... | |||
) | [inherited] |
Write a formated string to the LCD, on the position specified by the cursor does wrap around (as specified by putc)
- Parameters:
-
format A printf-style format string, followed by the variables to use in formating the string.
Reimplemented in TextLCDAdapter.
int putc | ( | int | c ) | [inherited] |
Write a character to the LCD, on the position specified by the cursor sets the cursor to the next position, and wraps (from right to left, next line, and from bottom back to top)
- Parameters:
-
c The character to write to the display
Reimplemented in TextLCDAdapter.
void writeText | ( | const unsigned int | column, |
const unsigned int | row, | ||
const char | text[] | ||
) | [virtual] |
write text into the window, at the given position.
this doesn't change the internal cursor position Implementations should check for the length of the text and shorten it accordingly. columns the column where to write row the line where to write text the text to write
Implements Window.
Definition at line 33 of file ks0108_8bit.cpp.
Generated on Tue Jul 12 2022 20:45:22 by 1.7.2