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

Pali Rohár
2011-12-17T17:03:09Z

* swap background and text color

Signed-off-by: Pali Roh?r <pali.rohar@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