31 |
const char *name; |
const char *name; |
32 |
|
|
33 |
/* Initialize the output device. */ |
/* Initialize the output device. */ |
34 |
void (*init) (void); |
void (*init) (const char *cfg); |
35 |
|
|
36 |
/* Deinitialize the output device. */ |
/* Deinitialize the output device. */ |
37 |
void (*deinit) (void); |
void (*deinit) (void); |
47 |
extern struct output_driver *output_drivers[]; |
extern struct output_driver *output_drivers[]; |
48 |
|
|
49 |
|
|
50 |
/* Activate the output driver NAME or the default one if NAME is a |
/* Activate the output driver DRIVER or the default one if DRIVER is a |
51 |
null pointer. Must be called once at startup, before calling |
null pointer. Must be called once at startup, before calling |
52 |
putchar or any other output routine. Returns 0 if NAME is not a |
putchar or any other output routine. DRIVER has the pattern |
53 |
valid output driver name, otherwise 1 on success. */ |
NAME[,CONFIG...], for example "serial,uart2,speed=9600". Returns 0 |
54 |
int output_init (char *name); |
if DRIVER is not a valid output driver specification, otherwise 1 |
55 |
|
on success. */ |
56 |
|
int output_init (const char *driver); |
57 |
|
|
58 |
|
|
59 |
/* Deactivate the output driver. Must be called after the last time |
/* Deactivate the output driver. Must be called after the last time |
60 |
putchar or any other output routine is called. */ |
putchar or any other output routine is called. */ |
61 |
void output_deinit (void); |
void output_deinit (void); |
62 |
|
|
63 |
|
|
64 |
/* Print the single character CHR on the output device. */ |
/* Print the single character CHR on the output device. */ |
65 |
int putchar (int chr); |
int putchar (int chr); |
66 |
|
|
71 |
/* True if debug mode is enabled. */ |
/* True if debug mode is enabled. */ |
72 |
extern int output_debug; |
extern int output_debug; |
73 |
|
|
74 |
|
|
75 |
/* Print a debug message. */ |
/* Print a debug message. */ |
76 |
#define debug(...) do { if (output_debug) printf (__VA_ARGS__); } while (0) |
#define debug(...) do { if (output_debug) printf (__VA_ARGS__); } while (0) |
77 |
|
|