SerialPort driver in video.ker
This commit is contained in:
parent
88982f25cd
commit
99a53601b7
3 changed files with 7 additions and 10 deletions
Binary file not shown.
|
@ -5,7 +5,7 @@
|
||||||
include ../config.mk
|
include ../config.mk
|
||||||
|
|
||||||
KERNEL = video.ker
|
KERNEL = video.ker
|
||||||
LIBS = -lboot -lvideo
|
LIBS = -lboot -lvideo -lserial
|
||||||
|
|
||||||
all: builddir $(KERNEL)
|
all: builddir $(KERNEL)
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <multiboot.hpp>
|
#include <multiboot.hpp>
|
||||||
#include <io.hpp>
|
|
||||||
|
|
||||||
#include <driver/video.hpp>
|
#include <driver/video.hpp>
|
||||||
|
#include <driver/serial.hpp>
|
||||||
|
|
||||||
extern "C" void init(multiboot::Structure const & data)
|
extern "C" void init(multiboot::Structure const & data)
|
||||||
{
|
{
|
||||||
write_com(0x3F8, 'H');
|
SerialPort serial(SERIAL_COM1);
|
||||||
write_com(0x3F8, 'i');
|
|
||||||
write_com(0x3F8, '\n');
|
serial.write('H');
|
||||||
|
serial.write('i');
|
||||||
|
serial.write('\n');
|
||||||
|
|
||||||
VideoScreen video(*data.vbe.modeInfo);
|
VideoScreen video(*data.vbe.modeInfo);
|
||||||
for(uint32_t y = 0; y < video.height(); y++)
|
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);
|
while(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue