Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
SwanX1 committed Nov 15, 2023
1 parent 43aa930 commit b7a508f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ pub extern "C" fn kernel_main() -> ! {
// TODO: When display output is coded, make sure panic outputs panic information.
// ! You can ignore any errors that appear in IDE, we do not use std.
#[panic_handler]
pub extern "Rust" fn panic(_info: &PanicInfo) -> ! {
pub fn panic(_info: &PanicInfo) -> ! {
loop {}
}
6 changes: 4 additions & 2 deletions src/peripheral/drivers/timer/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ use super::timer_value;
pub fn wait_nanos(nanos: u32) {
unsafe {
let start: u32 = timer_value();
while timer_value() < (start + nanos) { hint::spin_loop() }
while timer_value() < (start + nanos) {
hint::spin_loop()
}
}
}
}

0 comments on commit b7a508f

Please sign in to comment.