diff -r 8baa4bcce346 samo-lib/grifo/examples/lcd/lcd.c
--- a/samo-lib/grifo/examples/lcd/lcd.c	Tue Oct 30 10:02:23 2012 +0800
+++ b/samo-lib/grifo/examples/lcd/lcd.c	Sun Nov 04 23:20:17 2012 -0600
@@ -20,6 +20,7 @@
  */
 
 #include "grifo.h"
+#include "console.h"
 
 int grifo_main(int argc, char *argv[])
 {
@@ -28,55 +29,13 @@
 
 	int x;
 	int y;
+	int x1;
+	int y1;
+	int x2;
+	int y2;
 
 	debug_printf("lcd start\n");
 
-	debug_printf("black screen\n");
-	lcd_clear(LCD_BLACK);
-	delay_us(1000000);
-
-	debug_printf("plot white pixels\n");
-	for (x = 10, y = 10; x < 100; x += 5, y += 10) {
-		lcd_point(x, y);
-	}
-	delay_us(1000000);
-
-	debug_printf("draw white lines\n");
-	lcd_move_to( 10,  10);
-	lcd_line_to(120,  10);
-	lcd_line_to(120, 100);
-	lcd_line_to( 10, 100);
-	lcd_line_to( 10,  10);
-
-	lcd_move_to( 10,  10);
-	lcd_line_to(120, 100);
-	lcd_move_to(120,  10);
-	lcd_line_to( 10, 100);
-	delay_us(1000000);
-
-	debug_printf("white screen\n");
-	lcd_clear(LCD_WHITE);
-	delay_us(1000000);
-
-	debug_printf("plot black pixels\n");
-	for (x = 150, y = 140; x < 200; x += 10, y += 5) {
-		lcd_point(x, y);
-	}
-	delay_us(1000000);
-
-	debug_printf("draw black lines\n");
-	lcd_move_to( 10,  10);
-	lcd_line_to(120,  10);
-	lcd_line_to(120, 100);
-	lcd_line_to( 10, 100);
-	lcd_line_to( 10,  10);
-
-	lcd_move_to( 10,  10);
-	lcd_line_to(120, 100);
-	lcd_move_to(120,  10);
-	lcd_line_to( 10, 100);
-	delay_us(1000000);
-
 	debug_printf("eye pattern\n");
 	lcd_clear(LCD_WHITE);
 
@@ -94,90 +53,21 @@
 	debug_printf("text rows %d\n", lcd_max_rows());
 	debug_printf("text columns %d\n", lcd_max_columns());
 
-	debug_printf("positioned text\n");
-	lcd_clear(LCD_WHITE);
-	lcd_at_xy(20, 8);
-	lcd_print("one");
-	delay_us(500000);
-
-	lcd_at_xy(3, 1);
-	lcd_print("two");
-	delay_us(500000);
-
-	lcd_at_xy(0, 0);
-	lcd_print("A");
-	delay_us(500000);
-
-	lcd_at_xy(lcd_max_columns() - 1, lcd_max_rows() - 1);
-	lcd_print("Z");
-	delay_us(2000000);
-
-	debug_printf("black text\n");
-	lcd_clear(LCD_WHITE);
-	lcd_print("This the first is a line of text\n");
-	lcd_print("This the second is a line of text\n");
-	lcd_print("This the third is a line of text\n");
-	lcd_print("This the fourth is a line of text\n");
-	lcd_print("This the fifth is a line of text\n");
-	lcd_printf("some numbers: %d 0x%08x\n", 12345, 349599327);
-	delay_us(2000000);
-
-	debug_printf("white text\n");
-	lcd_clear(LCD_BLACK);
-	lcd_print("This the first is a line of text\n");
-	lcd_print("This the second is a line of text\n");
-	lcd_print("This the third is a line of text\n");
-	lcd_print("This the fourth is a line of text\n");
-	lcd_print("This the fifth is a line of text\n");
-	lcd_printf("some numbers: %d 0x%08x\n", 12345, 349599327);
-	delay_us(2000000);
-
-	debug_printf("mixed text\n");
-	lcd_clear(LCD_WHITE);
-	lcd_print("This the first is a line of text\n");
-	(void)lcd_set_colour(LCD_WHITE);
-	lcd_print("This the second is a line of text\n");
-	(void)lcd_set_colour(LCD_BLACK);
-	lcd_print("This the third is a line of text\n");
-	(void)lcd_set_colour(LCD_WHITE);
-	lcd_print("This the fourth is a line of text\n");
-	(void)lcd_set_colour(LCD_BLACK);
-	lcd_print("This the fifth is a line of text\n");
-	lcd_printf("some numbers: %d 0x%08x\n", 12345, 349599327);
-	delay_us(2000000);
-
-
-	debug_printf("scrolling text\n");
-	lcd_clear(LCD_WHITE);
-	for (x = 1; x <= 30; ++x) {
-		lcd_printf("line number: %d\n", x);
+	int done = 0;
+	int count = 0;
+	while (!done){
+		if (count > 10) {
+			lcd_clear(LCD_WHITE);
+			count = 0;
+		}
+		debug_printf("Enter chars for line\n");
+		x1 = console_input_char();
+		y1 = console_input_char();
+		x2 = console_input_char();
+		y2 = console_input_char();
+		lcd_move_to(x1, y1);
+		lcd_line_to(x2, y2);
+		count ++;
 	}
-	delay_us(2000000);
-
-
-	debug_printf("picture-in-picture\n");
-	lcd_clear(LCD_WHITE);
-	for (y = 0; y < lcd_max_rows(); ++y) {
-		lcd_at_xy(0, y);
-		lcd_printf("background line: %d", y);
-	}
-
-	lcd_window(15, 19, 17, 21);
-	lcd_window_clear(LCD_WHITE);
-	lcd_window_move_to(0,0);
-	lcd_window_line_to(16,0);
-	lcd_window_line_to(16,20);
-	lcd_window_line_to(0,20);
-	lcd_window_line_to(0,0);
-
-	for (x = 0; x < 10; ++x) {
-		debug_printf("picture-in-picture enable\n");
-		lcd_window_enable();
-		delay_us(1000000);
-		debug_printf("picture-in-picture disable\n");
-		lcd_window_disable();
-		delay_us(1000000);
-	}
-
 	return 0;
 }
