[Zion] Add a keyboard interrupt handler and a driver manager.
This commit is contained in:
parent
d9a936db09
commit
838ef01a2a
12 changed files with 106 additions and 23 deletions
22
zion/interrupt/driver_manager.h
Normal file
22
zion/interrupt/driver_manager.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
|
||||
#include <glacier/container/hash_map.h>
|
||||
#include <glacier/memory/ref_ptr.h>
|
||||
|
||||
#include "object/port.h"
|
||||
|
||||
class DriverManager {
|
||||
public:
|
||||
static DriverManager& Get();
|
||||
|
||||
DriverManager();
|
||||
DriverManager(const DriverManager&) = delete;
|
||||
DriverManager(DriverManager&&) = delete;
|
||||
|
||||
void WriteMessage(uint64_t irq_num, IpcMessage&& message);
|
||||
|
||||
glcr::ErrorCode RegisterListener(uint64_t irq_num, glcr::RefPtr<Port> port);
|
||||
|
||||
private:
|
||||
glcr::HashMap<uint64_t, glcr::RefPtr<Port>> driver_map_;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue