From 11155df21c8049807155ba192a816dae0bd69615 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sun, 16 Jul 2023 17:37:46 +0800 Subject: [PATCH] note naming convention deviation in xous-ticktimer all other functions have a .init() routine that handles interrupt binding. ticktimer rolls that into a routine that also resets the time of the ticktimer. A comment is added for maintaner sanity down the road. --- services/xous-ticktimer/src/main.rs | 2 +- .../xous-ticktimer/src/platform/precursor/implementation.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/xous-ticktimer/src/main.rs b/services/xous-ticktimer/src/main.rs index 612ac0229..05291beb2 100644 --- a/services/xous-ticktimer/src/main.rs +++ b/services/xous-ticktimer/src/main.rs @@ -47,7 +47,7 @@ fn main() -> ! { // Create a new ticktimer object let mut ticktimer = XousTickTimer::new(ticktimer_client); - ticktimer.reset(); // make sure the time starts from zero + ticktimer.reset(); // make sure the time starts from zero; also maps interrupts (note HAL convention deviation, this combines .init() into a single call). // register a suspend/resume listener #[cfg(not(target_arch = "arm"))] diff --git a/services/xous-ticktimer/src/platform/precursor/implementation.rs b/services/xous-ticktimer/src/platform/precursor/implementation.rs index 4d3c2541e..3c0b23e5c 100644 --- a/services/xous-ticktimer/src/platform/precursor/implementation.rs +++ b/services/xous-ticktimer/src/platform/precursor/implementation.rs @@ -101,7 +101,7 @@ impl XousTickTimer { pub fn clear_last_response(&mut self) { self.last_response = None; } - + /// This combines the functions normally found in .init() into the ticktimer reset routine. pub fn reset(&mut self) { if ! self.initialized { xous::claim_interrupt(