[U-Boot] [PATCH 3/5] lcd: Implement lcd_printf()
Haavard Skinnemoen
haavard.skinnemoen at atmel.com
Mon Sep 1 16:21:20 CEST 2008
lcd_printf() has a prototype in include/lcd.h but no implementation. Fix
this by borrowing the lcd_printf() implementation from the cogent board
code (which appears to use its own LCD framework.)
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen at atmel.com>
---
common/lcd.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/common/lcd.c b/common/lcd.c
index 25f8664..82e557e 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -225,6 +225,20 @@ void lcd_puts (const char *s)
}
}
+/*----------------------------------------------------------------------*/
+
+void lcd_printf(const char *fmt, ...)
+{
+ va_list args;
+ char buf[CFG_PBSIZE];
+
+ va_start(args, fmt);
+ vsprintf(buf, fmt, args);
+ va_end(args);
+
+ lcd_puts(buf);
+}
+
/************************************************************************/
/* ** Low-Level Graphics Routines */
/************************************************************************/
--
1.5.6.3
More information about the U-Boot
mailing list