mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 10:42:45 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			352 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			352 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <AK/Types.h>
 | |
| 
 | |
| namespace PIC {
 | |
| 
 | |
| void enable(byte number);
 | |
| void disable(byte number);
 | |
| void eoi(byte number);
 | |
| void initialize();
 | |
| word get_isr();
 | |
| word get_irr();
 | |
| 
 | |
| }
 | |
| 
 | |
| class IRQHandlerScope {
 | |
| public:
 | |
|     explicit IRQHandlerScope(byte irq) : m_irq(irq) { }
 | |
|     ~IRQHandlerScope() { PIC::eoi(m_irq); }
 | |
| 
 | |
| private:
 | |
|     byte m_irq { 0 };
 | |
| };
 | 
