Commit 389452ec authored by Mathieu Maret's avatar Mathieu Maret

printf: also write on serial

parent ca22696b
#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);
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment