mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:52:43 +00:00 
			
		
		
		
	 27f699ef0c
			
		
	
	
		27f699ef0c
		
	
	
	
	
		
			
			These types can be picked up by including <AK/Types.h>: * u8, u16, u32, u64 (unsigned) * i8, i16, i32, i64 (signed)
		
			
				
	
	
		
			27 lines
		
	
	
	
		
			485 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
	
		
			485 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #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()
 | |
| {
 | |
| }
 | |
| 
 | |
| ssize_t DebugLogDevice::write(FileDescription&, const u8* data, ssize_t data_size)
 | |
| {
 | |
|     for (int i = 0; i < data_size; ++i)
 | |
|         IO::out8(0xe9, data[i]);
 | |
|     return data_size;
 | |
| }
 |