#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;
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
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];
}
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
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);
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