printf: also write on serial
This commit is contained in:
parent
ca22696b29
commit
389452ec3f
@ -1,4 +1,5 @@
|
||||
#include "klibc.h"
|
||||
#include "serial.h"
|
||||
#include "vga.h"
|
||||
|
||||
int memcmp(const void *aptr, const void *bptr, size_t size)
|
||||
@ -116,6 +117,7 @@ void puts(const char *str)
|
||||
|
||||
void putc(const char str){
|
||||
VGAputc(str);
|
||||
serialPutc(str);
|
||||
}
|
||||
|
||||
void printInt(int integer)
|
||||
|
@ -39,7 +39,7 @@ int isTransmitEmpty()
|
||||
return (inb(PORT + 5) & 0x20);
|
||||
}
|
||||
|
||||
void serialWrite(char a)
|
||||
void serialPutc(char a)
|
||||
{
|
||||
while (isTransmitEmpty() == 0)
|
||||
;
|
||||
@ -51,5 +51,5 @@ void serialDoIrq(struct interrupt_frame *level)
|
||||
{
|
||||
(void)level;
|
||||
char c = inb(PORT);
|
||||
serialWrite(c);
|
||||
serialPutc(c);
|
||||
}
|
||||
|
@ -2,5 +2,5 @@
|
||||
#include "irq.h"
|
||||
|
||||
void serialSetup(int speed);
|
||||
void serialWrite(char a);
|
||||
void serialPutc(char a);
|
||||
void serialDoIrq(struct interrupt_frame *frame);
|
||||
|
10
tests/test.c
10
tests/test.c
@ -221,11 +221,11 @@ void run_test(void)
|
||||
{
|
||||
testPaging();
|
||||
printf("Testing Serial\n");
|
||||
serialWrite('h');
|
||||
serialWrite('e');
|
||||
serialWrite('l');
|
||||
serialWrite('l');
|
||||
serialWrite('o');
|
||||
serialPutc('h');
|
||||
serialPutc('e');
|
||||
serialPutc('l');
|
||||
serialPutc('l');
|
||||
serialPutc('o');
|
||||
testAlloc();
|
||||
printf("Testing backtrace\n");
|
||||
test_backtrace();
|
||||
|
Loading…
Reference in New Issue
Block a user