1#![no_std]
2
3extern crate alloc;
4
5use rdif_base::def_driver;
6pub use rdif_base::{DriverGeneric, KError, custom_type};
7
8custom_type!(
9 #[doc = "Clock signal id"],
10 ClockId, usize, "{:#x}");
11
12pub trait Interface: DriverGeneric {
13 fn perper_enable(&mut self);
14
15 fn enable(&mut self, _id: ClockId) -> Result<(), KError> {
16 Ok(())
17 }
18
19 fn get_rate(&self, id: ClockId) -> Result<u64, KError>;
20
21 fn set_rate(&mut self, id: ClockId, rate: u64) -> Result<(), KError>;
22}
23
24def_driver!(Clk, Interface);