From fabaa61bb3e3e94e0b13fd2408eafce3698d8132 Mon Sep 17 00:00:00 2001 From: Isaac Woods Date: Sun, 17 Sep 2023 22:01:37 +0100 Subject: [PATCH] Fix `aml_tester` --- aml/src/lib.rs | 4 ++-- aml_tester/src/main.rs | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/aml/src/lib.rs b/aml/src/lib.rs index e5fd9d78..d5bd7915 100644 --- a/aml/src/lib.rs +++ b/aml/src/lib.rs @@ -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) { diff --git a/aml_tester/src/main.rs b/aml_tester/src/main.rs index 890e5890..c341f2e5 100644 --- a/aml_tester/src/main.rs +++ b/aml_tester/src/main.rs @@ -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); + } }