summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/i386ex/console
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-08-05 16:51:39 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-08-05 16:51:39 +0000
commitbd8c8b2a855f3219e3c4c73c9e67eb4bd6d473d7 (patch)
treed9f1b7bf8ee4865c1e485e2b161c5709e2b6b75d /c/src/lib/libbsp/i386/i386ex/console
parentchanged load address (diff)
downloadrtems-bd8c8b2a855f3219e3c4c73c9e67eb4bd6d473d7.tar.bz2
Patch from Eric Valette <valette@crf.canon.fr> which brings the i386ex BSP
inline with the new IRQ structure.
Diffstat (limited to 'c/src/lib/libbsp/i386/i386ex/console')
-rw-r--r--c/src/lib/libbsp/i386/i386ex/console/Makefile.in9
-rw-r--r--c/src/lib/libbsp/i386/i386ex/console/console.c19
2 files changed, 25 insertions, 3 deletions
diff --git a/c/src/lib/libbsp/i386/i386ex/console/Makefile.in b/c/src/lib/libbsp/i386/i386ex/console/Makefile.in
index c1f28bc4c4..e774529a2b 100644
--- a/c/src/lib/libbsp/i386/i386ex/console/Makefile.in
+++ b/c/src/lib/libbsp/i386/i386ex/console/Makefile.in
@@ -10,8 +10,10 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/console.rel
+IMPORT_SRC=$(srcdir)/../../shared/io/printk.c
+
# C source names, if any, go here -- minus the .c
-C_PIECES=console
+C_PIECES=console printk
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
@@ -49,10 +51,13 @@ LDFLAGS +=
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
+preinstall:
+ ${CP} ${IMPORT_SRC} .
+
${PGM}: ${SRCS} ${OBJS}
$(make-rel)
-all: ${ARCH} $(SRCS) $(PGM)
+all: ${ARCH} preinstall $(SRCS) $(PGM)
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
install: all
diff --git a/c/src/lib/libbsp/i386/i386ex/console/console.c b/c/src/lib/libbsp/i386/i386ex/console/console.c
index 0d05e84b30..03c2e3b4cd 100644
--- a/c/src/lib/libbsp/i386/i386ex/console/console.c
+++ b/c/src/lib/libbsp/i386/i386ex/console/console.c
@@ -16,7 +16,7 @@
#include <bsp.h>
#include <rtems/libio.h>
-
+#include <bspIo.h>
#include <stdlib.h>
#include "../start/80386ex.h"
@@ -109,6 +109,18 @@ rtems_boolean is_character_ready(
return FALSE;
}
+/*
+ * Wait for an input. May be used before intr are ON.
+ */
+char BSP_wait_polled_input( void )
+{
+ char c;
+ while (!is_character_ready(&c))
+ continue;
+
+ return c;
+}
+
/* inbyte
*
* This routine reads a character from the UART.
@@ -277,3 +289,8 @@ rtems_device_driver console_control(
{
return RTEMS_SUCCESSFUL;
}
+
+BSP_output_char_function_type BSP_output_char = outbyte;
+BSP_polling_getchar_function_type BSP_poll_char = BSP_wait_polled_input;
+
+void BSP_emergency_output_init() {}