From: daeinki Date: Tue, 15 Sep 2009 05:01:28 +0000 (+0900) Subject: s5pc110: font: added wheel drawing. X-Git-Tag: 20091016~50 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98d836a9dc81e53ec0900d406a05c9f7a3daf89d;p=kernel%2Fu-boot.git s5pc110: font: added wheel drawing. Signed-off-by: daeinki --- diff --git a/drivers/video/fbutils.c b/drivers/video/fbutils.c index 113bf2e..2a81d1d 100644 --- a/drivers/video/fbutils.c +++ b/drivers/video/fbutils.c @@ -203,6 +203,47 @@ void fb_printf(char *s) put_char (*s); } +static void draw_ve_wheel(int x, int y, unsigned char color) +{ + set_font_xy(x, y); + set_font_color(FONT_XOR); + fb_printf(" | "); + set_font_xy(x, y + 6); + fb_printf(" | "); + + set_font_color(color); + set_font_xy(x, y + 2); + fb_printf("---"); +} + +static void draw_ho_wheel(int x, int y, unsigned char color) +{ + set_font_xy(x, y + 2); + set_font_color(FONT_XOR); + fb_printf("---"); + + set_font_color(color); + set_font_xy(x, y); + fb_printf(" | "); + set_font_xy(x, y + 6); + fb_printf(" | "); +} + +void draw_wheel(int x, int y, unsigned char color) +{ + static int sw = 1; + + if (sw) + draw_ve_wheel(x, y, color); + else + draw_ho_wheel(x, y, color); + + if (sw) + sw = 0; + else + sw = 1; +} + void init_font(void) { int addr = 0, y; diff --git a/include/fbutils.h b/include/fbutils.h index ba12364..fcdb20c 100644 --- a/include/fbutils.h +++ b/include/fbutils.h @@ -60,4 +60,7 @@ void get_font_xy(unsigned int *x, unsigned int *y); /* draw string with user-requested color */ void fb_printf(char *s); +/* draw wheel */ +void draw_wheel(int x, int y, unsigned char color); + #endif /* _FONT_H */