2019-04-18 11:08:52 -03:00
|
|
|
#include <Kernel/Devices/DebugLogDevice.h>
|
|
|
|
|
#include <Kernel/IO.h>
|
|
|
|
|
|
|
|
|
|
static DebugLogDevice* s_the;
|
|
|
|
|
|
|
|
|
|
DebugLogDevice& DebugLogDevice::the()
|
|
|
|
|
{
|
|
|
|
|
ASSERT(s_the);
|
|
|
|
|
return *s_the;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DebugLogDevice::DebugLogDevice()
|
|
|
|
|
: CharacterDevice(1, 18)
|
|
|
|
|
{
|
|
|
|
|
s_the = this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DebugLogDevice::~DebugLogDevice()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2019-07-03 16:17:35 -03:00
|
|
|
ssize_t DebugLogDevice::write(FileDescription&, const u8* data, ssize_t data_size)
|
2019-04-18 11:08:52 -03:00
|
|
|
{
|
|
|
|
|
for (int i = 0; i < data_size; ++i)
|
|
|
|
|
IO::out8(0xe9, data[i]);
|
|
|
|
|
return data_size;
|
|
|
|
|
}
|