mirror of
https://github.com/vivier/EMILE.git
synced 2025-01-22 00:32:15 +00:00
use console mask to enable/disable vga and serial
This commit is contained in:
parent
638011b914
commit
e40235b0ac
@ -7,17 +7,28 @@
|
||||
#include "console.h"
|
||||
|
||||
#include "vga.h"
|
||||
#include "serial.h"
|
||||
|
||||
static int vga_enabled = 0;
|
||||
|
||||
void
|
||||
console_init(emile_l2_header_t* info)
|
||||
{
|
||||
vga_init();
|
||||
if (info->console_mask & STDOUT_VGA)
|
||||
{
|
||||
vga_init();
|
||||
vga_enabled = 1;
|
||||
}
|
||||
if ( info->console_mask & (STDOUT_SERIAL0 | STDOUT_SERIAL1) )
|
||||
serial_init(info);
|
||||
}
|
||||
|
||||
void
|
||||
console_put(char c)
|
||||
{
|
||||
vga_put(c);
|
||||
if (vga_enabled)
|
||||
vga_put(c);
|
||||
serial_put(c);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
x
Reference in New Issue
Block a user