summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/h8300/h8sim/console
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/h8300/h8sim/console')
-rw-r--r--c/src/lib/libbsp/h8300/h8sim/console/.cvsignore2
-rw-r--r--c/src/lib/libbsp/h8300/h8sim/console/Makefile.am34
-rw-r--r--c/src/lib/libbsp/h8300/h8sim/console/console-io.c50
3 files changed, 86 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/h8300/h8sim/console/.cvsignore b/c/src/lib/libbsp/h8300/h8sim/console/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/c/src/lib/libbsp/h8300/h8sim/console/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/c/src/lib/libbsp/h8300/h8sim/console/Makefile.am b/c/src/lib/libbsp/h8300/h8sim/console/Makefile.am
new file mode 100644
index 0000000000..89dc14d67e
--- /dev/null
+++ b/c/src/lib/libbsp/h8300/h8sim/console/Makefile.am
@@ -0,0 +1,34 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+VPATH = @srcdir@:@srcdir@/../../../shared
+
+PGM = $(ARCH)/console.rel
+
+C_FILES = console-io.c console-polled.c
+C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
+
+OBJS = $(C_O_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+$(PGM): $(OBJS)
+ $(make-rel)
+
+# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
+
+all-local: $(ARCH) $(OBJS) $(PGM)
+
+.PRECIOUS: $(PGM)
+
+EXTRA_DIST = console-io.c
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/h8300/h8sim/console/console-io.c b/c/src/lib/libbsp/h8300/h8sim/console/console-io.c
new file mode 100644
index 0000000000..c0b2b2340f
--- /dev/null
+++ b/c/src/lib/libbsp/h8300/h8sim/console/console-io.c
@@ -0,0 +1,50 @@
+/*
+ * This file contains the hardware specific portions of the TTY driver
+ * for the serial ports on the erc32.
+ *
+ * COPYRIGHT (c) 1989-1997.
+ * On-Line Applications Research Corporation (OAR).
+ * Copyright assigned to U.S. Government, 1994.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.OARcorp.com/rtems/license.html.
+ *
+ * $Id$
+ */
+
+#include <bsp.h>
+#include <rtems/libio.h>
+#include <stdlib.h>
+#include <assert.h>
+
+/* external prototypes for monitor interface routines */
+
+/*
+ * console_outbyte_polled
+ *
+ * This routine transmits a character using polling.
+ */
+
+void console_outbyte_polled(
+ int port,
+ char ch
+)
+{
+ asm volatile( "mov.b #0,r1l ; mov.b %0l,r2l ; jsr @@0xc4"
+ : : "r" (ch) : "r1", "r2");
+}
+
+/*
+ * console_inbyte_nonblocking
+ *
+ * This routine polls for a character.
+ */
+
+int console_inbyte_nonblocking(
+ int port
+)
+{
+ return -1;
+}
+