mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:22:43 +00:00 
			
		
		
		
	 68c3f9aa5a
			
		
	
	
		68c3f9aa5a
		
	
	
	
	
		
			
			This class is part of the PCI code so let's move it to the PCI namespace like other handling code parts of the PCI bus.
		
			
				
	
	
		
			37 lines
		
	
	
	
		
			830 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			830 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2023, Jelle Raaijmakers <jelle@gmta.nl>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/NonnullRefPtr.h>
 | |
| #include <Kernel/Interrupts/PCIIRQHandler.h>
 | |
| 
 | |
| namespace Kernel::Audio::IntelHDA {
 | |
| 
 | |
| class Controller;
 | |
| 
 | |
| class InterruptHandler
 | |
|     : public PCI::IRQHandler
 | |
|     , public RefCounted<InterruptHandler> {
 | |
| public:
 | |
|     static ErrorOr<NonnullRefPtr<InterruptHandler>> create(Controller& controller)
 | |
|     {
 | |
|         return adopt_nonnull_ref_or_enomem(new (nothrow) InterruptHandler(controller));
 | |
|     }
 | |
| 
 | |
|     // ^PCI::IRQHandler
 | |
|     virtual StringView purpose() const override { return "IntelHDA IRQ Handler"sv; }
 | |
| 
 | |
| private:
 | |
|     InterruptHandler(Controller& controller);
 | |
| 
 | |
|     // ^PCI::IRQHandler
 | |
|     virtual bool handle_irq(RegisterState const&) override;
 | |
| 
 | |
|     Controller& m_controller;
 | |
| };
 | |
| 
 | |
| }
 |