diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-22 21:47:04 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-22 21:47:04 +0000 |
commit | 23c3f72e4d76daceacafd37d2580965ce79cfb80 (patch) | |
tree | aaaea529330ff714b8c9a5c81a19610bc0b490ff /cpukit/libcsupport/src/getchark.c | |
parent | 2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-23c3f72e4d76daceacafd37d2580965ce79cfb80.tar.bz2 |
2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* include/rtems/bspIo.h, libcsupport/Makefile.am: Add genchark() for
polled debug input from the same device as printk().
* libcsupport/src/getchark.c: New file.
Diffstat (limited to 'cpukit/libcsupport/src/getchark.c')
-rw-r--r-- | cpukit/libcsupport/src/getchark.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cpukit/libcsupport/src/getchark.c b/cpukit/libcsupport/src/getchark.c new file mode 100644 index 0000000000..f501fc65f0 --- /dev/null +++ b/cpukit/libcsupport/src/getchark.c @@ -0,0 +1,25 @@ +/* + * COPYRIGHT (c) 1989-2008. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#include <rtems.h> +#include <rtems/bspIo.h> + +int getchark(void) +{ + if ( BSP_poll_char ) + return (*BSP_poll_char)(); + + return -1; +} |