mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:32:46 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
	
		
			241 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
	
		
			241 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include <Kernel/CMOS.h>
 | |
| #include <Kernel/IO.h>
 | |
| 
 | |
| namespace CMOS {
 | |
| 
 | |
| byte read(byte index)
 | |
| {
 | |
|     IO::out8(0x70, index);
 | |
|     return IO::in8(0x71);
 | |
| }
 | |
| 
 | |
| void write(byte index, byte data)
 | |
| {
 | |
|     IO::out8(0x70, index);
 | |
|     IO::out8(0x71, data);
 | |
| }
 | |
| 
 | |
| }
 | 
