mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:52:43 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
	
		
			359 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
	
		
			359 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <Kernel/Arch/x86/IO.h>
 | |
| #include <Kernel/CMOS.h>
 | |
| 
 | |
| namespace CMOS {
 | |
| 
 | |
| u8 read(u8 index)
 | |
| {
 | |
|     IO::out8(0x70, index);
 | |
|     return IO::in8(0x71);
 | |
| }
 | |
| 
 | |
| void write(u8 index, u8 data)
 | |
| {
 | |
|     IO::out8(0x70, index);
 | |
|     IO::out8(0x71, data);
 | |
| }
 | |
| 
 | |
| }
 | 
