summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/h8300
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-08 16:04:56 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-10 10:17:09 -0500
commit62791499ebf0a6161e1541eb7587c57d88407f8b (patch)
treefaaa9f51fdd6d13727c237ddc44e87a9cdd60df4 /c/src/lib/libbsp/h8300
parentMove Mongoose-V specific devices into BSP. (diff)
downloadrtems-62791499ebf0a6161e1541eb7587c57d88407f8b.tar.bz2
Add console-polled.h and update all BSPs that should use it.
The file console-polled.h provides the prototypes for the three required methods when implementing a single port polled console driver. This paradigm is common on simulators and simple hardware. + Updated the BSPs Makefile.am to make console-polled.h available. + Regenerated the BSPs preinstall.sm. + Updated console support files to include <bsp/console-polled.h>. + Updated console support files to make printk() support method static.
Diffstat (limited to 'c/src/lib/libbsp/h8300')
-rw-r--r--c/src/lib/libbsp/h8300/h8sim/Makefile.am1
-rw-r--r--c/src/lib/libbsp/h8300/h8sim/console/console-io.c5
-rw-r--r--c/src/lib/libbsp/h8300/h8sim/preinstall.am4
3 files changed, 8 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/h8300/h8sim/Makefile.am b/c/src/lib/libbsp/h8300/h8sim/Makefile.am
index 147b93d27d..19f473a22d 100644
--- a/c/src/lib/libbsp/h8300/h8sim/Makefile.am
+++ b/c/src/lib/libbsp/h8300/h8sim/Makefile.am
@@ -11,6 +11,7 @@ include_HEADERS += ../../shared/include/tm27.h
nodist_include_HEADERS = include/bspopts.h
nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
+nodist_include_bsp_HEADERS += ../../shared/include/console-polled.h
DISTCLEANFILES = include/bspopts.h
nodist_include_HEADERS += ../../shared/include/coverhd.h
diff --git a/c/src/lib/libbsp/h8300/h8sim/console/console-io.c b/c/src/lib/libbsp/h8300/h8sim/console/console-io.c
index 03e2140a3b..195ac5cc33 100644
--- a/c/src/lib/libbsp/h8300/h8sim/console/console-io.c
+++ b/c/src/lib/libbsp/h8300/h8sim/console/console-io.c
@@ -1,6 +1,6 @@
/*
* This file contains the hardware specific portions of the TTY driver
- * for the serial ports on the erc32.
+ * for the serial ports on the h8300 simulator in gdb.
*/
/*
@@ -13,6 +13,7 @@
*/
#include <bsp.h>
+#include <bsp/console-polled.h>
#include <rtems/libio.h>
#include <stdlib.h>
#include <assert.h>
@@ -58,7 +59,7 @@ int console_inbyte_nonblocking(
#include <rtems/bspIo.h>
-void H8simBSP_output_char(char c) { console_outbyte_polled( 0, c ); }
+static void H8simBSP_output_char(char c) { console_outbyte_polled( 0, c ); }
BSP_output_char_function_type BSP_output_char = H8simBSP_output_char;
BSP_polling_getchar_function_type BSP_poll_char = NULL;
diff --git a/c/src/lib/libbsp/h8300/h8sim/preinstall.am b/c/src/lib/libbsp/h8300/h8sim/preinstall.am
index 347e43d26e..f3d7d235a6 100644
--- a/c/src/lib/libbsp/h8300/h8sim/preinstall.am
+++ b/c/src/lib/libbsp/h8300/h8sim/preinstall.am
@@ -53,6 +53,10 @@ $(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INC
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h
+$(PROJECT_INCLUDE)/bsp/console-polled.h: ../../shared/include/console-polled.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/console-polled.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/console-polled.h
+
$(PROJECT_INCLUDE)/coverhd.h: ../../shared/include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h