mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 01:22:37 +03:00
[console] Add concept of generic console configuration
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -77,6 +77,13 @@ struct console_driver {
|
||||
* will not block.
|
||||
*/
|
||||
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
|
||||
*
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user