]> git.sur5r.net Git - u-boot/blobdiff - board/cogent/lcd.c
Merge branch 'master' of git://git.denx.de/u-boot-video
[u-boot] / board / cogent / lcd.c
index 941ea65edb93976216cbba4901c0f43fb6a3b265..05ffc4d1ac385bd7443046f0bd2a52e88a669c47 100644 (file)
@@ -48,7 +48,7 @@
 
 #include <common.h>
 #include <stdarg.h>
-#include <board/cogent/lcd.h>
+#include "lcd.h"
 
 static char lines[2][LCD_LINE_LENGTH+1];
 static int curline;
@@ -112,7 +112,7 @@ lcd_dis(int addr, char *string)
 
     lcd_write_command(clp, LCD_CMD_ADD + addr);
     for (pos = 0; *string != '\0' && pos < linelen; pos++)
-        lcd_write_data(clp, *string++);
+       lcd_write_data(clp, *string++);
 }
 
 void
@@ -131,7 +131,7 @@ lcd_init(void)
     linepos = 0;
 
     for (i = 0; i < LCD_LINE_LENGTH; i++) {
-        lines[0][i] = init_line0[i];
+       lines[0][i] = init_line0[i];
        lines[1][i] = init_line1[i];
     }
 
@@ -157,25 +157,25 @@ lcd_write_char(const char c)
        linelen--;
 
     if (c == '\n') {
-        lcd_dis(LCD_LINE0, &lines[curline^1][0]);
-        lcd_dis(LCD_LINE1, &lines[curline][0]);
+       lcd_dis(LCD_LINE0, &lines[curline^1][0]);
+       lcd_dis(LCD_LINE1, &lines[curline][0]);
 
-        /* Do a line feed */
-        curline ^= 1;
+       /* Do a line feed */
+       curline ^= 1;
        linelen = LCD_LINE_LENGTH;
        if (heartbeat_active && curline == 0)
            linelen--;
-        linepos = 0;
+       linepos = 0;
 
-        for (i = 0; i < linelen; i++)
-            lines[curline][i] = ' ';
+       for (i = 0; i < linelen; i++)
+           lines[curline][i] = ' ';
 
-        return;
+       return;
     }
 
     /* Only allow to be output if there is room on the LCD line */
     if (linepos < linelen)
-        lines[curline][linepos++] = c;
+       lines[curline][linepos++] = c;
 }
 
 void
@@ -197,7 +197,7 @@ void
 lcd_printf(const char *fmt, ...)
 {
     va_list args;
-    char buf[CFG_PBSIZE];
+    char buf[CONFIG_SYS_PBSIZE];
 
     va_start(args, fmt);
     (void)vsprintf(buf, fmt, args);
@@ -229,3 +229,17 @@ lcd_heartbeat(void)
     if (++rotator_index >= (sizeof rotchars / sizeof rotchars[0]))
        rotator_index = 0;
 }
+
+#ifdef CONFIG_SHOW_ACTIVITY
+void board_show_activity (ulong timestamp)
+{
+#ifdef CONFIG_STATUS_LED
+       if ((timestamp % (CONFIG_SYS_HZ / 2)) == 0)
+               lcd_heartbeat ();
+#endif
+}
+
+void show_activity(int arg)
+{
+}
+#endif