From 1bb674f6b52ec741f522c9bda52933986514c7e7 Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 13 Oct 2020 16:15:41 +0800 Subject: [PATCH] fix dangling hard-coded references --- examples/shell/src/timer.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/shell/src/timer.rs b/examples/shell/src/timer.rs index 3437c877a..7d18b2c78 100644 --- a/examples/shell/src/timer.rs +++ b/examples/shell/src/timer.rs @@ -1,10 +1,9 @@ +use utralib::generated::*; #[cfg(baremetal)] const SYSTEM_CLOCK_FREQUENCY: u32 = 100_000_000; #[cfg(baremetal)] -const TIMER_BASE: usize = 0xF000_3000; - -use utralib::generated::*; +const TIMER_BASE: usize = utra::timer0::HW_TIMER0_BASE; // claim the same address in virt as in phys #[cfg(baremetal)] fn timer_tick(_irq_no: usize, _arg: *mut usize) { @@ -31,7 +30,7 @@ pub fn init() { .expect("timer: couldn't map timer"); xous::rsyscall(xous::SysCall::ClaimInterrupt( - 1, + utra::timer0::TIMER0_IRQ, MemoryAddress::new(timer_tick as *mut usize as usize).unwrap(), None, ))