summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Markgraf <steve@steve-m.de>2013-01-03 23:52:43 +0100
committerSylvain Munaut <tnt@246tNt.com>2013-01-05 18:41:11 +0100
commit37a0543e26a8fb6c22dfaa3b4fec5acb96c86999 (patch)
treed8ba7e61572665318896311f32225d0a47723fc3
parent0da82b96b7fbb94eb246dc2774aada4e59cffa14 (diff)
fw: apps/loader: initialize framebuffer and show something
Since we now initialize the display for all apps, it otherwise just shows the last content of the display ram, which is weird. Signed-off-by: Steve Markgraf <steve@steve-m.de>
-rw-r--r--src/target/firmware/apps/loader/main.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/target/firmware/apps/loader/main.c b/src/target/firmware/apps/loader/main.c
index 797f0234..8bdbc740 100644
--- a/src/target/firmware/apps/loader/main.c
+++ b/src/target/firmware/apps/loader/main.c
@@ -48,6 +48,7 @@
#include <calypso/backlight.h>
#include <uart.h>
#include <calypso/timer.h>
+#include <fb/framebuffer.h>
#include <flash/cfi_flash.h>
@@ -140,6 +141,28 @@ int main(void)
puts("\n\nOsmocomBB Loader (revision " GIT_REVISION ")\n");
puts(hr);
+ fb_clear();
+
+ fb_setfg(FB_COLOR_BLACK);
+ fb_setbg(FB_COLOR_WHITE);
+ fb_setfont(FB_FONT_HELVB14);
+
+ fb_gotoxy(2,20);
+ fb_putstr("loader",framebuffer->width-4);
+
+ fb_setfg(FB_COLOR_RED);
+ fb_setbg(FB_COLOR_BLUE);
+
+ fb_gotoxy(2,25);
+ fb_boxto(framebuffer->width-3,38);
+
+ fb_setfg(FB_COLOR_WHITE);
+ fb_setfont(FB_FONT_HELVR08);
+ fb_gotoxy(8,33);
+ fb_putstr("osmocom-bb",framebuffer->width-4);
+
+ fb_flush();
+
/* Identify environment */
printf("Running on %s in environment %s\n", manifest_board,
manifest_environment);