Skip to content

Register timer for RV32 #490

Description

@ytakano
  1. Implement Timer trait.

pub trait Timer {
/// Reset the timer interrupt.
fn reset(&self, dur: Duration);
/// Get IRQ#.
fn irq_id(&self) -> u16;
/// Disable the timer interrupt.
fn disable(&self);
}

  1. Register the timer.

pub fn register_timer(timer: Box<dyn Timer + Send + Sync>) {

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions