Skip to content

Commit

Permalink
Fix aml_tester
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacWoods committed Sep 17, 2023
1 parent 066aa99 commit fabaa61
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aml/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,8 @@ pub trait Handler: Send + Sync {
/// 100 microseconds.
fn stall(&self, microseconds: u64);

/// Sleep for at least the given number of **milliseconds**. An implementation may round to the closest sleep time
/// supported, and should relinquish the processor.
/// Sleep for at least the given number of **milliseconds**. An implementation may round to the closest sleep
/// time supported, and should relinquish the processor.
fn sleep(&self, milliseconds: u64);

fn handle_fatal_error(&self, fatal_type: u8, fatal_code: u32, fatal_arg: u64) {
Expand Down
7 changes: 7 additions & 0 deletions aml_tester/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,4 +310,11 @@ impl aml::Handler for Handler {
fn write_pci_u32(&self, segment: u16, bus: u8, device: u8, function: u8, _offset: u16, value: u32) {
println!("write_pci_u32 ({segment:#x}, {bus:#x}, {device:#x}, {function:#x})<-{value:#x}");
}

fn stall(&self, microseconds: u64) {
println!("Stalling for {}us", microseconds);
}
fn sleep(&self, milliseconds: u64) {
println!("Sleeping for {}ms", milliseconds);
}
}

0 comments on commit fabaa61

Please sign in to comment.