pub trait TimerIFace<S>where
S: TimerSpeed,{
// Required methods
fn get_freq(&self) -> Option<Rate<u32, 1, 1>>;
fn configure(
&mut self,
config: Config<<S as TimerSpeed>::ClockSourceType>,
) -> Result<(), Error>;
fn is_configured(&self) -> bool;
fn get_duty(&self) -> Option<Duty>;
fn get_number(&self) -> Number;
fn get_frequency(&self) -> u32;
}
Expand description
Interface for Timers
Required Methods§
Sourcefn configure(
&mut self,
config: Config<<S as TimerSpeed>::ClockSourceType>,
) -> Result<(), Error>
fn configure( &mut self, config: Config<<S as TimerSpeed>::ClockSourceType>, ) -> Result<(), Error>
Configure the timer
Sourcefn is_configured(&self) -> bool
fn is_configured(&self) -> bool
Check if the timer has been configured
Sourcefn get_number(&self) -> Number
fn get_number(&self) -> Number
Return the timer number
Sourcefn get_frequency(&self) -> u32
fn get_frequency(&self) -> u32
Return the timer frequency, or 0 if not configured