[U-Boot] [PATCH 2/2] cmp_bmp: allow negative X, Y values for display command
Timur Tabi
timur at freescale.com
Wed Aug 25 23:36:50 CEST 2010
The 'bmp display' command accepts optional X and Y values for the position
of the image to be displayed. Change the code which parses the command line
to accept negative values.
This feature is useful if you want to use a frame buffer for the console, and
you want a banner displayed on the top of the screen that never scrolls off.
This can be accomplished by declaring that the width and height of the video
screen is smaller than it really is, and then drawing an image in the
undeclared area.
For example, if you have 1280x1024 monitor, and you want to display a banner
on the top of the screen that's 100 pixels tall, then video_hw_init() should
say that display is really 1280x924, and then the banner should be drawn at
position (0, -100).
Signed-off-by: Timur Tabi <timur at freescale.com>
---
common/cmd_bmp.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c
index d51cc55..06c1547 100644
--- a/common/cmd_bmp.c
+++ b/common/cmd_bmp.c
@@ -122,8 +122,8 @@ static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const ar
break;
case 4:
addr = simple_strtoul(argv[1], NULL, 16);
- x = simple_strtoul(argv[2], NULL, 10);
- y = simple_strtoul(argv[3], NULL, 10);
+ x = simple_strtol(argv[2], NULL, 10);
+ y = simple_strtol(argv[3], NULL, 10);
break;
default:
return cmd_usage(cmdtp);
--
1.7.2.1
More information about the U-Boot
mailing list