rdif_clk/lib.rs
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 get_rate(&self, id: ClockId) -> Result<u64, KError>;
16
17 fn set_rate(&mut self, id: ClockId, rate: u64) -> Result<(), KError>;
18}
19
20def_driver!(Clk, Interface);