X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=nxtOSEK%2Fecrobot%2Fc%2B%2B%2Fhtml%2Fclassecrobot_1_1_lcd.html;fp=nxtOSEK%2Fecrobot%2Fc%2B%2B%2Fhtml%2Fclassecrobot_1_1_lcd.html;h=b15eb09b1269170eb3c86660debd57e23a15e9c1;hb=e81c1a1ebc8b70643a4d919834db16699bf28a3a;hp=0000000000000000000000000000000000000000;hpb=8d9be45716cdcc96fb413e0efaf644d0919976e5;p=nxt-jsp%2Fetrobo-atk.git diff --git a/nxtOSEK/ecrobot/c++/html/classecrobot_1_1_lcd.html b/nxtOSEK/ecrobot/c++/html/classecrobot_1_1_lcd.html new file mode 100644 index 0000000..b15eb09 --- /dev/null +++ b/nxtOSEK/ecrobot/c++/html/classecrobot_1_1_lcd.html @@ -0,0 +1,363 @@ + + +
+ +Simple LCD display class. +More...
+ +#include <Lcd.h>
Public Member Functions | |
Lcd (void) | |
Constructor. | |
void | cursor (U32 x, U32 y) |
Set cursor to (x,y) position. | |
void | clear (bool lcdToo=false) |
Clear LCD data buffer and reset cursor position to (0,0). | |
bool | clearRow (U32 row, bool lcdToo=false) |
Clear LCD data buffer at the specified row. | |
bool | putf (const CHAR *format,...) |
Put output to the LCD data buffer, according to format and other arguments passed to putf(). | |
void | draw (const U8 *data, U32 width, U32 depth, U32 xPosInWidth, U32 yPosInDepth) |
Draw monochrome bit map data to the LCD data buffer. | |
void | disp (void) |
Display data in the LCD data buffer to the LCD. | |
Static Public Attributes | |
+static const U32 | MAX_CURSOR_X = 15 |
Max cursor position in X(horizontal) axis. | |
+static const U32 | MAX_CURSOR_Y = 7 |
Max cursor position in Y(vertical) axis. | |
+static const U32 | MAX_LCD_WIDTH = 100 |
Max LCD width (1 width = 1 pixel). | |
+static const U32 | MAX_LCD_DEPTH = 64/8 |
Max LCD depth (1 depth = 8 pixels). |
Simple LCD display class.
+[ Example ]
+ Lcd lcd;
+
+ lcd.clear();
+ lcd.putf("s", "Hello");
+ lcd.putf("s", "World");
+ lcd.disp();
+ "HelloWorld"
+
+ lcd.clear();
+ lcd.putf("s\ns", "Hello", "World");
+ lcd.disp();
+ "Hello"
+ "World"
+
+ lcd.clear();
+ lcd.putf("d", -10,0);
+ lcd.disp();
+ "-10"
+
+ lcd.clear();
+ lcd.putf("x", 255,0);
+ lcd.disp();
+ "FF"
+
+ lcd.clear();
+ lcd.putf("sddsx", "Calc: ", 16,0, -1,2, "=0x", (16-1),0);
+ lcd.disp();
+ "Calc: 16-1=0xF"
ecrobot::Lcd::Lcd | +( | +void | ++ | ) | ++ |
Constructor.
+- |
void ecrobot::Lcd::clear | +( | +bool | + lcdToo = false |
+ ) | ++ |
Clear LCD data buffer and reset cursor position to (0,0).
+lcdToo | Clear LCD display too. |
bool ecrobot::Lcd::clearRow | +( | +U32 | +row, | +|
+ | + | bool | + lcdToo = false | + |
+ | ) | ++ |
Clear LCD data buffer at the specified row.
+row | LCD row position to be cleared | |
lcdToo | Clear LCD display too. |
void ecrobot::Lcd::cursor | +( | +U32 | +x, | +|
+ | + | U32 | +y | + |
+ | ) | ++ |
Set cursor to (x,y) position.
+Top left is (0,0).
+x | Cusor position in X(horizontal) axis. | |
y | Cusor position in Y(vertical) axis. |
void ecrobot::Lcd::disp | +( | +void | ++ | ) | ++ |
Display data in the LCD data buffer to the LCD.
+Note that LCD display takes minimun 16msec due to hardware, so frequent executions of this member function makes the system busy.
+- |
void ecrobot::Lcd::draw | +( | +const U8 * | +data, | +|
+ | + | U32 | +width, | +|
+ | + | U32 | +depth, | +|
+ | + | U32 | +xPosInWidth, | +|
+ | + | U32 | +yPosInDepth | + |
+ | ) | ++ |
Draw monochrome bit map data to the LCD data buffer.
+data | Monochrome bit map data which is adapted to NXT LCD data alignment | |
width | Width of bit map data | |
depth | Depth of bit map data | |
xPosInWidth | X axis position of bit map data in the width unit (= 1 pixel) | |
yPosInDepth | Y axis position of bit map data in the depth unit (= 8 pixels) |
bool ecrobot::Lcd::putf | +( | +const CHAR * | +format, | +|
+ | + | + | ... | + |
+ | ) | ++ |
Put output to the LCD data buffer, according to format and other arguments passed to putf().
+format | Output format string. + "s": String format. + "d": Decimal integer format. This format requires two arguments (arg1: value, arg2: spaces to be held). + "x": Hex integer format. This format requires two arguments (arg1: value, arg2: spaces to be held). + "n": Line feed format. Cursor position in X(horizontal) axis is set to 0. + "\n": ASCII line feed format. Cursor position in X(horizontal) axis is set to 0. |