diff options
| author | Michael Brown | 2013-11-27 20:42:23 +0100 |
|---|---|---|
| committer | Michael Brown | 2013-11-28 06:55:43 +0100 |
| commit | c501c980e0c2a0bf63b88fab6beea249690d05a9 (patch) | |
| tree | 0ea9cb9d11063f1a1837c04de0e2e0db7e65a845 /src/include/ipxe | |
| parent | [console] Allow console input and output to be disabled independently (diff) | |
| download | ipxe-c501c980e0c2a0bf63b88fab6beea249690d05a9.tar.gz ipxe-c501c980e0c2a0bf63b88fab6beea249690d05a9.tar.xz ipxe-c501c980e0c2a0bf63b88fab6beea249690d05a9.zip | |
[console] Add concept of generic console configuration
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
| -rw-r--r-- | src/include/ipxe/console.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/include/ipxe/console.h b/src/include/ipxe/console.h index 2fcc4150e..9c2620bc9 100644 --- a/src/include/ipxe/console.h +++ b/src/include/ipxe/console.h @@ -78,6 +78,13 @@ struct console_driver { */ int ( * iskey ) ( void ); /** + * Configure console + * + * @v config Console configuration, or NULL to reset + * @ret rc Return status code + */ + int ( * configure ) ( struct console_configuration *config ); + /** * Console usage bitmask * * This is the bitwise OR of zero or more @c CONSOLE_USAGE_XXX @@ -170,5 +177,15 @@ console_set_usage ( int usage ) { extern int iskey ( void ); extern int getkey ( unsigned long timeout ); +extern int console_configure ( struct console_configuration *config ); + +/** + * Reset console + * + */ +static inline __attribute__ (( always_inline )) void console_reset ( void ) { + + console_configure ( NULL ); +} #endif /* _IPXE_CONSOLE_H */ |
