aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/console.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2013-11-27 19:42:23 +0000
committerMichael Brown <mcb30@ipxe.org>2013-11-28 05:55:43 +0000
commitc501c980e0c2a0bf63b88fab6beea249690d05a9 (patch)
tree0ea9cb9d11063f1a1837c04de0e2e0db7e65a845 /src/include/ipxe/console.h
parentb2251743d80f94445f40f64b75b63d33fe1d8725 (diff)
downloadipxe-c501c980e0c2a0bf63b88fab6beea249690d05a9.tar.gz
[console] Add concept of generic console configuration
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/console.h')
-rw-r--r--src/include/ipxe/console.h17
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 */