2005-04-08 15:01:17 +00:00
|
|
|
#ifndef CONSOLE_H
|
|
|
|
#define CONSOLE_H
|
|
|
|
|
|
|
|
#include "stdint.h"
|
2005-04-17 10:44:26 +00:00
|
|
|
#include "vsprintf.h"
|
2005-04-27 11:38:43 +00:00
|
|
|
#include "tables.h"
|
2005-04-08 15:01:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Consoles that cannot be used before their INIT_FN() has completed
|
|
|
|
* should set disabled = 1 initially. This allows other console
|
|
|
|
* devices to still be used to print out early debugging messages.
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct console_driver {
|
|
|
|
int disabled;
|
|
|
|
void ( *putchar ) ( int character );
|
|
|
|
int ( *getchar ) ( void );
|
|
|
|
int ( *iskey ) ( void );
|
|
|
|
};
|
|
|
|
|
2005-05-17 12:16:28 +00:00
|
|
|
#define __console_driver __table ( console, 01 )
|
2005-04-08 15:01:17 +00:00
|
|
|
|
|
|
|
/* Function prototypes */
|
|
|
|
|
|
|
|
extern void putchar ( int character );
|
|
|
|
extern int getchar ( void );
|
|
|
|
extern int iskey ( void );
|
|
|
|
|
|
|
|
#endif /* CONSOLE_H */
|