sparreal-kernel 0.15.2

Sparreal OS kernel
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mod dtb;

pub use dtb::DeviceTree;

#[derive(Debug, Clone, Copy)]
pub enum PlatformDescriptor {
    DeviceTree(DeviceTree),
    Acpi,
    None,
}

pub fn get_platform_descriptor() -> PlatformDescriptor {
    if let Some(dtb) = crate::hal::al::platform::fdt_addr() {
        PlatformDescriptor::DeviceTree(DeviceTree::new(dtb))
    } else {
        PlatformDescriptor::None
    }
}