Sun 12 Jan 19:29:58 CET 2025
This commit is contained in:
parent
9d3a32fb76
commit
cb55d61788
|
@ -10,6 +10,13 @@ See the file LICENSE for details.
|
|||
#include "kmalloc.h"
|
||||
#include "string.h"
|
||||
|
||||
/*
|
||||
Switch to serial consol #portnr ?
|
||||
If not, -1
|
||||
else using serial_device_write from serial.c ...
|
||||
*/
|
||||
int console_serial=-1;
|
||||
|
||||
struct console {
|
||||
struct window *window;
|
||||
struct graphics *gx;
|
||||
|
@ -174,11 +181,17 @@ int console_getchar( struct console *c )
|
|||
|
||||
void console_putchar( struct console *c, char ch )
|
||||
{
|
||||
if (console_serial!=-1)
|
||||
serial_putchar(console_serial,ch);
|
||||
else
|
||||
console_write(c,&ch,1);
|
||||
}
|
||||
|
||||
void console_putstring( struct console *c, const char *str)
|
||||
{
|
||||
if (console_serial!=-1)
|
||||
serial_device_write(console_serial,str,strlen(str),0);
|
||||
else
|
||||
console_write(c,str,strlen(str));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user