SerialPort driver in video.ker

This commit is contained in:
Felix Queißner 2016-06-26 16:13:21 +02:00
parent 88982f25cd
commit 99a53601b7
3 changed files with 7 additions and 10 deletions

Binary file not shown.

View file

@ -5,7 +5,7 @@
include ../config.mk
KERNEL = video.ker
LIBS = -lboot -lvideo
LIBS = -lboot -lvideo -lserial
all: builddir $(KERNEL)

View file

@ -1,15 +1,17 @@
#include <stdint.h>
#include <multiboot.hpp>
#include <io.hpp>
#include <driver/video.hpp>
#include <driver/serial.hpp>
extern "C" void init(multiboot::Structure const & data)
{
write_com(0x3F8, 'H');
write_com(0x3F8, 'i');
write_com(0x3F8, '\n');
SerialPort serial(SERIAL_COM1);
serial.write('H');
serial.write('i');
serial.write('\n');
VideoScreen video(*data.vbe.modeInfo);
for(uint32_t y = 0; y < video.height(); y++)
@ -20,10 +22,5 @@ extern "C" void init(multiboot::Structure const & data)
}
}
write_com(0x3F8, 'B');
write_com(0x3F8, 'y');
write_com(0x3F8, 'e');
write_com(0x3F8, '\n');
while(true);
}