allow oring multiple DebugPort values

svn path=/trunk/; revision=13345
This commit is contained in:
Royce Mitchell III 2005-01-28 06:10:01 +00:00
parent d2f23650e6
commit c6e6ddf2d4

View file

@ -46,9 +46,9 @@ U32 DebugPrintMask = DPRINT_WARNING|DPRINT_FILESYSTEM|DPRINT_MEMORY|DPRINT_LINU
U32 DebugPrintMask = 0;
#endif
#define SCREEN 0
#define RS232 1
#define BOCHS 2
#define SCREEN 1
#define RS232 2
#define BOCHS 4
#define COM1 1
#define COM2 2
@ -60,6 +60,7 @@ U32 DebugPrintMask = 0;
U32 DebugPort = RS232;
//U32 DebugPort = SCREEN;
//U32 DebugPort = BOCHS;
//U32 DebugPort = SCREEN|BOCHS;
U32 ComPort = COM1;
//U32 BaudRate = 19200;
U32 BaudRate = 115200;
@ -81,7 +82,7 @@ VOID DebugPrintChar(UCHAR Character)
DebugStartOfLine = TRUE;
}
if (DebugPort == RS232)
if (DebugPort & RS232)
{
if (Character == '\n')
{
@ -89,11 +90,11 @@ VOID DebugPrintChar(UCHAR Character)
}
Rs232PortPutByte(Character);
}
else if (DebugPort == BOCHS)
if (DebugPort & BOCHS)
{
WRITE_PORT_UCHAR((PUCHAR)BOCHS_OUTPUT_PORT, Character);
}
else
if (DebugPort & SCREEN)
{
MachConsPutChar(Character);
}