mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-20 09:03:28 +00:00
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.
This commit is contained in:
parent
95239eb05f
commit
11155df21c
2 changed files with 2 additions and 2 deletions
|
|
@ -47,7 +47,7 @@ fn main() -> ! {
|
||||||
|
|
||||||
// Create a new ticktimer object
|
// Create a new ticktimer object
|
||||||
let mut ticktimer = XousTickTimer::new(ticktimer_client);
|
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
|
// register a suspend/resume listener
|
||||||
#[cfg(not(target_arch = "arm"))]
|
#[cfg(not(target_arch = "arm"))]
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ impl XousTickTimer {
|
||||||
pub fn clear_last_response(&mut self) {
|
pub fn clear_last_response(&mut self) {
|
||||||
self.last_response = None;
|
self.last_response = None;
|
||||||
}
|
}
|
||||||
|
/// This combines the functions normally found in .init() into the ticktimer reset routine.
|
||||||
pub fn reset(&mut self) {
|
pub fn reset(&mut self) {
|
||||||
if ! self.initialized {
|
if ! self.initialized {
|
||||||
xous::claim_interrupt(
|
xous::claim_interrupt(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue