[U-Boot] [PATCH 07/16] drivers/video/cfb_console.c: Add function console_swap_colors

Pali Rohár pali.rohar at gmail.com
Sat Dec 17 18:03:09 CET 2011


 * swap background and text color

Signed-off-by: Pali Rohár <pali.rohar at gmail.com>
---
 drivers/video/cfb_console.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 9092399..867c789 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -602,6 +602,14 @@ static void video_putchar(int xx, int yy, unsigned char c)
 	video_drawchars(xx, yy + video_logo_height, &c, 1);
 }
 
+static void console_swap_colors(void)
+{
+	eorx = fgx;
+	fgx = bgx;
+	bgx = eorx;
+	eorx = fgx ^ bgx;
+}
+
 #if defined(CONFIG_CONSOLE_CURSOR) || defined(CONFIG_VIDEO_SW_CURSOR)
 static void video_set_cursor(void)
 {
-- 
1.7.5.4



More information about the U-Boot mailing list