1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:07:45 +00:00

Kernel: Update SB16 driver to use the new IRQHandler class

Also, add methods to allow changing of IRQ line in the SB16 card.
This commit is contained in:
Liav A 2020-02-22 20:19:13 +02:00 committed by Andreas Kling
parent 895e874eb4
commit c51a57fb32
2 changed files with 58 additions and 5 deletions

View file

@ -27,7 +27,7 @@
#pragma once
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/IRQHandler.h>
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/VM/PhysicalPage.h>
#include <Kernel/WaitQueue.h>
#include <LibBareMetal/Memory/PhysicalAddress.h>
@ -52,7 +52,7 @@ public:
private:
// ^IRQHandler
virtual void handle_irq() override;
virtual void handle_irq(RegisterState&) override;
// ^CharacterDevice
virtual const char* class_name() const override { return "SB16"; }
@ -63,11 +63,13 @@ private:
void set_sample_rate(uint16_t hz);
void dsp_write(u8 value);
u8 dsp_read();
u8 get_irq_line();
void set_irq_register(u8 irq_number);
void set_irq_line(u8 irq_number);
OwnPtr<Region> m_dma_region;
int m_major_version { 0 };
WaitQueue m_irq_queue;
};
}