1#![no_std]
2
3extern crate alloc;
4
5use alloc::boxed::Box;
6
7pub use rdif_base::{DriverGeneric, irq::*};
8
9pub type Hardware = Box<dyn Interface>;
10pub type HardwareCPU = Box<dyn InterfaceCPU>;
11
12pub trait Interface: DriverGeneric {
13 fn get_current_cpu(&mut self) -> Box<dyn InterfaceCPU>;
14}
15
16pub trait InterfaceCPU: Send + Sync {
17 fn set_timeval(&self, ticks: u64);
18 fn current_ticks(&self) -> u64;
19 fn tick_hz(&self) -> u64;
20 fn set_irq_enable(&self, enable: bool);
21 fn get_irq_status(&self) -> bool;
22 fn irq(&self) -> IrqConfig;
23}