diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2011-09-16 09:16:32 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2011-09-16 09:16:32 +0000 |
commit | 6c5ee7f00913a5c6516fa3048da9b65bf50cef98 (patch) | |
tree | 7ee6c04105e112ad758f8e64076b39c4289bc63a /cpukit/libmisc/shell/shell.h | |
parent | 2011-09-15 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-6c5ee7f00913a5c6516fa3048da9b65bf50cef98.tar.bz2 |
2011-09-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libmisc/shell/shell-wait-for-input.c: New file.
* libmisc/Makefile.am: Reflect change above.
* libmisc/shell/shell.h: Declare rtems_shell_wait_for_input().
Diffstat (limited to 'cpukit/libmisc/shell/shell.h')
-rw-r--r-- | cpukit/libmisc/shell/shell.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cpukit/libmisc/shell/shell.h b/cpukit/libmisc/shell/shell.h index 759bf71589..8624161177 100644 --- a/cpukit/libmisc/shell/shell.h +++ b/cpukit/libmisc/shell/shell.h @@ -285,6 +285,26 @@ void rtems_shell_mount_add_fsys(rtems_shell_filesystems_t* fs); */ void rtems_shell_mount_del_fsys(rtems_shell_filesystems_t* fs); +typedef void (*rtems_shell_wait_for_input_notification)( + int fd, + int seconds_remaining, + void *arg +); + +/** + * @brief Waits for input. + * + * @retval RTEMS_SUCCESSFUL Input detected. + * @retval RTEMS_TIMEOUT Timeout expired. + * @retval RTEMS_UNSATISFIED Cannot change or restore termios attributes. + */ +rtems_status_code rtems_shell_wait_for_input( + int fd, + int timeout_in_seconds, + rtems_shell_wait_for_input_notification notification, + void *notification_arg +); + #ifdef __cplusplus } #endif |