summaryrefslogtreecommitdiffstats
path: root/src/include/console.h
blob: 146fd9c3e7554356b4d8cafaeddd79916f27ac03 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef CONSOLE_H
#define CONSOLE_H

#include "stdint.h"
#include "vsprintf.h"
#include "tables.h"

/*
 * 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 );
};

#define __console_driver \
	__attribute__ (( used, __table_section ( console, 01 ) ))

/* Function prototypes */

extern void putchar ( int character );
extern int getchar ( void );
extern int iskey ( void );

#endif /* CONSOLE_H */