#define in8(p) inb(p)
#define out8(p, v) outb(v, p)
-#ifdef CONFIG_CONSOLE_CURSOR
-extern void console_cursor(int state);
-static int blink_count = CONFIG_SYS_CONSOLE_BLINK_COUNT;
-static int cursor_state;
-#endif
-
/* locals */
static int kbd_input = -1; /* no input yet */
{
unsigned char scan_code = 0;
-#ifdef CONFIG_CONSOLE_CURSOR
- if (--blink_count == 0) {
- cursor_state ^= 1;
- console_cursor(cursor_state);
- blink_count = CONFIG_SYS_CONSOLE_BLINK_COUNT;
- udelay(10);
- }
-#endif
-
if ((in8(I8042_STS_REG) & STATUS_OBF) == 0) {
return 0;
} else {
while (kbd_input == -1) {
while ((in8(I8042_STS_REG) & STATUS_OBF) == 0) {
-#ifdef CONFIG_CONSOLE_CURSOR
- if (--blink_count == 0) {
- cursor_state ^= 1;
- console_cursor(cursor_state);
- blink_count = CONFIG_SYS_CONSOLE_BLINK_COUNT;
- }
- udelay(10);
-#endif
}
scan_code = in8(I8042_DATA_REG);
if (scan_code != 0xfa)
* VIDEO_TSTC_FCT - keyboard_tstc function
* VIDEO_GETC_FCT - keyboard_getc function
*
- * CONFIG_CONSOLE_CURSOR - on/off drawing cursor is done with
- * delay loop in VIDEO_TSTC_FCT (i8042)
- *
- * CONFIG_SYS_CONSOLE_BLINK_COUNT - value for delay loop - blink rate
- * CONFIG_CONSOLE_TIME - display time/date in upper right
- * corner, needs CONFIG_CMD_DATE and
- * CONFIG_CONSOLE_CURSOR
* CONFIG_VIDEO_LOGO - display Linux Logo in upper left corner.
* Use CONFIG_SPLASH_SCREEN_ALIGN with
* environment variable "splashpos" to place
/*
* Cursor definition:
- * CONFIG_CONSOLE_CURSOR: Uses a timer function (see drivers/input/i8042.c)
- * to let the cursor blink. Uses the macros
- * CURSOR_OFF and CURSOR_ON.
* CONFIG_VIDEO_SW_CURSOR: Draws a cursor after the last character. No
* blinking is provided. Uses the macros CURSOR_SET
* and CURSOR_OFF.
* must disable the hardware register of the graphic
* chip. Otherwise a blinking field is displayed
*/
-#if !defined(CONFIG_CONSOLE_CURSOR) && \
- !defined(CONFIG_VIDEO_SW_CURSOR) && \
- !defined(CONFIG_VIDEO_HW_CURSOR)
+#if !defined(CONFIG_VIDEO_SW_CURSOR) && !defined(CONFIG_VIDEO_HW_CURSOR)
/* no Cursor defined */
#define CURSOR_ON
#define CURSOR_OFF
#define CURSOR_SET
#endif
-#if defined(CONFIG_CONSOLE_CURSOR) || defined(CONFIG_VIDEO_SW_CURSOR)
-#if defined(CURSOR_ON) || \
- (defined(CONFIG_CONSOLE_CURSOR) && defined(CONFIG_VIDEO_SW_CURSOR))
-#error only one of CONFIG_CONSOLE_CURSOR, CONFIG_VIDEO_SW_CURSOR, \
- or CONFIG_VIDEO_HW_CURSOR can be defined
+#if defined(CONFIG_VIDEO_SW_CURSOR)
+#if defined(CONFIG_VIDEO_HW_CURSOR)
+#error only one of CONFIG_VIDEO_SW_CURSOR or CONFIG_VIDEO_HW_CURSOR can be \
+ defined
#endif
void console_cursor(int state);
#define CURSOR_ON console_cursor(1)
#define CURSOR_OFF console_cursor(0)
#define CURSOR_SET video_set_cursor()
-#endif /* CONFIG_CONSOLE_CURSOR || CONFIG_VIDEO_SW_CURSOR */
-
-#ifdef CONFIG_CONSOLE_CURSOR
-#ifndef CONFIG_CONSOLE_TIME
-#error CONFIG_CONSOLE_CURSOR must be defined for CONFIG_CONSOLE_TIME
-#endif
-#ifndef CONFIG_I8042_KBD
-#warning Cursor drawing on/off needs timer function s.a. drivers/input/i8042.c
-#endif
-#endif /* CONFIG_CONSOLE_CURSOR */
-
+#endif /* CONFIG_VIDEO_SW_CURSOR */
#ifdef CONFIG_VIDEO_HW_CURSOR
#ifdef CURSOR_ON
-#error only one of CONFIG_CONSOLE_CURSOR, CONFIG_VIDEO_SW_CURSOR, \
- or CONFIG_VIDEO_HW_CURSOR can be defined
+#error only one of CONFIG_VIDEO_SW_CURSOR or CONFIG_VIDEO_HW_CURSOR can be \
+ defined
#endif
#define CURSOR_ON
#define CURSOR_OFF
video_drawchars(xx, yy + video_logo_height, &c, 1);
}
-#if defined(CONFIG_CONSOLE_CURSOR) || defined(CONFIG_VIDEO_SW_CURSOR)
+#if defined(CONFIG_VIDEO_SW_CURSOR)
static void video_set_cursor(void)
{
if (cursor_state)
void console_cursor(int state)
{
-#ifdef CONFIG_CONSOLE_TIME
- struct rtc_time tm;
- char info[16];
-
- /* time update only if cursor is on (faster scroll) */
- if (state) {
- rtc_get(&tm);
-
- sprintf(info, " %02d:%02d:%02d ", tm.tm_hour, tm.tm_min,
- tm.tm_sec);
- video_drawstring(VIDEO_VISIBLE_COLS - 10 * VIDEO_FONT_WIDTH,
- VIDEO_INFO_Y, (uchar *) info);
-
- sprintf(info, "%02d.%02d.%04d", tm.tm_mday, tm.tm_mon,
- tm.tm_year);
- video_drawstring(VIDEO_VISIBLE_COLS - 10 * VIDEO_FONT_WIDTH,
- VIDEO_INFO_Y + 1 * VIDEO_FONT_HEIGHT,
- (uchar *) info);
- }
-#endif
-
if (cursor_state != state) {
if (cursor_state) {
/* turn off the cursor */