2 releases
0.1.1 | Feb 2, 2023 |
---|---|
0.1.0 | Jan 31, 2023 |
#890 in Hardware support
4KB
Syscon-rs
A basic syscon-poweroff and syscon-reboot driver.
Relies on log
and fdt
crates.
Usage
extern "C" fn kmain(_hartid: u64, devicetree_ptr: *const u8) {
// Initialize logger
syscon_rs::init(devicetree_ptr);
syscon_rs::power_off().expect("Failed to power off");
}
Or
extern "C" fn kmain(_hartid: u64, devicetree_ptr: *const u8) {
// Initialize logger
syscon_rs::init(devicetree_ptr);
syscon_rs::reboot().expect("Failed to reboot");
}
Dependencies
~155KB