2023-03-18 09:10:33 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "fs/devices/Device.h"
|
|
|
|
#include <luna/SharedPtr.h>
|
|
|
|
|
|
|
|
namespace DeviceRegistry
|
|
|
|
{
|
|
|
|
enum DeviceMajorTypes : u32
|
|
|
|
{
|
|
|
|
Null = 0,
|
|
|
|
Console = 1,
|
2023-04-21 18:18:15 +02:00
|
|
|
Memory = 2,
|
|
|
|
Framebuffer = 3,
|
2023-03-18 09:10:33 +01:00
|
|
|
};
|
|
|
|
|
2023-05-09 18:31:27 +02:00
|
|
|
Result<SharedPtr<Device>> fetch_special_device(u32 major, u32 minor);
|
2023-03-18 09:10:33 +01:00
|
|
|
|
2023-05-09 18:31:27 +02:00
|
|
|
Result<void> register_special_device(u32 major, u32 minor, SharedPtr<Device> device);
|
2023-03-18 09:10:33 +01:00
|
|
|
|
|
|
|
Result<void> init();
|
|
|
|
}
|