pub trait GeneralPurpose32bitInstance: GeneralPurpose16bitInstance {
// Required method
fn regs_gp32() -> TimGp32;
// Provided methods
fn set_frequency(&mut self, frequency: Hertz) { ... }
fn get_frequency(&self) -> Hertz { ... }
}
Expand description
Gneral-purpose 32-bit timer instance.
Required Methods§
sourcefn regs_gp32() -> TimGp32
fn regs_gp32() -> TimGp32
Get access to the general purpose 32bit timer registers.
Note: This works even if the timer is more capable, because registers for the less capable timers are a subset. This allows writing a driver for a given set of capabilities, and having it transparently work with more capable timers.
Provided Methods§
sourcefn set_frequency(&mut self, frequency: Hertz)
fn set_frequency(&mut self, frequency: Hertz)
Set timer frequency.
sourcefn get_frequency(&self) -> Hertz
fn get_frequency(&self) -> Hertz
Get timer frequency.
Object Safety§
This trait is not object safe.