fbcon: add support for drawing diffrent color line

add support for drawing diffrent color line.

Change-Id: I86ca0aa425ae19cbeade5609cb27cc2b62b89a3e
diff --git a/dev/fbcon/fbcon.c b/dev/fbcon/fbcon.c
index 532ec10..f2296a4 100644
--- a/dev/fbcon/fbcon.c
+++ b/dev/fbcon/fbcon.c
@@ -62,6 +62,7 @@
 #define RGB565_YELLOW		0xffe0
 #define RGB565_ORANGE		0xfd20
 #define RGB565_RED		0xf800
+#define RGB565_GREEN		0x3666
 
 #define RGB888_BLACK            0x000000
 #define RGB888_WHITE            0xffffff
@@ -71,6 +72,7 @@
 #define RGB888_YELLOW           0xffff00
 #define RGB888_ORANGE           0xffa500
 #define RGB888_RED              0xff0000
+#define RGB888_GREEN            0x00ff00
 
 #define FONT_WIDTH		5
 #define FONT_HEIGHT		12
@@ -92,7 +94,7 @@
 					[FBCON_YELLOW_MSG] = {RGB565_YELLOW, RGB565_BLACK},
 					[FBCON_ORANGE_MSG] = {RGB565_ORANGE, RGB565_BLACK},
 					[FBCON_RED_MSG] = {RGB565_RED, RGB565_BLACK},
-					[FBCON_LINE_COLOR] = {RGB565_WHITE, RGB565_WHITE},
+					[FBCON_GREEN_MSG] = {RGB565_GREEN, RGB565_BLACK},
 					[FBCON_SELECT_MSG_BG_COLOR] = {RGB565_WHITE, RGB565_BLUE}};
 
 static struct fb_color		fb_color_formats_888[] = {
@@ -103,7 +105,7 @@
 					[FBCON_YELLOW_MSG] = {RGB888_YELLOW, RGB888_BLACK},
 					[FBCON_ORANGE_MSG] = {RGB888_ORANGE, RGB888_BLACK},
 					[FBCON_RED_MSG] = {RGB888_RED, RGB888_BLACK},
-					[FBCON_LINE_COLOR] = {RGB888_WHITE, RGB888_WHITE},
+					[FBCON_GREEN_MSG] = {RGB888_GREEN, RGB888_BLACK},
 					[FBCON_SELECT_MSG_BG_COLOR] = {RGB888_WHITE, RGB888_BLUE}};
 
 
@@ -246,20 +248,21 @@
 	fbcon_flush();
 }
 
-void fbcon_draw_line()
+void fbcon_draw_line(uint32_t type)
 {
 	char *pixels;
-	uint32_t bg_color, tmp_color;
+	uint32_t line_color, tmp_color;
 	int i, j;
 
-	bg_color = fb_color_formats[FBCON_LINE_COLOR].bg;
+	/* set line's color via diffrent type */
+	line_color = fb_color_formats[type].fg;
 
 	pixels = config->base;
 	pixels += cur_pos.y * ((config->bpp / 8) * FONT_HEIGHT * config->width);
 	pixels += cur_pos.x * ((config->bpp / 8) * (FONT_WIDTH + 1));
 
 	for (i = 0; i < (int)config->width; i++) {
-		tmp_color = bg_color;
+		tmp_color = line_color;
 		for (j = 0; j < (int)(config->bpp / 8); j++) {
 			*pixels = (unsigned char) tmp_color;
 			tmp_color = tmp_color >> 8;
diff --git a/include/dev/fbcon.h b/include/dev/fbcon.h
index 123532c..c77f02e 100644
--- a/include/dev/fbcon.h
+++ b/include/dev/fbcon.h
@@ -48,9 +48,7 @@
 	FBCON_YELLOW_MSG,
 	FBCON_ORANGE_MSG,
 	FBCON_RED_MSG,
-
-	/* type for line color */
-	FBCON_LINE_COLOR,
+	FBCON_GREEN_MSG,
 
 	/* and the select message's background */
 	FBCON_SELECT_MSG_BG_COLOR,
@@ -96,7 +94,7 @@
 void fbcon_putc_factor(char c, int type, unsigned scale_factor);
 void fbcon_draw_msg_background(unsigned y_start, unsigned y_end,
 	uint32_t paint, int update);
-void fbcon_draw_line(void);
+void fbcon_draw_line(uint32_t type);
 uint32_t fbcon_get_current_line(void);
 uint32_t fbcon_get_current_bg(void);
 uint32_t fbcon_get_max_x(void);