From 23c3f72e4d76daceacafd37d2580965ce79cfb80 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 22 Sep 2008 21:47:04 +0000 Subject: 2008-09-22 Joel Sherrill * 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. --- cpukit/include/rtems/bspIo.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'cpukit/include/rtems/bspIo.h') diff --git a/cpukit/include/rtems/bspIo.h b/cpukit/include/rtems/bspIo.h index 3e8eb5a534..67c09fe816 100644 --- a/cpukit/include/rtems/bspIo.h +++ b/cpukit/include/rtems/bspIo.h @@ -25,7 +25,7 @@ extern "C" { * functionnality described after the next command. */ typedef void (*BSP_output_char_function_type) (char c); -typedef char (*BSP_polling_getchar_function_type) (void); +typedef int (*BSP_polling_getchar_function_type) (void); extern BSP_output_char_function_type BSP_output_char; extern BSP_polling_getchar_function_type BSP_poll_char; @@ -38,6 +38,17 @@ extern BSP_polling_getchar_function_type BSP_poll_char; */ #include +/** + * This method polls for a key in the simplest possible fashion + * from whatever the debug console device is. + * + * @return If a character is available, it is returned. Otherwise + * this method returns -1. + * + * @note This method uses the BSP_poll_char pointer to a BSP + * provided method. + */ +extern int getchark(void); extern void vprintk(const char *fmt, va_list ap); extern void printk(const char *fmt, ...); -- cgit v1.2.3